tasks/templates/part.details.php

239 lines
13 KiB
PHP
Raw Normal View History

2017-10-01 14:48:30 +00:00
<div ng-controller="DetailsController"
ng-click="endEdit($event)"
class="content-wrapper handler">
<div class="flex-container"
ng-show="TaskState()=='found'"
ng-class="{'disabled': !task.calendar.writable}">
<div class="title" ng-class="{'editing':route.parameter=='name'}">
2017-10-26 14:44:29 +00:00
<a class="checkbox reactive"
2017-10-01 14:48:30 +00:00
ng-click="toggleCompleted(task)"
role="checkbox"
aria-checked="{{task.completed}}"
aria-label="<?php p($l->t('Task is completed')); ?>">
<span class="icon detail-checkbox" ng-class="{'icon-checkmark':task.completed, 'disabled': !task.calendar.writable}"></span>
</a>
2017-10-26 14:44:29 +00:00
<a class="star reactive" ng-click="toggleStarred(task)">
2017-10-01 14:48:30 +00:00
<span class="icon icon-task-star"
ng-class="{'icon-task-star-high':task.priority>5,'icon-task-star-medium':task.priority==5,'icon-task-star-low':task.priority > 0 && task.priority < 5, 'disabled': !task.calendar.writable}"></span>
</a>
2017-10-01 14:48:30 +00:00
<div class="title-text handler"
ng-class="{'strike-through':task.completed}"
ng-click="editName($event, task)"
oc-click-focus="{selector: '#editName', timeout: 0}"
ng-bind-html="task.summary | linky:'_blank':{rel: 'nofollow'}">
2017-09-19 06:55:06 +00:00
</div>
<div class="expandable-container handler">
<div class="expandingArea active">
<pre><span>{{ task.summary }}</span><br /></pre>
2017-10-01 14:48:30 +00:00
<textarea id="editName"
maxlength="200"
ng-model="task.summary"
ng-keydown="endName($event)"
ng-change="triggerUpdate(task)">
</textarea>
</div>
2014-03-28 19:11:56 +00:00
</div>
</div>
<div class="body">
2017-09-24 22:10:52 +00:00
<ul class="sections">
2017-10-01 14:48:30 +00:00
<li class="section detail-start handler"
ng-class="{'date':isDue(task.start), 'editing':route.parameter=='startdate', 'high':isOverDue(task.start)}"
ng-click="editStart($event, task)">
2017-09-24 22:10:52 +00:00
<div>
<span class="icon icon-calendar" ng-class="{'icon-calendar-due':isDue(task.start),
'icon-calendar-overdue':isOverDue(task.start)}"></span>
2017-10-01 14:48:30 +00:00
<span class="section-title">
2017-09-24 22:10:52 +00:00
<text>{{ task.start | startDetails }}</text>
</span>
<div class="section-edit">
2017-10-01 14:48:30 +00:00
<input class="datepicker-input medium"
type="text"
key-value=""
placeholder="dd.mm.yyyy"
value="{{ task.start | dateTaskList }}"
datepicker="start">
<input class="timepicker-input medium handler"
ng-hide="task.allDay"
type="text"
key-value=""
placeholder="hh:mm"
value="{{ task.start | timeTaskList }}"
timepicker="start">
2017-09-24 22:10:52 +00:00
</div>
</div>
<div class="utils">
<a>
2017-10-26 14:44:29 +00:00
<span class="icon detail-save icon-checkmark-color handler end-edit reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
<a class="handler end-edit" ng-click="deleteStartDate(task)">
2017-10-26 14:44:29 +00:00
<span class="icon icon-trash reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
</div>
2017-09-24 22:10:52 +00:00
</li>
2017-10-01 14:48:30 +00:00
<li class="section detail-date handler"
ng-class="{'date':isDue(task.due), 'editing':route.parameter=='duedate', 'high':isOverDue(task.due)}"
ng-click="editDueDate($event, task)">
2017-09-24 22:10:52 +00:00
<div>
<span class="icon icon-calendar" ng-class="{'icon-calendar-due':isDue(task.due), 'icon-calendar-overdue':isOverDue(task.due)}"></span>
2017-10-01 14:48:30 +00:00
<span class="section-title">
2017-09-24 22:10:52 +00:00
<text>{{ task.due | dateDetails }}</text>
</span>
<div class="section-edit">
2017-10-01 14:48:30 +00:00
<input class="datepicker-input medium"
type="text"
key-value=""
placeholder="dd.mm.yyyy"
value="{{ task.due | dateTaskList }}"
datepicker="due">
<input class="timepicker-input medium"
ng-hide="task.allDay"
type="text"
key-value=""
placeholder="hh:mm"
value="{{ task.due | timeTaskList }}"
timepicker="due">
2017-09-24 22:10:52 +00:00
</div>
</div>
<div class="utils">
<a>
2017-10-26 14:44:29 +00:00
<span class="icon detail-save icon-checkmark-color handler end-edit reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
<a class="handler end-edit" ng-click="deleteDueDate(task)">
2017-10-26 14:44:29 +00:00
<span class="icon icon-trash reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
</div>
</li>
2017-10-26 14:44:29 +00:00
<li class="section detail-all-day handler reactive"
2017-10-01 14:48:30 +00:00
ng-click="toggleAllDay(task)"
ng-if="isAllDayPossible(task)"
role="checkbox"
aria-checked="{{task.allDay}}">
2017-09-24 22:10:52 +00:00
<div>
<span class="icon detail-checkbox" ng-class="{'icon-checkmark': task.allDay, 'disabled': !task.calendar.writable}"></span>
<span class="section-title">
<text><?php p($l->t('All day')); ?></text>
</span>
</div>
</li>
2017-10-01 14:48:30 +00:00
<li class="section detail-priority handler"
ng-class="{'editing':route.parameter=='priority','high':task.priority>5,'medium':task.priority==5,'low':task.priority > 0 && task.priority < 5, 'date':task.priority>0}"
ng-click="editPriority($event, task)">
2017-09-24 22:10:52 +00:00
<div>
2017-10-01 14:48:30 +00:00
<span class="icon icon-task-star"
ng-class="{'icon-task-star-high':task.priority>5,'icon-task-star-medium':task.priority==5,'icon-task-star-low':task.priority > 0 && task.priority < 5}"></span>
2017-09-24 22:10:52 +00:00
<span class="section-title">
<text>{{ task.priority | priorityDetails}}</text>
</span>
<div class="section-edit">
2017-10-01 14:48:30 +00:00
<input class="priority-input"
type="text"
ng-model="task.priority"
ng-change="triggerUpdate(task)">
<input type="range"
ng-model="task.priority"
min="0"
max="9"
step="1"
ng-change="triggerUpdate(task)">
2017-09-24 22:10:52 +00:00
</div>
</div>
<div class="utils">
<a>
2017-10-26 14:44:29 +00:00
<span class="icon detail-save icon-checkmark-color handler end-edit reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
<a class="handler end-edit" ng-click="deletePriority(task)">
2017-10-26 14:44:29 +00:00
<span class="icon icon-trash reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
</li>
2017-10-01 14:48:30 +00:00
<li class="section detail-complete handler"
ng-class="{'editing':route.parameter=='percent', 'date':task.complete>0}"
ng-click="editPercent($event, task)">
2017-09-24 22:10:52 +00:00
<div>
<span class="icon icon-percent" ng-class="{'icon-percent-active':task.complete>0}"></span>
<span class="section-title">
<text>{{ task.complete | percentDetails}}</text>
</span>
<div class="section-edit">
2017-10-01 14:48:30 +00:00
<input class="percent-input"
type="text"
ng-model="task.complete"
ng-change="setPercentComplete(task, task.complete)">
<input type="range"
ng-model="task.complete"
min="0"
max="100"
step="1"
ng-change="setPercentComplete(task, task.complete)">
2017-09-24 22:10:52 +00:00
</div>
</div>
<div class="utils">
<a>
2017-10-26 14:44:29 +00:00
<span class="icon detail-save icon-checkmark-color handler end-edit reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
<a class="handler end-edit" ng-click="deletePercent(task)">
2017-10-26 14:44:29 +00:00
<span class="icon icon-trash reactive"></span>
2017-09-24 22:10:52 +00:00
</a>
</div>
</li>
<li class="section detail-categories" ng-class="{'active':task.cats.length>0}">
<div>
<span class="icon icon-tag detail-categories" ng-class="{'icon-tag-active':task.cats.length>0}"></span>
<!-- Edit line 1080 to show placeholder -->
<div class="detail-categories-container">
2017-10-01 14:48:30 +00:00
<ui-select
multiple
tagging
tagging-label="<?php p($l->t('(New category)')); ?>"
ng-model="task.cats"
theme="select2"
ng-disabled="!task.calendar.writable"
style="width: 100%;"
on-remove="removeCategory($item, $model)"
on-select="addCategory($item, $model)">
2017-09-24 22:10:52 +00:00
<ui-select-match placeholder="<?php p($l->t('Select categories...')); ?>">{{$item}}</ui-select-match>
<ui-select-choices repeat="category in settingsmodel.getById('various').categories | filter:$select.search">
{{category}}
</ui-select-choices>
</ui-select>
</div>
</div>
</li>
<li class="section detail-note">
<div class="note">
2017-10-01 14:48:30 +00:00
<div class="note-body selectable handler"
ng-click="editNote($event, task)"
oc-click-focus="{selector: '.expandingArea textarea', timeout: 0}">
2017-09-24 22:10:52 +00:00
<div class="content-fakeable" ng-class="{'editing':route.parameter=='note'}">
<div class="display-view" ng-bind-html="task.note | linky:'_blank':{rel: 'nofollow'}"></div>
<div class="edit-view">
<div class="expandingArea active">
<pre><span>{{ task.note }}</span><br /><br /></pre>
<textarea ng-model="task.note" ng-change="triggerUpdate(task)"></textarea>
</div>
</div>
</div>
2014-03-28 19:11:56 +00:00
</div>
</div>
2017-09-24 22:10:52 +00:00
</li>
</ul>
2014-03-28 19:11:56 +00:00
</div>
<div class="footer">
2017-10-26 14:44:29 +00:00
<a class="handler left close-all reactive"
2017-10-01 14:48:30 +00:00
ng-click="deleteTask(task)"
ng-show="task.calendar.writable">
2017-09-17 17:16:58 +00:00
<span class="icon icon-trash"></span>
</a>
2017-10-26 14:44:29 +00:00
<a class="handler right close-all reactive">
2017-09-17 17:16:58 +00:00
<span class="icon icon-hide"></span>
</a>
</div>
2014-05-27 17:59:35 +00:00
</div>
2017-10-01 14:48:30 +00:00
<div ng-show="TaskState()=='loading'" class="notice">
<?php p($l->t('Loading the task...')); ?>
<div class="loading" style="height: 50px;"></div>
</div>
2017-10-01 14:48:30 +00:00
<div ng-show="TaskState()==null" class="notice">
<?php p($l->t('Task not found!')); ?>
2014-05-27 17:59:35 +00:00
</div>
2015-11-14 14:19:55 +00:00
</div>