diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/action_index.php | 2 | ||||
-rw-r--r-- | templates/action_params.php | 3 | ||||
-rw-r--r-- | templates/board_index.php | 6 | ||||
-rw-r--r-- | templates/board_public.php | 11 | ||||
-rw-r--r-- | templates/board_show.php | 13 | ||||
-rw-r--r-- | templates/category_edit.php | 24 | ||||
-rw-r--r-- | templates/category_index.php | 48 | ||||
-rw-r--r-- | templates/category_remove.php | 16 | ||||
-rw-r--r-- | templates/project_index.php | 3 | ||||
-rw-r--r-- | templates/project_search.php | 4 | ||||
-rw-r--r-- | templates/project_tasks.php | 4 | ||||
-rw-r--r-- | templates/task_edit.php | 3 | ||||
-rw-r--r-- | templates/task_new.php | 3 | ||||
-rw-r--r-- | templates/task_show.php | 5 |
14 files changed, 144 insertions, 1 deletions
diff --git a/templates/action_index.php b/templates/action_index.php index eccc0ec4..b515ccaa 100644 --- a/templates/action_index.php +++ b/templates/action_index.php @@ -36,6 +36,8 @@ <?= Helper\in_list($param['value'], $projects_list) ?> <?php elseif (Helper\contains($param['name'], 'color_id')): ?> <?= Helper\in_list($param['value'], $colors_list) ?> + <?php elseif (Helper\contains($param['name'], 'category_id')): ?> + <?= Helper\in_list($param['value'], $categories_list) ?> <?php endif ?> </strong> </li> diff --git a/templates/action_params.php b/templates/action_params.php index ed9d8b8f..15a1d420 100644 --- a/templates/action_params.php +++ b/templates/action_params.php @@ -28,6 +28,9 @@ <?php elseif (Helper\contains($param_name, 'color_id')): ?> <?= Helper\form_label($param_desc, $param_name) ?> <?= Helper\form_select('params['.$param_name.']', $colors_list, $values) ?><br/> + <?php elseif (Helper\contains($param_name, 'category_id')): ?> + <?= Helper\form_label($param_desc, $param_name) ?> + <?= Helper\form_select('params['.$param_name.']', $categories_list, $values) ?><br/> <?php endif ?> <?php endforeach ?> diff --git a/templates/board_index.php b/templates/board_index.php index 523e3392..989c2e06 100644 --- a/templates/board_index.php +++ b/templates/board_index.php @@ -21,6 +21,10 @@ <?= t('Filter by user') ?> <?= Helper\form_select('user_id', $users, $filters) ?> </li> + <li> + <?= t('Filter by category') ?> + <?= Helper\form_select('category_id', $categories, $filters) ?> + </li> <li><a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a></li> <li><a href="?controller=project&action=search&project_id=<?= $current_project_id ?>"><?= t('Search') ?></a></li> <li><a href="?controller=project&action=tasks&project_id=<?= $current_project_id ?>"><?= t('Completed tasks') ?></a></li> @@ -30,7 +34,7 @@ <?php if (empty($board)): ?> <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> <?php else: ?> - <?= Helper\template('board_show', array('current_project_id' => $current_project_id, 'board' => $board)) ?> + <?= Helper\template('board_show', array('current_project_id' => $current_project_id, 'board' => $board, 'categories' => $categories)) ?> <?php endif ?> </section> diff --git a/templates/board_public.php b/templates/board_public.php index 2c2381ef..0808079e 100644 --- a/templates/board_public.php +++ b/templates/board_public.php @@ -39,7 +39,17 @@ <?= Helper\escape($task['title']) ?> </div> + <?php if ($task['category_id']): ?> + <div class="task-category-container"> + <span class="task-category"> + <?= Helper\in_list($task['category_id'], $categories) ?> + </span> + </div> + <?php endif ?> + + <?php if (! empty($task['date_due']) || ! empty($task['nb_comments']) || ! empty($task['description'])): ?> <div class="task-footer"> + <?php if (! empty($task['date_due'])): ?> <div class="task-date"> <?= dt('%B %e, %G', $task['date_due']) ?> @@ -56,6 +66,7 @@ <?php endif ?> </div> </div> + <?php endif ?> </div> <?php endforeach ?> diff --git a/templates/board_show.php b/templates/board_show.php index ad459399..719e3bdd 100644 --- a/templates/board_show.php +++ b/templates/board_show.php @@ -29,6 +29,7 @@ <div class="task draggable-item task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" + data-category-id="<?= $task['category_id'] ?>" data-due-date="<?= $task['date_due'] ?>" title="<?= t('View this task') ?>"> @@ -50,7 +51,17 @@ <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a> </div> + <?php if ($task['category_id']): ?> + <div class="task-category-container"> + <span class="task-category"> + <?= Helper\in_list($task['category_id'], $categories) ?> + </span> + </div> + <?php endif ?> + + <?php if (! empty($task['date_due']) || ! empty($task['nb_comments']) || ! empty($task['description'])): ?> <div class="task-footer"> + <?php if (! empty($task['date_due'])): ?> <div class="task-date"> <?= dt('%B %e, %G', $task['date_due']) ?> @@ -67,6 +78,8 @@ <?php endif ?> </div> </div> + <?php endif ?> + </div> <?php endforeach ?> </td> diff --git a/templates/category_edit.php b/templates/category_edit.php new file mode 100644 index 00000000..99ba0c7c --- /dev/null +++ b/templates/category_edit.php @@ -0,0 +1,24 @@ +<section id="main"> + <div class="page-header"> + <h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2> + <ul> + <li><a href="?controller=project"><?= t('All projects') ?></a></li> + </ul> + </div> + <section> + + <form method="post" action="?controller=category&action=update&project_id=<?= $project['id'] ?>" autocomplete="off"> + + <?= Helper\form_hidden('id', $values) ?> + <?= Helper\form_hidden('project_id', $values) ?> + + <?= Helper\form_label(t('Category Name'), 'name') ?> + <?= Helper\form_text('name', $values, $errors, array('required')) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> + </form> + + </section> +</section>
\ No newline at end of file diff --git a/templates/category_index.php b/templates/category_index.php new file mode 100644 index 00000000..db986143 --- /dev/null +++ b/templates/category_index.php @@ -0,0 +1,48 @@ +<section id="main"> + <div class="page-header"> + <h2><?= t('Categories for the project "%s"', $project['name']) ?></h2> + <ul> + <li><a href="?controller=project"><?= t('All projects') ?></a></li> + </ul> + </div> + <section> + + <?php if (! empty($categories)): ?> + <table> + <tr> + <th><?= t('Category Name') ?></th> + <th><?= t('Actions') ?></th> + </tr> + <?php foreach ($categories as $category_id => $category_name): ?> + <tr> + <td><?= Helper\escape($category_name) ?></td> + <td> + <ul> + <li> + <a href="?controller=category&action=edit&project_id=<?= $project['id'] ?>&category_id=<?= $category_id ?>"><?= t('Edit') ?></a> + </li> + <li> + <a href="?controller=category&action=confirm&project_id=<?= $project['id'] ?>&category_id=<?= $category_id ?>"><?= t('Remove') ?></a> + </li> + </ul> + </td> + </tr> + <?php endforeach ?> + </table> + <?php endif ?> + + <h3><?= t('Add a new category') ?></h3> + <form method="post" action="?controller=category&action=save&project_id=<?= $project['id'] ?>" autocomplete="off"> + + <?= Helper\form_hidden('project_id', $values) ?> + + <?= Helper\form_label(t('Category Name'), 'name') ?> + <?= Helper\form_text('name', $values, $errors, array('required')) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> + </form> + + </section> +</section>
\ No newline at end of file diff --git a/templates/category_remove.php b/templates/category_remove.php new file mode 100644 index 00000000..cc2eb678 --- /dev/null +++ b/templates/category_remove.php @@ -0,0 +1,16 @@ +<section id="main"> + <div class="page-header"> + <h2><?= t('Remove a category') ?></h2> + </div> + + <div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this category: "%s"?', $category['name']) ?> + </p> + + <div class="form-actions"> + <a href="?controller=category&action=remove&project_id=<?= $project['id'] ?>&category_id=<?= $category['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> + <?= t('or') ?> <a href="?controller=category&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a> + </div> + </div> +</section>
\ No newline at end of file diff --git a/templates/project_index.php b/templates/project_index.php index c7c7d226..df153fe7 100644 --- a/templates/project_index.php +++ b/templates/project_index.php @@ -60,6 +60,9 @@ <td> <ul> <li> + <a href="?controller=category&action=index&project_id=<?= $project['id'] ?>"><?= t('Categories') ?></a> + </li> + <li> <a href="?controller=project&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a> </li> <li> diff --git a/templates/project_search.php b/templates/project_search.php index ee1e5025..3594fd09 100644 --- a/templates/project_search.php +++ b/templates/project_search.php @@ -28,6 +28,7 @@ <tr> <th><?= t('Id') ?></th> <th><?= t('Column') ?></th> + <th><?= t('Category') ?></th> <th><?= t('Title') ?></th> <th><?= t('Assignee') ?></th> <th><?= t('Due date') ?></th> @@ -44,6 +45,9 @@ <?= Helper\in_list($task['column_id'], $columns) ?> </td> <td> + <?= Helper\in_list($task['category_id'], $categories, '') ?> + </td> + <td> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a> <div class="task-table-icons"> <?php if (! empty($task['nb_comments'])): ?> diff --git a/templates/project_tasks.php b/templates/project_tasks.php index 2c152497..9f4263b8 100644 --- a/templates/project_tasks.php +++ b/templates/project_tasks.php @@ -15,6 +15,7 @@ <tr> <th><?= t('Id') ?></th> <th><?= t('Column') ?></th> + <th><?= t('Category') ?></th> <th><?= t('Title') ?></th> <th><?= t('Assignee') ?></th> <th><?= t('Due date') ?></th> @@ -30,6 +31,9 @@ <?= Helper\in_list($task['column_id'], $columns) ?> </td> <td> + <?= Helper\in_list($task['category_id'], $categories, '') ?> + </td> + <td> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a> <div class="task-table-icons"> <?php if (! empty($task['nb_comments'])): ?> diff --git a/templates/task_edit.php b/templates/task_edit.php index 0c19db38..8c8bc107 100644 --- a/templates/task_edit.php +++ b/templates/task_edit.php @@ -24,6 +24,9 @@ <?= Helper\form_label(t('Assignee'), 'owner_id') ?> <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/> + <?= Helper\form_label(t('Category'), 'category_id') ?> + <?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/> + <?= Helper\form_label(t('Column'), 'column_id') ?> <?= Helper\form_select('column_id', $columns_list, $values, $errors) ?><br/> diff --git a/templates/task_new.php b/templates/task_new.php index cf320e72..d233efd2 100644 --- a/templates/task_new.php +++ b/templates/task_new.php @@ -25,6 +25,9 @@ <?= Helper\form_label(t('Assignee'), 'owner_id') ?> <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/> + <?= Helper\form_label(t('Category'), 'category_id') ?> + <?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/> + <?= Helper\form_label(t('Column'), 'column_id') ?> <?= Helper\form_select('column_id', $columns_list, $values, $errors) ?><br/> diff --git a/templates/task_show.php b/templates/task_show.php index f0cea410..a5b79359 100644 --- a/templates/task_show.php +++ b/templates/task_show.php @@ -31,6 +31,11 @@ <strong><?= Helper\escape($task['column_title']) ?></strong> (<?= Helper\escape($task['project_name']) ?>) </li> + <?php if ($task['category_name']): ?> + <li> + <?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong> + </li> + <?php endif ?> <li> <?php if ($task['is_active'] == 1): ?> <?= t('Status is open') ?> |