| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | @extends('layout.default') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | @section('title', $__t('Tasks')) | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | @section('activeNav', 'tasks') | 
					
						
							|  |  |  | @section('viewJsName', 'tasks') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @push('pageScripts') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <script src="{{ $U('/node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.min.js?v=', true) }}{{ $version }}"></script> | 
					
						
							|  |  |  | <script src="{{ $U('/node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.min.js?v=', true) }}{{ $version }}"></script> | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | @endpush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @push('pageStyles') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" | 
					
						
							|  |  |  | 	rel="stylesheet"> | 
					
						
							|  |  |  | <link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" | 
					
						
							|  |  |  | 	rel="stylesheet"> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | @endpush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('content') | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 		<div class="title-related-links"> | 
					
						
							|  |  |  | 			<h2 class="title">@yield('title')</h2> | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 			<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3" | 
					
						
							|  |  |  | 				type="button" | 
					
						
							|  |  |  | 				data-toggle="collapse" | 
					
						
							|  |  |  | 				data-target="#related-links"> | 
					
						
							|  |  |  | 				<i class="fas fa-ellipsis-v"></i> | 
					
						
							|  |  |  | 			</button> | 
					
						
							|  |  |  | 			<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right" | 
					
						
							|  |  |  | 				id="related-links"> | 
					
						
							| 
									
										
										
										
											2020-11-08 15:09:10 +01:00
										 |  |  | 				<a class="btn btn-primary responsive-button show-as-dialog-link" | 
					
						
							|  |  |  | 					href="{{ $U('/task/new?embedded') }}"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 					{{ $__t('Add') }} | 
					
						
							|  |  |  | 				</a> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 		<div class="border-top border-bottom my-2 py-1"> | 
					
						
							|  |  |  | 			<div id="info-due-tasks" | 
					
						
							|  |  |  | 				data-status-filter="duesoon" | 
					
						
							|  |  |  | 				data-next-x-days="{{ $nextXDays }}" | 
					
						
							|  |  |  | 				class="warning-message status-filter-message responsive-button mr-2"></div> | 
					
						
							|  |  |  | 			<div id="info-overdue-tasks" | 
					
						
							|  |  |  | 				data-status-filter="overdue" | 
					
						
							|  |  |  | 				class="error-message status-filter-message responsive-button"></div> | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 			<div class="float-right"> | 
					
						
							| 
									
										
										
										
											2020-11-10 18:11:33 +01:00
										 |  |  | 				<a class="btn btn-sm btn-outline-info d-md-none mt-1" | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 					data-toggle="collapse" | 
					
						
							|  |  |  | 					href="#table-filter-row" | 
					
						
							|  |  |  | 					role="button"> | 
					
						
							|  |  |  | 					<i class="fas fa-filter"></i> | 
					
						
							|  |  |  | 				</a> | 
					
						
							|  |  |  | 				<a id="clear-filter-button" | 
					
						
							| 
									
										
										
										
											2020-11-10 18:11:33 +01:00
										 |  |  | 					class="btn btn-sm btn-outline-info mt-1" | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 					href="#"> | 
					
						
							|  |  |  | 					{{ $__t('Clear filter') }} | 
					
						
							|  |  |  | 				</a> | 
					
						
							|  |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | <div class="row collapse d-md-flex" | 
					
						
							|  |  |  | 	id="table-filter-row"> | 
					
						
							| 
									
										
										
										
											2018-11-24 19:40:50 +01: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-11-24 19:40:50 +01:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2018-09-24 19:13:53 +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-10-31 18:37:10 +01:00
										 |  |  | 				<span class="input-group-text"><i class="fas fa-filter"></i> {{ $__t('Status') }}</span> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 			<select class="form-control" | 
					
						
							|  |  |  | 				id="status-filter"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 				<option value="all">{{ $__t('All') }}</option> | 
					
						
							|  |  |  | 				<option value="duesoon">{{ $__t('Due soon') }}</option> | 
					
						
							|  |  |  | 				<option value="overdue">{{ $__t('Overdue') }}</option> | 
					
						
							|  |  |  | 			</select> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2018-09-24 19:13:53 +02:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 	<div class="col-xs-12 col-md-6 col-xl-3"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 		<div class="form-check custom-control custom-checkbox"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 			<input class="form-check-input custom-control-input" | 
					
						
							|  |  |  | 				type="checkbox" | 
					
						
							|  |  |  | 				id="show-done-tasks"> | 
					
						
							|  |  |  | 			<label class="form-check-label custom-control-label" | 
					
						
							|  |  |  | 				for="show-done-tasks"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 				{{ $__t('Show done tasks') }} | 
					
						
							| 
									
										
										
										
											2018-09-23 19:26:13 +02:00
										 |  |  | 			</label> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 		<table id="tasks-table" | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 			class="table table-sm table-striped nowrap w-100"> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 			<thead> | 
					
						
							|  |  |  | 				<tr> | 
					
						
							| 
									
										
										
										
											2020-11-11 22:28:05 +01:00
										 |  |  | 					<th class="border-right"><a class="text-muted change-table-columns-visibility-button" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							| 
									
										
										
										
											2020-11-11 21:11:17 +01:00
										 |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							title="{{ $__t('Hide/view columns') }}" | 
					
						
							|  |  |  | 							data-table-selector="#tasks-table" | 
					
						
							|  |  |  | 							href="#"><i class="fas fa-eye"></i></a> | 
					
						
							|  |  |  | 					</th> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Task') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('Due') }}</th> | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 					<th class="d-none">Hidden category</th> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Assigned to') }}</th> | 
					
						
							| 
									
										
										
										
											2018-09-24 19:13:53 +02:00
										 |  |  | 					<th class="d-none">Hidden status</th> | 
					
						
							| 
									
										
										
										
											2019-04-23 09:06:18 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.userfields_thead', array( | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'userfields' => $userfields | 
					
						
							| 
									
										
										
										
											2019-04-23 09:06:18 +02:00
										 |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 			</thead> | 
					
						
							| 
									
										
										
										
											2019-01-05 20:06:35 +01:00
										 |  |  | 			<tbody class="d-none"> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 				@foreach($tasks as $task) | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<tr id="task-{{ $task->id }}-row" | 
					
						
							| 
									
										
										
										
											2020-10-18 15:08:09 +02:00
										 |  |  | 					class="@if($task->done == 1) text-muted @endif @if(!empty($task->due_date) && $task->due_date < date('Y-m-d')) table-danger @elseif(!empty($task->due_date) && $task->due_date < date('Y-m-d', strtotime('+' . $nextXDays . ' days')))
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					table-warning | 
					
						
							|  |  |  | 					@endif">
 | 
					
						
							| 
									
										
										
										
											2019-03-09 10:49:26 +01:00
										 |  |  | 					<td class="fit-content border-right"> | 
					
						
							| 
									
										
										
										
											2019-07-06 20:34:01 +02:00
										 |  |  | 						@if($task->done == 0) | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<a class="btn btn-success btn-sm do-task-button" | 
					
						
							|  |  |  | 							href="#" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							data-placement="left" | 
					
						
							| 
									
										
										
										
											2020-11-12 21:35:10 +01:00
										 |  |  | 							title="{{ $__t('Mark task as completed') }}" | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 							data-task-id="{{ $task->id }}" | 
					
						
							|  |  |  | 							data-task-name="{{ $task->name }}"> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 							<i class="fas fa-check"></i> | 
					
						
							|  |  |  | 						</a> | 
					
						
							| 
									
										
										
										
											2019-07-06 20:34:01 +02:00
										 |  |  | 						@else | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<a class="btn btn-secondary btn-sm undo-task-button" | 
					
						
							|  |  |  | 							href="#" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							data-placement="left" | 
					
						
							|  |  |  | 							title="{{ $__t('Undo task "%s"', $task->name) }}" | 
					
						
							| 
									
										
										
										
											2019-07-06 20:34:01 +02:00
										 |  |  | 							data-task-id="{{ $task->id }}" | 
					
						
							|  |  |  | 							data-task-name="{{ $task->name }}"> | 
					
						
							|  |  |  | 							<i class="fas fa-undo"></i> | 
					
						
							|  |  |  | 						</a> | 
					
						
							|  |  |  | 						@endif | 
					
						
							| 
									
										
										
										
											2020-11-12 21:35:10 +01:00
										 |  |  | 						<a class="btn btn-info btn-sm show-as-dialog-link" | 
					
						
							|  |  |  | 							href="{{ $U('/task/') }}{{ $task->id }}?embedded" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							title="{{ $__t('Edit this item') }}"> | 
					
						
							|  |  |  | 							<i class="fas fa-edit"></i> | 
					
						
							|  |  |  | 						</a> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<a class="btn btn-sm btn-danger delete-task-button" | 
					
						
							|  |  |  | 							href="#" | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 							data-task-id="{{ $task->id }}" | 
					
						
							| 
									
										
										
										
											2020-11-12 21:35:10 +01:00
										 |  |  | 							data-task-name="{{ $task->name }}" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							title="{{ $__t('Delete this item') }}"> | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 							<i class="fas fa-trash"></i> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 						</a> | 
					
						
							|  |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					<td id="task-{{ $task->id }}-name" | 
					
						
							|  |  |  | 						class="@if($task->done == 1) text-strike-through @endif"> | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 						{{ $task->name }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 						<span>{{ $task->due_date }}</span> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<time class="timeago timeago-contextual" | 
					
						
							|  |  |  | 							datetime="{{ $task->due_date }}"></time> | 
					
						
							| 
									
										
										
										
											2018-09-23 09:22:54 +02:00
										 |  |  | 					</td> | 
					
						
							|  |  |  | 					<td class="d-none"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 						@if($task->category_id != null) <span>{{ FindObjectInArrayByPropertyValue($taskCategories, 'id', $task->category_id)->name }}</span> @else <span class="font-italic font-weight-light">{{ $__t('Uncategorized') }}</span>@endif | 
					
						
							| 
									
										
										
										
											2018-09-23 19:26:13 +02:00
										 |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							|  |  |  | 						@if($task->assigned_to_user_id != null) <span>{{ GetUserDisplayName(FindObjectInArrayByPropertyValue($users, 'id', $task->assigned_to_user_id)) }}</span> @endif | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2018-09-24 19:13:53 +02:00
										 |  |  | 					<td class="d-none"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						@if($task->done == 1) text-muted @endif @if(!empty($task->due_date) && $task->due_date < date('Y-m-d')) | 
					
						
							|  |  |  | 							overdue | 
					
						
							|  |  |  | 							@elseif(!empty($task->due_date) && $task->due_date < date('Y-m-d', | 
					
						
							| 
									
										
										
										
											2020-10-18 15:08:09 +02:00
										 |  |  | 								strtotime('+' | 
					
						
							|  |  |  | 								. | 
					
						
							|  |  |  | 								$nextXDays | 
					
						
							|  |  |  | 								. ' days' | 
					
						
							|  |  |  | 								))) | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 								duesoon | 
					
						
							|  |  |  | 								@endif | 
					
						
							|  |  |  | 								</td> | 
					
						
							|  |  |  | 								@include('components.userfields_tbody', | 
					
						
							|  |  |  | 								array( 'userfields'=> $userfields, | 
					
						
							|  |  |  | 								'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $task->id) | 
					
						
							|  |  |  | 								)) | 
					
						
							| 
									
										
										
										
											2019-04-23 09:06:18 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-22 22:01:32 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 				@endforeach | 
					
						
							|  |  |  | 			</tbody> | 
					
						
							|  |  |  | 		</table> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | @stop |