tasks/templates/main.php

287 строки
16 KiB
PHP
Исходник Обычный вид История

<?php
2017-11-03 00:01:04 +03:00
script('tasks', 'merged');
2016-08-02 21:30:40 +03:00
style('tasks', 'style');
style('tasks', 'vendor/angularui/ui-select/select2');
?>
2017-10-01 19:00:14 +03:00
<div id="app"
ng-app="Tasks"
ng-cloak
ng-controller="AppController"
ng-click="closeAll($event)"
class="handler"
data-appVersion="<?php p($_['appVersion']); ?>">
<div id="app-navigation" ng-controller="ListController">
<ul id="collections">
2015-07-19 15:05:29 +03:00
<li id="collection_{{ collection.id }}"
2017-10-26 17:44:29 +03:00
class="collection reactive"
2015-07-19 15:05:29 +03:00
collectionID="{{collection.id}}"
ng-repeat="collection in collections"
2016-02-28 03:43:56 +03:00
ng-class="{'animate-up': hideCollection(collection.id), active: collection.id==route.collectionID}"
2015-07-19 15:05:29 +03:00
dnd-list="draggedTasks"
dnd-drop="dropCollection(event, index, item)"
2016-03-16 00:15:38 +03:00
dnd-dragover="dragoverCollection(event, index)">
2016-02-28 03:43:56 +03:00
<a href="#/collections/{{ collection.id }}">
<span class="icon {{ collection.icon }}">
<text ng-if="collection.id=='today'"><?php p($_['DOM']); ?></text>
2015-07-19 15:05:29 +03:00
</span>
<span class="title">{{ collection.displayname }}</span>
</a>
<div class="app-navigation-entry-utils">
<ul>
<li class="app-navigation-entry-utils-counter">{{ getCollectionString(collection.id) | counterFormatter }}</li>
</ul>
</div>
</li>
2017-10-01 19:00:14 +03:00
<li id="list_{{ calendar.uri }}"
class="list with-menu handler"
2016-02-28 19:13:02 +03:00
calendarID="{{calendar.uri}}"
2016-02-26 00:27:45 +03:00
ng-repeat="calendar in calendars"
2016-08-11 15:26:19 +03:00
ng-class="{ active: calendar.uri==route.calendarID, edit:route.listparameter == 'name' && route.calendarID == calendar.uri,
caldav: route.listparameter == 'caldav' && route.calendarID == calendar.uri}"
2015-07-19 15:05:29 +03:00
dnd-list="draggedTasks"
dnd-drop="dropList(event, index, item)"
2016-03-16 00:15:38 +03:00
dnd-dragover="dragoverList(event, index)">
<a href="#/calendars/{{ calendar.uri }}" ng-dblclick="startRename(calendar)">
<span class="calendar-indicator" style="background-color: {{ calendar.color }};"></span>
2016-02-28 19:13:02 +03:00
<span class="title">{{ calendar.displayname }}</span>
</a>
<div class="app-navigation-entry-utils">
<ul>
2016-02-28 19:13:02 +03:00
<li class="app-navigation-entry-utils-counter">{{ getListCount(calendar.uri,'all') | counterFormatter }}</li>
<li class="app-navigation-entry-utils-menu-button" ng-show="calendar.writable"><button></button></li>
</ul>
</div>
2016-02-29 01:15:57 +03:00
<div class="app-navigation-entry-menu" ng-show="calendar.writable">
<ul>
2016-08-11 15:26:19 +03:00
<li>
2017-02-21 01:14:41 +03:00
<a ng-click="startEdit(calendar)">
<span class="icon-rename"></span>
2016-08-11 15:26:19 +03:00
<span><?php p($l->t('Edit')); ?></span>
2017-02-21 01:14:41 +03:00
</a>
2015-09-01 23:59:44 +03:00
</li>
2016-08-11 15:26:19 +03:00
<li>
2017-02-21 01:14:41 +03:00
<a ng-click="showCalDAVUrl(calendar)">
<span class="icon-public"></span>
<span><?php p($l->t('Link')); ?></span>
2017-02-21 01:14:41 +03:00
</a>
2016-08-11 15:26:19 +03:00
</li>
<li>
<a href="{{calendar.exportUrl}}" download="{{calendar.uri}}.ics">
<span class="icon-download"></span>
<span><?php p($l->t('Download')); ?></span>
2016-08-11 15:26:19 +03:00
</a>
</li>
2016-08-12 21:01:16 +03:00
<li confirmation="delete(calendar)" confirmation-message="deleteMessage(calendar)">
2015-09-01 23:59:44 +03:00
</li>
</ul>
</div>
2016-08-11 15:26:19 +03:00
<div class="app-navigation-entry-edit name" ng-class="{error: nameError}">
2015-06-11 10:34:38 +03:00
<form>
2017-10-01 19:00:14 +03:00
<input ng-model="calendar.displayname"
class="edit hasTooltip"
type="text"
ng-keyup="checkEdit($event,calendar)"
autofocus-on-insert>
<input type="cancel"
value=""
class="action icon-close"
ng-click="cancelEdit(calendar)"
title="<?php p($l->t('Cancel')); ?>">
<input type="submit"
value=""
class="action icon-checkmark"
ng-click="saveEdit(calendar)"
title="<?php p($l->t('Save')); ?>">
2015-06-11 10:34:38 +03:00
</form>
<colorpicker class="colorpicker"
selected="calendar.color">
</colorpicker>
2015-06-11 10:34:38 +03:00
</div>
2016-08-11 15:26:19 +03:00
<div class="app-navigation-entry-edit caldav">
<form>
2017-10-01 19:00:14 +03:00
<input class="caldav"
ng-value="calendar.caldav"
readonly
type="text"/>
<input type="cancel"
value=""
class="action icon-close"
ng-click="hideCalDAVUrl()"
title="<?php p($l->t('Cancel')); ?>">
2016-08-11 15:26:19 +03:00
</form>
</div>
</li>
2017-10-26 17:44:29 +03:00
<li class="newList handler reactive" ng-class="{edit: status.addingList}">
2017-10-01 19:00:14 +03:00
<a class="addlist"
ng-click="startCreate()"
oc-click-focus="{selector: '#newList', timeout: 0}">
<span class="icon icon-add"></span>
2015-06-14 21:57:09 +03:00
<span class="title"><?php p($l->t('Add List...')); ?></span>
</a>
2016-08-11 15:26:19 +03:00
<div class="app-navigation-entry-edit name" ng-class="{error: nameError}">
2015-06-14 21:57:09 +03:00
<form ng-disabled="isAddingList">
2017-10-01 19:00:14 +03:00
<input id="newList"
ng-model="status.newListName"
class="edit hasTooltip"
type="text"
autofocus-on-insert
placeholder="<?php p($l->t('New List')); ?>"
ng-keyup="checkNew($event,status.newListName)">
<input type="cancel"
value=""
class="action icon-close"
ng-click="cancelCreate()"
title="<?php p($l->t('Cancel')); ?>">
<input type="submit"
value=""
class="action icon-checkmark"
ng-click="create($event)"
title="<?php p($l->t('Save')); ?>">
2015-06-14 21:57:09 +03:00
</form>
2017-10-01 19:00:14 +03:00
<colorpicker class="colorpicker" selected="color"></colorpicker>
2015-06-14 21:57:09 +03:00
</div>
2015-06-11 10:34:38 +03:00
</li>
</ul>
<div id="app-settings" ng-controller="SettingsController">
<div id="app-settings-header">
2015-06-11 00:12:36 +03:00
<button class="settings-button" data-apps-slide-toggle="#app-settings-content">
<span><?php p($l->t('Settings')); ?></span>
</button>
</div>
<div id="app-settings-content">
<ul>
2015-07-12 20:35:18 +03:00
<li>
<label for="startOfWeek"><?php p($l->t('Start of week')); ?></label>
2017-10-01 19:00:14 +03:00
<select id="startOfWeek"
ng-change="setStartOfWeek()"
ng-model="settingsmodel.getById('various').startOfWeek"
ng-options="startOfWeekOption.id as startOfWeekOption.name for startOfWeekOption in startOfWeekOptions">
</select>
2015-07-12 20:35:18 +03:00
</li>
<li class="headline">
<?php p($l->t('Visibility of Smart Collections')); ?>
</li>
<li ng-repeat="collection in collections">
<div class="label-container">
2017-10-01 19:00:14 +03:00
<span class="icon {{ collection.icon }}">
<text ng-show="collection.id=='today'"><?php p($_['DOM']); ?></text>
</span>
<label for="visibilityCollection-{{collection.id}}" class="title">{{ collection.displayname }}</label>
</div>
2017-10-01 19:00:14 +03:00
<select id="visibilityCollection-{{collection.id}}"
ng-change="setVisibility(collection.id)"
ng-model="collection.show"
ng-options="collectionOption.id as collectionOption.name for collectionOption in collectionOptions">
</select>
</li>
</ul>
</div>
2014-03-28 23:11:56 +04:00
</div>
</div>
2017-10-01 19:00:14 +03:00
<div id="app-content"
ng-controller="TasksController"
ng-class="{'with-app-sidebar':route.taskID}">
<div class="content-wrapper">
2017-10-01 19:00:14 +03:00
<div id="add-task"
class="add-task handler"
ng-show="showInput()"
ng-class="{'focus':status.focusTaskInput}">
2015-07-19 15:05:29 +03:00
<form ng-submit="addTask(status.taskName)" name="addTaskForm">
2017-10-01 19:00:14 +03:00
<input id="target"
ng-disabled="isAddingTask"
ng-click="focusTaskInput()"
class="transparent"
placeholder="{{ getAddString() }}"
ng-model="status.taskName"
ng-keydown="checkTaskInput($event)"/>
</form>
</div>
2016-08-31 00:42:19 +03:00
<div class="app-navigation-entry-utils">
<div class="app-navigation-entry-utils-menu-button" title="<?php p($l->t('Change sort order')); ?>">
<button class="sortorder-dropdown-button">
2017-09-03 12:40:39 +03:00
<span class="icon" ng-class="getSortOrderIcon()"></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
</button>
2016-08-31 00:42:19 +03:00
</div>
</div>
<div class="app-navigation-entry-menu bubble sortorder-dropdown">
<ul>
2016-09-02 02:19:26 +03:00
<li ng-click="setSortOrder($event, 'default')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'default'}" class="handler">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-menu"></span>
<span class="label"><?php p($l->t('Default')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-08-31 00:42:19 +03:00
</li>
2016-09-02 02:19:26 +03:00
<li ng-click="setSortOrder($event, 'due')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'due'}">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-calendar"></span>
<span class="label"><?php p($l->t('Due date')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-08-31 00:42:19 +03:00
</li>
2016-09-02 02:19:26 +03:00
<li ng-click="setSortOrder($event, 'start')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'start'}">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-calendar"></span>
<span class="label"><?php p($l->t('Start date')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-08-31 00:42:19 +03:00
</li>
2016-09-02 02:19:26 +03:00
<li ng-click="setSortOrder($event, 'priority')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'priority'}">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-task-star"></span>
<span class="label"><?php p($l->t('Priority')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-08-31 00:42:19 +03:00
</li>
2016-09-02 02:19:26 +03:00
<li ng-click="setSortOrder($event, 'alphabetically')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'alphabetically'}">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-alphabetically"></span>
<span class="label"><?php p($l->t('Alphabetically')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-08-31 00:42:19 +03:00
</li>
2016-09-03 00:04:04 +03:00
<!-- <li ng-click="setSortOrder($event, 'manual')" ng-class="{active: settingsmodel.getById('various').sortOrder == 'manual'}">
2017-02-21 01:47:28 +03:00
<a>
<span class="icon icon-manual"></span>
<span class="label"><?php p($l->t('Manually')); ?></span>
<span class="icon sort-indicator" ng-class="{'icon-sort-up': settingsmodel.getById('various').sortDirection, 'icon-sort-down': !settingsmodel.getById('various').sortDirection}"></span>
2017-02-21 01:47:28 +03:00
</a>
2016-09-03 00:04:04 +03:00
</li> -->
2016-08-31 00:42:19 +03:00
</ul>
</div>
<div class="task-list">
<?php print_unescaped($this->inc('part.tasklist')); ?>
<?php print_unescaped($this->inc('part.collectionall')); ?>
<?php print_unescaped($this->inc('part.collectionweek')); ?>
<div id="searchresults"></div>
2015-02-25 23:14:44 +03:00
<div class="task-item template">
<div class="task-body">
<div class="percentdone"></div>
<a class="task-checkbox" name="toggleCompleted" ng-click="toggleCompleted()">
2015-02-25 23:14:44 +03:00
<span class="icon task-checkbox"></span>
</a>
<a class="icon task-separator"></a>
<a class="task-star" ng-click="toggleStarred(task.id)">
2015-02-25 23:14:44 +03:00
<span class="icon task-star faded"></span>
</a>
<a class="duedate" ng-class="{overdue: TasksModel.overdue(task.due)}">{{ task.due | dateTaskList }}</a>
<div class="title-wrapper">
<span class="title"></span>
<span class="icon task-attachment"></span>
</div>
</div>
</div>
</div>
2014-03-28 23:11:56 +04:00
</div>
2017-03-01 23:49:50 +03:00
<div id="app-sidebar" ng-class="{'disappear':!route.taskID}">
2017-09-19 09:55:06 +03:00
<?php print_unescaped($this->inc('part.details')); ?>
2014-03-28 23:11:56 +04:00
</div>
</div>
2015-07-19 15:05:29 +03:00
<script type="text/ng-template" id="part.taskbody">
<?php print_unescaped($this->inc('part.taskbody')); ?>
</script>
2015-05-28 18:33:21 +03:00
</div>