summaryrefslogtreecommitdiffstats
path: root/apps/tasks/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tasks/templates')
-rw-r--r--apps/tasks/templates/part.addtaskform.php15
-rw-r--r--apps/tasks/templates/part.details.php42
-rw-r--r--apps/tasks/templates/part.edittaskform.php5
-rw-r--r--apps/tasks/templates/part.property.php22
-rw-r--r--apps/tasks/templates/part.taskform.php36
-rw-r--r--apps/tasks/templates/part.tasks.php3
-rw-r--r--apps/tasks/templates/tasks.php31
7 files changed, 154 insertions, 0 deletions
diff --git a/apps/tasks/templates/part.addtaskform.php b/apps/tasks/templates/part.addtaskform.php
new file mode 100644
index 00000000000..0fad5592aa7
--- /dev/null
+++ b/apps/tasks/templates/part.addtaskform.php
@@ -0,0 +1,15 @@
+<form id="tasks_addtaskform">
+ <?php if(count($_['calendars'])==1): ?>
+ <input type="hidden" name="id" value="<?php echo $_['calendars'][0]['id']; ?>">
+ <?php else: ?>
+ <label for="id"><?php echo $l->t('Calendar'); ?></label>
+ <select name="id" size="1">
+ <?php foreach($_['calendars'] as $calendar): ?>
+ <option value="<?php echo $calendar['id']; ?>"><?php echo $calendar['displayname']; ?></option>
+ <?php endforeach; ?>
+ </select>
+ <br>
+ <?php endif; ?>
+ <?php echo $this->inc('part.taskform'); ?>
+ <input type="submit" name="submit" value="<?php echo $l->t('Create Task'); ?>">
+</form>
diff --git a/apps/tasks/templates/part.details.php b/apps/tasks/templates/part.details.php
new file mode 100644
index 00000000000..89636b6e762
--- /dev/null
+++ b/apps/tasks/templates/part.details.php
@@ -0,0 +1,42 @@
+<?php if(isset($_['details']->SUMMARY)): ?>
+<table>
+<?php
+echo $this->inc('part.property', array('label' => $l->t('Summary'), 'property' => $_['details']->SUMMARY));
+if(isset($_['details']->LOCATION)):
+ echo $this->inc('part.property', array('label' => $l->t('Location'), 'property' => $_['details']->LOCATION));
+endif;
+if(isset($_['details']->CATEGORIES)):
+ echo $this->inc('part.property', array('label' => $l->t('Categories'), 'property' => $_['details']->CATEGORIES));
+endif;
+if(isset($_['details']->DUE)):
+ echo $this->inc('part.property', array('label' => $l->t('Due'), 'property' => $_['details']->DUE[0]));
+endif;
+if(isset($_['details']->PRIORITY)):
+ echo $this->inc('part.property', array('label' => $l->t('Priority'), 'property' => $_['details']->PRIORITY[0], 'options' => $_['priority_options']));
+endif;
+if($_['details']->__isset('PERCENT-COMPLETE') || isset($_['details']->COMPLETED)):
+?>
+<tr>
+ <th>
+ <?php echo $l->t('Complete') ?>
+ </th>
+ <td>
+<?php if($_['details']->__isset('PERCENT-COMPLETE')):
+ echo $_['details']->__get('PERCENT-COMPLETE')->value.' % ';
+ endif;
+ if(isset($_['details']->COMPLETED)):
+ echo $l->t('on '). $l->l('datetime', $_['details']->COMPLETED[0]->getDateTime());
+ endif;
+ echo '</tr>';
+endif;
+if(isset($_['details']->DESCRIPTION)):
+ echo $this->inc('part.property', array('label' => $l->t('Description'), 'property' => $_['details']->DESCRIPTION));
+endif; ?>
+</table>
+<form>
+ <input type="button" id="tasks_delete" value="<?php echo $l->t('Delete');?>">
+ <input type="button" id="tasks_edit" value="<?php echo $l->t('Edit');?>">
+</form>
+<?php else: ?>
+<?php //var_dump($_['details']); ?>
+<?php endif ?>
diff --git a/apps/tasks/templates/part.edittaskform.php b/apps/tasks/templates/part.edittaskform.php
new file mode 100644
index 00000000000..fe123f07ac6
--- /dev/null
+++ b/apps/tasks/templates/part.edittaskform.php
@@ -0,0 +1,5 @@
+<form id="tasks_edittaskform">
+ <input type="hidden" name="id" value="<?php echo $_['id']; ?>">
+ <?php echo $this->inc('part.taskform'); ?>
+ <input type="submit" name="submit" value="<?php echo $l->t('Update Task'); ?>">
+</form>
diff --git a/apps/tasks/templates/part.property.php b/apps/tasks/templates/part.property.php
new file mode 100644
index 00000000000..591fd363e6f
--- /dev/null
+++ b/apps/tasks/templates/part.property.php
@@ -0,0 +1,22 @@
+<tr>
+ <th>
+ <?php echo $_['label'] ?>
+ </th>
+ <td>
+ <?php
+ switch (get_class($_['property']))
+ {
+ case 'Sabre_VObject_Element_DateTime':
+ echo $l->l('datetime', $_['property']->getDateTime());
+ break;
+ default:
+ $value = $_['property']->value;
+ if (isset($_['options']))
+ {
+ $value = $_['options'][$value];
+ }
+ echo nl2br($value);
+ }
+ ?>
+ </td>
+</tr>
diff --git a/apps/tasks/templates/part.taskform.php b/apps/tasks/templates/part.taskform.php
new file mode 100644
index 00000000000..da984d830bd
--- /dev/null
+++ b/apps/tasks/templates/part.taskform.php
@@ -0,0 +1,36 @@
+ <label for="summary"><?php echo $l->t('Summary'); ?></label>
+ <input type="text" id="summary" name="summary" placeholder="<?php echo $l->t('Summary of the task');?>" value="<?php echo isset($_['details']->SUMMARY) ? $_['details']->SUMMARY[0]->value : '' ?>">
+ <br>
+ <label for="location"><?php echo $l->t('Location'); ?></label>
+ <input type="text" id="location" name="location" placeholder="<?php echo $l->t('Location of the task');?>" value="<?php echo isset($_['details']->LOCATION) ? $_['details']->LOCATION[0]->value : '' ?>">
+ <br>
+ <label for="categories"><?php echo $l->t('Categories'); ?></label>
+ <input id="categories" name="categories" type="text" placeholder="<?php echo $l->t('Separate categories with commas'); ?>" value="<?php echo isset($_['categories']) ? htmlspecialchars($_['categories']) : '' ?>">
+ <a class="action edit" onclick="$(this).tipsy('hide');OCCategories.edit();" title="<?php echo $l->t('Edit categories'); ?>"><img alt="<?php echo $l->t('Edit categories'); ?>" src="<?php echo image_path('core','actions/rename.svg')?>" class="svg action" style="width: 16px; height: 16px;"></a>
+ <br>
+ <label for="due"><?php echo $l->t('Due'); ?></label>
+ <input type="text" id="due" name="due" placeholder="<?php echo $l->t('Due date') ?>" value="<?php echo isset($_['details']->DUE) ? $l->l('datetime', $_['details']->DUE[0]->getDateTime()) : '' ?>">
+ <br>
+ <select name="percent_complete" id="percent_complete">
+ <?php
+ foreach($_['percent_options'] as $percent){
+ echo '<option value="' . $percent . '"' . (($_['details']->__get('PERCENT-COMPLETE') && $percent == $_['details']->__get('PERCENT-COMPLETE')->value) ? ' selected="selected"' : '') . '>' . $percent . ' %</option>';
+ }
+ ?>
+ </select>
+ <label for="percent_complete"><?php echo $l->t('Complete'); ?></label>
+ <span id="complete"<?php echo ($_['details']->__get('PERCENT-COMPLETE') && $_['details']->__get('PERCENT-COMPLETE')->value == 100) ? '' : ' style="display:none;"' ?>><label for="completed"><?php echo $l->t('completed on'); ?></label>
+ <input type="text" id="completed" name="completed" value="<?php echo isset($_['details']->COMPLETED) ? $l->l('datetime', $_['details']->COMPLETED[0]->getDateTime()) : '' ?>"></span>
+ <br>
+ <label for="priority"><?php echo $l->t('Priority'); ?></label>
+ <select name="priority">
+ <?php
+ foreach($_['priority_options'] as $priority => $label){
+ echo '<option value="' . $priority . '"' . ((isset($_['details']->PRIORITY) && $priority == $_['details']->PRIORITY->value) ? ' selected="selected"' : '') . '>' . $label . '</option>';
+ }
+ ?>
+ </select>
+ <br>
+ <label for="description"><?php echo $l->t('Description'); ?></label><br>
+ <textarea placeholder="<?php echo $l->t('Description of the task');?>" name="description"><?php echo isset($_['details']->DESCRIPTION) ? $_['details']->DESCRIPTION[0]->value : '' ?></textarea>
+ <br>
diff --git a/apps/tasks/templates/part.tasks.php b/apps/tasks/templates/part.tasks.php
new file mode 100644
index 00000000000..50be1cd6bed
--- /dev/null
+++ b/apps/tasks/templates/part.tasks.php
@@ -0,0 +1,3 @@
+<?php foreach( $_['tasks'] as $task ): ?>
+ <li data-id="<?php echo $task['id']; ?>"><a href="index.php?id=<?php echo $task['id']; ?>"><?php echo $task['name']; ?></a> </li>
+<?php endforeach; ?>
diff --git a/apps/tasks/templates/tasks.php b/apps/tasks/templates/tasks.php
new file mode 100644
index 00000000000..98698400797
--- /dev/null
+++ b/apps/tasks/templates/tasks.php
@@ -0,0 +1,31 @@
+<div id="controls">
+ <input type="text" id="tasks_newtask">
+ <input type="button" id="tasks_addtask" value="<?php echo $l->t('Add Task'); ?>">
+ <input type="button" id="tasks_order_due" value="<?php echo $l->t('Order Due'); ?>">
+ <input type="button" id="tasks_order_category" value="<?php echo $l->t('Order Category'); ?>">
+ <input type="button" id="tasks_order_complete" value="<?php echo $l->t('Order Complete'); ?>">
+ <input type="button" id="tasks_order_location" value="<?php echo $l->t('Order Location'); ?>">
+ <input type="button" id="tasks_order_prio" value="<?php echo $l->t('Order Priority'); ?>">
+ <input type="button" id="tasks_order_label" value="<?php echo $l->t('Order Label'); ?>">
+</div>
+<div id="tasks_lists" class="leftcontent">
+ <div class="all">All</div>
+ <div class="done">Done</div>
+</div>
+<div id="tasks_list" class="rightcontent">
+<p class="loading"><?php echo $l->t('Loading tasks...') ?></p>
+</div>
+<p id="task_actions_template" class="task_actions">
+ <!-- span class="task_star">
+ <img title="<?php echo $l->t('Important') ?>" src="<?php echo image_path('core', 'actions/add.svg') ?>" class="svg"><?php echo $l->t('Important') ?>
+ </span -->
+ <span class="task_more">
+ <img title="<?php echo $l->t('More') ?>" src="<?php echo image_path('core', 'actions/triangle-s.svg') ?>" class="svg"><?php echo $l->t('More') ?>
+ </span>
+ <span class="task_less">
+ <img title="<?php echo $l->t('Less') ?>" src="<?php echo image_path('core', 'actions/triangle-n.svg') ?>" class="svg"><?php echo $l->t('Less') ?>
+ </span>
+</p>
+<script type='text/javascript'>
+var categories = <?php echo json_encode($_['categories']); ?>;
+</script>