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">
|
|
|
|
<h1>
|
|
|
|
@yield('title')
|
2018-09-22 13:26:58 +02:00
|
|
|
<a class="btn btn-outline-dark" href="{{ $U('/chore/new') }}">
|
2019-05-01 20:19:18 +02:00
|
|
|
<i class="fas fa-plus"></i> {{ $__t('Add') }}
|
2018-07-10 20:37:13 +02:00
|
|
|
</a>
|
2019-04-22 22:16:35 +02:00
|
|
|
<a class="btn btn-outline-secondary" href="{{ $U('/userfields?entity=chores') }}">
|
2019-05-01 20:19:18 +02:00
|
|
|
<i class="fas fa-sliders-h"></i> {{ $__t('Configure userfields') }}
|
2019-04-22 22:16:35 +02:00
|
|
|
</a>
|
2018-07-10 20:37:13 +02:00
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-25 20:03:31 +02:00
|
|
|
|
2018-07-10 20:37:13 +02:00
|
|
|
<div class="row mt-3">
|
2018-07-11 19:43:05 +02:00
|
|
|
<div class="col-xs-12 col-md-6 col-xl-3">
|
2019-05-01 20:19:18 +02:00
|
|
|
<label for="search">{{ $__t('Search') }}</label> <i class="fas fa-search"></i>
|
2018-07-10 20:37:13 +02:00
|
|
|
<input type="text" class="form-control" id="search">
|
2018-07-09 19:27:22 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-07-10 20:37:13 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2018-09-22 13:26:58 +02:00
|
|
|
<table id="chores-table" class="table table-sm table-striped dt-responsive">
|
2018-05-12 14:25:21 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-03-09 10:49:26 +01:00
|
|
|
<th class="border-right"></th>
|
2019-05-01 20:19:18 +02:00
|
|
|
<th>{{ $__t('Name') }}</th>
|
|
|
|
<th>{{ $__t('Period type') }}</th>
|
|
|
|
<th>{{ $__t('Description') }}</th>
|
2019-04-22 22:16:35 +02:00
|
|
|
|
|
|
|
@include('components.userfields_thead', array(
|
|
|
|
'userfields' => $userfields
|
|
|
|
))
|
|
|
|
|
2018-05-12 14:25:21 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2019-01-05 20:06:35 +01:00
|
|
|
<tbody class="d-none">
|
2018-09-22 13:26:58 +02:00
|
|
|
@foreach($chores as $chore)
|
2018-05-12 14:25:21 +02:00
|
|
|
<tr>
|
2019-03-09 10:49:26 +01:00
|
|
|
<td class="fit-content border-right">
|
2018-09-22 13:26:58 +02:00
|
|
|
<a class="btn btn-info btn-sm" href="{{ $U('/chore/') }}{{ $chore->id }}">
|
2018-07-11 19:43:05 +02:00
|
|
|
<i class="fas fa-edit"></i>
|
2018-05-12 14:25:21 +02:00
|
|
|
</a>
|
2018-09-22 13:26:58 +02:00
|
|
|
<a class="btn btn-danger btn-sm chore-delete-button" href="#" data-chore-id="{{ $chore->id }}" data-chore-name="{{ $chore->name }}">
|
2018-07-11 19:43:05 +02:00
|
|
|
<i class="fas fa-trash"></i>
|
2018-05-12 14:25:21 +02:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
2018-09-22 13:26:58 +02:00
|
|
|
{{ $chore->name }}
|
2018-05-12 14:25:21 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-02 20:20:18 +02:00
|
|
|
{{ $__t($chore->period_type) }}
|
2018-05-12 14:25:21 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-09-22 13:26:58 +02:00
|
|
|
{{ $chore->description }}
|
2018-05-12 14:25:21 +02:00
|
|
|
</td>
|
2019-04-22 22:16:35 +02:00
|
|
|
|
|
|
|
@include('components.userfields_tbody', array(
|
|
|
|
'userfields' => $userfields,
|
|
|
|
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $chore->id)
|
|
|
|
))
|
|
|
|
|
2018-05-12 14:25:21 +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
|