2018-04-11 19:49:35 +02:00
|
|
|
@extends('layout.default')
|
|
|
|
|
|
2019-05-01 20:19:18 +02:00
|
|
|
@section('title', $__t('Chores'))
|
2018-09-22 13:26:58 +02:00
|
|
|
@section('activeNav', 'chores')
|
|
|
|
|
@section('viewJsName', 'chores')
|
2018-04-12 21:13:38 +02:00
|
|
|
|
2018-04-11 19:49:35 +02:00
|
|
|
@section('content')
|
2018-07-10 20:37:13 +02:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
2020-04-19 08:51:02 -04:00
|
|
|
<div class="title-related-links">
|
|
|
|
|
<h2 class="title">@yield('title')</h2>
|
|
|
|
|
<div class="related-links">
|
2020-10-31 18:37:10 +01:00
|
|
|
<a class="btn btn-primary responsive-button"
|
|
|
|
|
href="{{ $U('/chore/new') }}">
|
|
|
|
|
{{ $__t('Add') }}
|
|
|
|
|
</a>
|
2020-08-31 20:32:50 +02:00
|
|
|
<a class="btn btn-outline-secondary"
|
|
|
|
|
href="{{ $U('/userfields?entity=chores') }}">
|
2020-04-19 08:51:02 -04:00
|
|
|
{{ $__t('Configure userfields') }}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-07-10 20:37:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-10-31 18:37:10 +01:00
|
|
|
|
|
|
|
|
<hr class="my-2 py-1">
|
|
|
|
|
|
2020-04-19 08:51:02 -04:00
|
|
|
<div class="row">
|
2018-07-11 19:43:05 +02:00
|
|
|
<div class="col-xs-12 col-md-6 col-xl-3">
|
2020-10-31 18:37:10 +01:00
|
|
|
<div class="input-group">
|
2020-04-19 08:51:02 -04:00
|
|
|
<div class="input-group-prepend">
|
2020-08-31 20:32:50 +02:00
|
|
|
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
2020-04-19 08:51:02 -04:00
|
|
|
</div>
|
2020-08-31 20:32:50 +02:00
|
|
|
<input type="text"
|
|
|
|
|
id="search"
|
|
|
|
|
class="form-control"
|
|
|
|
|
placeholder="{{ $__t('Search') }}">
|
2020-04-19 08:51:02 -04:00
|
|
|
</div>
|
2018-07-09 19:27:22 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2018-07-10 20:37:13 +02:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
2020-08-31 20:32:50 +02:00
|
|
|
<table id="chores-table"
|
|
|
|
|
class="table table-sm table-striped dt-responsive">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="border-right"></th>
|
|
|
|
|
<th>{{ $__t('Name') }}</th>
|
|
|
|
|
<th>{{ $__t('Period type') }}</th>
|
|
|
|
|
<th>{{ $__t('Description') }}</th>
|
2019-04-22 22:16:35 +02:00
|
|
|
|
2020-08-31 20:32:50 +02:00
|
|
|
@include('components.userfields_thead', array(
|
2019-04-22 22:16:35 +02:00
|
|
|
'userfields' => $userfields
|
2020-08-31 20:32:50 +02:00
|
|
|
))
|
2019-04-22 22:16:35 +02:00
|
|
|
|
2020-08-31 20:32:50 +02:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody class="d-none">
|
|
|
|
|
@foreach($chores as $chore)
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="fit-content border-right">
|
|
|
|
|
<a class="btn btn-info btn-sm"
|
|
|
|
|
href="{{ $U('/chore/') }}{{ $chore->id }}">
|
|
|
|
|
<i class="fas fa-edit"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a class="btn btn-danger btn-sm chore-delete-button"
|
|
|
|
|
href="#"
|
|
|
|
|
data-chore-id="{{ $chore->id }}"
|
|
|
|
|
data-chore-name="{{ $chore->name }}">
|
|
|
|
|
<i class="fas fa-trash"></i>
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{ $chore->name }}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{ $__t($chore->period_type) }}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{ $chore->description }}
|
|
|
|
|
</td>
|
2019-04-22 22:16:35 +02:00
|
|
|
|
2020-08-31 20:32:50 +02:00
|
|
|
@include('components.userfields_tbody', array(
|
2019-04-22 22:16:35 +02:00
|
|
|
'userfields' => $userfields,
|
|
|
|
|
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $chore->id)
|
2020-08-31 20:32:50 +02:00
|
|
|
))
|
2019-04-22 22:16:35 +02:00
|
|
|
|
2020-08-31 20:32:50 +02:00
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
2018-07-10 20:37:13 +02:00
|
|
|
</table>
|
|
|
|
|
</div>
|
2017-07-25 20:03:31 +02:00
|
|
|
</div>
|
2018-04-11 19:49:35 +02:00
|
|
|
@stop
|