diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-22 12:28:28 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-22 12:28:28 -0400 |
commit | 2230dd4e6b148346c0ec596b9e3e12996a762ed8 (patch) | |
tree | ef99ccde4f8b18592a3fb06a6ec45162c501fe38 /templates | |
parent | a750b8ab2a0cb715da6fd9025a7ec8375db68a4d (diff) |
Code refactoring (add autoloader and change files organization)
Diffstat (limited to 'templates')
41 files changed, 0 insertions, 1661 deletions
diff --git a/templates/.htaccess b/templates/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all
\ No newline at end of file diff --git a/templates/action_index.php b/templates/action_index.php deleted file mode 100644 index b515ccaa..00000000 --- a/templates/action_index.php +++ /dev/null @@ -1,77 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - - <?php if (! empty($actions)): ?> - - <h3><?= t('Defined actions') ?></h3> - <table> - <tr> - <th><?= t('Event name') ?></th> - <th><?= t('Action name') ?></th> - <th><?= t('Action parameters') ?></th> - <th><?= t('Action') ?></th> - </tr> - - <?php foreach ($actions as $action): ?> - <tr> - <td><?= Helper\in_list($action['event_name'], $available_events) ?></td> - <td><?= Helper\in_list($action['action_name'], $available_actions) ?></td> - <td> - <ul> - <?php foreach ($action['params'] as $param): ?> - <li> - <?= Helper\in_list($param['name'], $available_params) ?> = - <strong> - <?php if (Helper\contains($param['name'], 'column_id')): ?> - <?= Helper\in_list($param['value'], $columns_list) ?> - <?php elseif (Helper\contains($param['name'], 'user_id')): ?> - <?= Helper\in_list($param['value'], $users_list) ?> - <?php elseif (Helper\contains($param['name'], 'project_id')): ?> - <?= 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> - <?php endforeach ?> - </ul> - </td> - <td> - <a href="?controller=action&action=confirm&action_id=<?= $action['id'] ?>"><?= t('Remove') ?></a> - </td> - </tr> - <?php endforeach ?> - - </table> - - <?php endif ?> - - <h3><?= t('Add an action') ?></h3> - <form method="post" action="?controller=action&action=params&project_id=<?= $project['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('project_id', $values) ?> - - <?= Helper\form_label(t('Event'), 'event_name') ?> - <?= Helper\form_select('event_name', $available_events, $values) ?><br/> - - <?= Helper\form_label(t('Action'), 'action_name') ?> - <?= Helper\form_select('action_name', $available_actions, $values) ?><br/> - - <div class="form-help"> - <?= t('When the selected event occurs execute the corresponding action.') ?> - </div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/action_params.php b/templates/action_params.php deleted file mode 100644 index 15a1d420..00000000 --- a/templates/action_params.php +++ /dev/null @@ -1,43 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - - <h3><?= t('Define action parameters') ?></h3> - <form method="post" action="?controller=action&action=create&project_id=<?= $project['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('project_id', $values) ?> - <?= Helper\form_hidden('event_name', $values) ?> - <?= Helper\form_hidden('action_name', $values) ?> - - <?php foreach ($action_params as $param_name => $param_desc): ?> - - <?php if (Helper\contains($param_name, 'column_id')): ?> - <?= Helper\form_label($param_desc, $param_name) ?> - <?= Helper\form_select('params['.$param_name.']', $columns_list, $values) ?><br/> - <?php elseif (Helper\contains($param_name, 'user_id')): ?> - <?= Helper\form_label($param_desc, $param_name) ?> - <?= Helper\form_select('params['.$param_name.']', $users_list, $values) ?><br/> - <?php elseif (Helper\contains($param_name, 'project_id')): ?> - <?= Helper\form_label($param_desc, $param_name) ?> - <?= Helper\form_select('params['.$param_name.']', $projects_list, $values) ?><br/> - <?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 ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save this action') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/action_remove.php b/templates/action_remove.php deleted file mode 100644 index b90136e8..00000000 --- a/templates/action_remove.php +++ /dev/null @@ -1,16 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove an automatic action') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this action: "%s"?', Helper\in_list($action['event_name'], $available_events).'/'.Helper\in_list($action['action_name'], $available_actions)) ?> - </p> - - <div class="form-actions"> - <a href="?controller=action&action=remove&action_id=<?= $action['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=action&action=index&project_id=<?= $action['project_id'] ?>"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file diff --git a/templates/app_notfound.php b/templates/app_notfound.php deleted file mode 100644 index 734d16a4..00000000 --- a/templates/app_notfound.php +++ /dev/null @@ -1,9 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Page not found') ?></h2> - </div> - - <p class="alert alert-error"> - <?= t('Sorry, I didn\'t found this information in my database!') ?> - </p> -</section>
\ No newline at end of file diff --git a/templates/board_assign.php b/templates/board_assign.php deleted file mode 100644 index 74448a5c..00000000 --- a/templates/board_assign.php +++ /dev/null @@ -1,35 +0,0 @@ -<section id="main"> - - <div class="page-header board"> - <h2> - <?= t('Project "%s"', $current_project_name) ?> - </h2> - <ul> - <?php foreach ($projects as $project_id => $project_name): ?> - <?php if ($project_id != $current_project_id): ?> - <li> - <a href="?controller=board&action=show&project_id=<?= $project_id ?>"><?= Helper\escape($project_name) ?></a> - </li> - <?php endif ?> - <?php endforeach ?> - </ul> - </div> - - <section> - <h3><?= t('Change assignee for the task "%s"', $values['title']) ?></h3> - <form method="post" action="?controller=board&action=assignTask" autocomplete="off"> - - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> - - <?= Helper\form_label(t('Assignee'), 'owner_id') ?> - <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=board&action=show&project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a> - </div> - </form> - </section> - -</div>
\ No newline at end of file diff --git a/templates/board_edit.php b/templates/board_edit.php deleted file mode 100644 index 575536a8..00000000 --- a/templates/board_edit.php +++ /dev/null @@ -1,66 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Edit the board for "%s"', $project['name']) ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - - <h3><?= t('Change columns') ?></h3> - <form method="post" action="?controller=board&action=update&project_id=<?= $project['id'] ?>" autocomplete="off"> - - <?php $i = 0; ?> - <table> - <tr> - <th><?= t('Position') ?></th> - <th><?= t('Column title') ?></th> - <th><?= t('Task limit') ?></th> - <th><?= t('Actions') ?></th> - </tr> - <?php foreach ($columns as $column): ?> - <tr> - <td><?= Helper\form_label(t('Column %d', ++$i), 'title['.$column['id'].']', array('title="column_id='.$column['id'].'"')) ?></td> - <td><?= Helper\form_text('title['.$column['id'].']', $values, $errors, array('required')) ?></td> - <td><?= Helper\form_number('task_limit['.$column['id'].']', $values, $errors, array('placeholder="'.t('limit').'"')) ?></td> - <td> - <ul> - <?php if ($column['position'] != 1): ?> - <li> - <a href="?controller=board&action=moveUp&project_id=<?= $project['id'] ?>&column_id=<?= $column['id'] ?>"><?= t('Move Up') ?></a> - </li> - <?php endif ?> - <?php if ($column['position'] != count($columns)): ?> - <li> - <a href="?controller=board&action=moveDown&project_id=<?= $project['id'] ?>&column_id=<?= $column['id'] ?>"><?= t('Move Down') ?></a> - </li> - <?php endif ?> - <li> - <a href="?controller=board&action=confirm&project_id=<?= $project['id'] ?>&column_id=<?= $column['id'] ?>"><?= t('Remove') ?></a> - </li> - </ul> - </td> - </tr> - <?php endforeach ?> - </table> - - <div class="form-actions"> - <input type="submit" value="<?= t('Update') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - - <h3><?= t('Add a new column') ?></h3> - <form method="post" action="?controller=board&action=add&project_id=<?= $project['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('project_id', $values) ?> - <?= Helper\form_label(t('Title'), 'title') ?> - <?= Helper\form_text('title', $values, $errors, array('required')) ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Add this column') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/board_index.php b/templates/board_index.php deleted file mode 100644 index 989c2e06..00000000 --- a/templates/board_index.php +++ /dev/null @@ -1,42 +0,0 @@ -<section id="main"> - - <div class="page-header board"> - <h2> - <?= t('Project "%s"', $current_project_name) ?> - </h2> - <ul> - <?php foreach ($projects as $project_id => $project_name): ?> - <?php if ($project_id != $current_project_id): ?> - <li> - <a href="?controller=board&action=show&project_id=<?= $project_id ?>"><?= Helper\escape($project_name) ?></a> - </li> - <?php endif ?> - <?php endforeach ?> - </ul> - </div> - - <div class="project-menu"> - <ul> - <li> - <?= 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> - </ul> - </div> - - <?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, 'categories' => $categories)) ?> - <?php endif ?> - -</section> - -<script type="text/javascript" src="assets/js/board.js"></script> diff --git a/templates/board_public.php b/templates/board_public.php deleted file mode 100644 index 0808079e..00000000 --- a/templates/board_public.php +++ /dev/null @@ -1,79 +0,0 @@ -<section id="main" class="public-board"> - - <?php if (empty($columns)): ?> - <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> - <?php else: ?> - <table id="board"> - <tr> - <?php $column_with = round(100 / count($columns), 2); ?> - <?php foreach ($columns as $column): ?> - <th width="<?= $column_with ?>%"> - <?= Helper\escape($column['title']) ?> - <?php if ($column['task_limit']): ?> - <span title="<?= t('Task limit') ?>" class="task-limit">(<?= Helper\escape(count($column['tasks']).'/'.$column['task_limit']) ?>)</span> - <?php endif ?> - </th> - <?php endforeach ?> - </tr> - <tr> - <?php foreach ($columns as $column): ?> - <td class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>"> - <?php foreach ($column['tasks'] as $task): ?> - <div class="task task-<?= $task['color_id'] ?>"> - - #<?= $task['id'] ?> - - - <span class="task-user"> - <?php if (! empty($task['owner_id'])): ?> - <?= t('Assigned to %s', $task['username']) ?> - <?php else: ?> - <span class="task-nobody"><?= t('Nobody assigned') ?></span> - <?php endif ?> - </span> - - <?php if ($task['score']): ?> - <span class="task-score"><?= Helper\escape($task['score']) ?></span> - <?php endif ?> - - <div class="task-title"> - <?= 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']) ?> - </div> - <?php endif ?> - - <div class="task-icons"> - <?php if (! empty($task['nb_comments'])): ?> - <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i> - <?php endif ?> - - <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> - <?php endif ?> - </div> - </div> - <?php endif ?> - - </div> - <?php endforeach ?> - </td> - <?php endforeach ?> - </tr> - </table> - <?php endif ?> - -</section>
\ No newline at end of file diff --git a/templates/board_remove.php b/templates/board_remove.php deleted file mode 100644 index b406eb38..00000000 --- a/templates/board_remove.php +++ /dev/null @@ -1,17 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove a column') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this column: "%s"?', $column['title']) ?> - <?= t('This action will REMOVE ALL TASKS associated to this column!') ?> - </p> - - <div class="form-actions"> - <a href="?controller=board&action=remove&column_id=<?= $column['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=board&action=edit&project_id=<?= $column['project_id'] ?>"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file diff --git a/templates/board_show.php b/templates/board_show.php deleted file mode 100644 index 719e3bdd..00000000 --- a/templates/board_show.php +++ /dev/null @@ -1,88 +0,0 @@ -<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= BOARD_CHECK_INTERVAL ?>"> -<tr> - <?php $column_with = round(100 / count($board), 2); ?> - <?php foreach ($board as $column): ?> - <th width="<?= $column_with ?>%"> - <a href="?controller=task&action=create&project_id=<?= $column['project_id'] ?>&column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a> - <?= Helper\escape($column['title']) ?> - <?php if ($column['task_limit']): ?> - <span title="<?= t('Task limit') ?>" class="task-limit"> - ( - <span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span> - / - <?= Helper\escape($column['task_limit']) ?> - ) - </span> - <?php endif ?> - </th> - <?php endforeach ?> -</tr> -<tr> - <?php foreach ($board as $column): ?> - <td - id="column-<?= $column['id'] ?>" - class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>" - data-column-id="<?= $column['id'] ?>" - data-task-limit="<?= $column['task_limit'] ?>" - > - <?php foreach ($column['tasks'] as $task): ?> - <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') ?>"> - - <a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> - - - <span class="task-user"> - <?php if (! empty($task['owner_id'])): ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a> - <?php else: ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-nobody"><?= t('Nobody assigned') ?></a> - <?php endif ?> - </span> - - <?php if ($task['score']): ?> - <span class="task-score"><?= Helper\escape($task['score']) ?></span> - <?php endif ?> - - <div class="task-title"> - <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']) ?> - </div> - <?php endif ?> - - <div class="task-icons"> - <?php if (! empty($task['nb_comments'])): ?> - <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i> - <?php endif ?> - - <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> - <?php endif ?> - </div> - </div> - <?php endif ?> - - </div> - <?php endforeach ?> - </td> - <?php endforeach ?> -</tr> -</table> diff --git a/templates/category_edit.php b/templates/category_edit.php deleted file mode 100644 index 99ba0c7c..00000000 --- a/templates/category_edit.php +++ /dev/null @@ -1,24 +0,0 @@ -<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 deleted file mode 100644 index db986143..00000000 --- a/templates/category_index.php +++ /dev/null @@ -1,48 +0,0 @@ -<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 deleted file mode 100644 index cc2eb678..00000000 --- a/templates/category_remove.php +++ /dev/null @@ -1,16 +0,0 @@ -<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/comment_forbidden.php b/templates/comment_forbidden.php deleted file mode 100644 index eeea8404..00000000 --- a/templates/comment_forbidden.php +++ /dev/null @@ -1,9 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Forbidden') ?></h2> - </div> - - <p class="alert alert-error"> - <?= t('Only administrators or the creator of the comment can access to this page.') ?> - </p> -</section>
\ No newline at end of file diff --git a/templates/comment_remove.php b/templates/comment_remove.php deleted file mode 100644 index ad1b8e4a..00000000 --- a/templates/comment_remove.php +++ /dev/null @@ -1,18 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove a comment') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this comment?') ?> - </p> - - <?= Helper\template('comment_show', array('comment' => $comment)) ?> - - <div class="form-actions"> - <a href="?controller=comment&action=remove&project_id=<?= $project_id ?>&comment_id=<?= $comment['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=task&action=show&task_id=<?= $comment['task_id'] ?>#comment-<?= $comment['id'] ?>"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file diff --git a/templates/comment_show.php b/templates/comment_show.php deleted file mode 100644 index 24bf9070..00000000 --- a/templates/comment_show.php +++ /dev/null @@ -1,36 +0,0 @@ -<div class="<?= isset($display_edit_form) && $display_edit_form === true ? 'comment-edit' : 'comment' ?>" id="comment-<?= $comment['id'] ?>"> - <p class="comment-title"> - <span class="comment-username"><?= Helper\escape($comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %G at %k:%M %p', $comment['date']) ?></span> - </p> - <?php if (isset($task)): ?> - <ul class="comment-actions"> - <li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li> - <?php if (Helper\is_admin() || Helper\is_current_user($comment['user_id'])): ?> - <li> - <a href="?controller=comment&action=confirm&project_id=<?= $task['project_id'] ?>&comment_id=<?= $comment['id'] ?>"><?= t('remove') ?></a> - </li> - <li> - <a href="?controller=comment&action=edit&task_id=<?= $task['id'] ?>&comment_id=<?= $comment['id'] ?>#comment-<?= $comment['id'] ?>"><?= t('edit') ?></a> - </li> - <?php endif ?> - </ul> - <?php endif ?> - - <?php if (isset($display_edit_form) && $display_edit_form === true): ?> - <form method="post" action="?controller=comment&action=update&task_id=<?= $task['id'] ?>&comment_id=<?= $comment['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_textarea('comment', $values, $errors, array('required', 'placeholder="'.t('Leave a comment').'"')) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Update this comment') ?>" class="btn btn-blue"/> - <?= t('or') ?> - <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> - </div> - </form> - <?php else: ?> - <div class="markdown"> - <?= Helper\markdown($comment['comment']) ?> - </div> - <?php endif ?> -</div>
\ No newline at end of file diff --git a/templates/config_index.php b/templates/config_index.php deleted file mode 100644 index 6c610d2b..00000000 --- a/templates/config_index.php +++ /dev/null @@ -1,120 +0,0 @@ -<section id="main"> - - <?php if ($user['is_admin']): ?> - <div class="page-header"> - <h2><?= t('Application settings') ?></h2> - </div> - <section> - <form method="post" action="?controller=config&action=save" autocomplete="off"> - - <?= Helper\form_label(t('Language'), 'language') ?> - <?= Helper\form_select('language', $languages, $values, $errors) ?><br/> - - <?= Helper\form_label(t('Timezone'), 'timezone') ?> - <?= Helper\form_select('timezone', $timezones, $values, $errors) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - </div> - </form> - </section> - <?php endif ?> - - <div class="page-header"> - <h2><?= t('User settings') ?></h2> - </div> - <section class="settings"> - <ul> - <li> - <strong><?= t('My default project:') ?> </strong> - <?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? Helper\escape($projects[$user['default_project_id']]) : t('None') ?>, - <a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('edit') ?></a> - </li> - </ul> - </section> - - <?php if ($user['is_admin']): ?> - <div class="page-header"> - <h2><?= t('More information') ?></h2> - </div> - <section class="settings"> - <ul> - <li><a href="?controller=config&action=tokens"><?= t('Reset all tokens') ?></a></li> - <li> - <?= t('Webhooks token:') ?> - <strong><?= Helper\escape($values['webhooks_token']) ?></strong> - </li> - <?php if (DB_DRIVER === 'sqlite'): ?> - <li> - <?= t('Database size:') ?> - <strong><?= Helper\format_bytes($db_size) ?></strong> - </li> - <li> - <a href="?controller=config&action=downloadDb"><?= t('Download the database') ?></a> - <?= t('(Gzip compressed Sqlite file)') ?> - </li> - <li> - <a href="?controller=config&action=optimizeDb"><?= t('Optimize the database') ?></a> - <?= t('(VACUUM command)') ?> - </li> - <?php endif ?> - <li> - <?= t('Official website:') ?> - <a href="http://kanboard.net/" target="_blank" rel="noreferer">http://kanboard.net/</a> - </li> - <li> - <?= t('Application version:') ?> - <?= APP_VERSION ?> - </li> - </ul> - </section> - <?php endif ?> - - <div class="page-header" id="last-logins"> - <h2><?= t('Last logins') ?></h2> - </div> - <?php if (! empty($last_logins)): ?> - <table class="table-small table-hover"> - <tr> - <th><?= t('Login date') ?></th> - <th><?= t('Authentication method') ?></th> - <th><?= t('IP address') ?></th> - <th><?= t('User agent') ?></th> - </tr> - <?php foreach($last_logins as $login): ?> - <tr> - <td><?= dt('%B %e, %G at %k:%M %p', $login['date_creation']) ?></td> - <td><?= Helper\escape($login['auth_type']) ?></td> - <td><?= Helper\escape($login['ip']) ?></td> - <td><?= Helper\escape($login['user_agent']) ?></td> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> - - <div class="page-header" id="remember-me"> - <h2><?= t('Persistent connections') ?></h2> - </div> - <?php if (empty($remember_me_sessions)): ?> - <p class="alert alert-info"><?= t('No session') ?></p> - <?php else: ?> - <table class="table-small table-hover"> - <tr> - <th><?= t('Creation date') ?></th> - <th><?= t('Expiration date') ?></th> - <th><?= t('IP address') ?></th> - <th><?= t('User agent') ?></th> - <th><?= t('Action') ?></th> - </tr> - <?php foreach($remember_me_sessions as $session): ?> - <tr> - <td><?= dt('%B %e, %G at %k:%M %p', $session['date_creation']) ?></td> - <td><?= dt('%B %e, %G at %k:%M %p', $session['expiration']) ?></td> - <td><?= Helper\escape($session['ip']) ?></td> - <td><?= Helper\escape($session['user_agent']) ?></td> - <td><a href="?controller=config&action=removeRememberMeToken&id=<?= $session['id'] ?>"><?= t('Remove') ?></a></td> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> -</section> diff --git a/templates/layout.php b/templates/layout.php deleted file mode 100644 index 0bb8446d..00000000 --- a/templates/layout.php +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - - <meta name="viewport" content="width=device-width"> - <meta name="mobile-web-app-capable" content="yes"> - - <script src="assets/js/jquery-1.11.1.min.js"></script> - <script src="assets/js/jquery-ui-1.10.4.custom.min.js"></script> - <script src="assets/js/jquery.ui.touch-punch.min.js"></script> - - <link rel="stylesheet" href="assets/css/app.css" media="screen"> - <link rel="stylesheet" href="assets/css/font-awesome.min.css" media="screen"> - - <link rel="icon" type="image/png" href="assets/img/favicon.png"> - <link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png"> - <link rel="apple-touch-icon" sizes="72x72" href="assets/img/touch-icon-ipad.png"> - <link rel="apple-touch-icon" sizes="114x114" href="assets/img/touch-icon-iphone-retina.png"> - <link rel="apple-touch-icon" sizes="144x144" href="assets/img/touch-icon-ipad-retina.png"> - - <title><?= isset($title) ? Helper\escape($title).' - Kanboard' : 'Kanboard' ?></title> - <?php if (isset($auto_refresh)): ?> - <meta http-equiv="refresh" content="<?= BOARD_PUBLIC_CHECK_INTERVAL ?>" > - <?php endif ?> - </head> - <body> - <?php if (isset($no_layout)): ?> - <?= $content_for_layout ?> - <?php else: ?> - <header> - <nav> - <a class="logo" href="?">kan<span>board</span></a> - <ul> - <li <?= isset($menu) && $menu === 'boards' ? 'class="active"' : '' ?>> - <a href="?controller=board"><?= t('Boards') ?></a> - </li> - <li <?= isset($menu) && $menu === 'projects' ? 'class="active"' : '' ?>> - <a href="?controller=project"><?= t('Projects') ?></a> - </li> - <li <?= isset($menu) && $menu === 'users' ? 'class="active"' : '' ?>> - <a href="?controller=user"><?= t('Users') ?></a> - </li> - <li <?= isset($menu) && $menu === 'config' ? 'class="active"' : '' ?>> - <a href="?controller=config"><?= t('Settings') ?></a> - </li> - <li> - <a href="?controller=user&action=logout"><?= t('Logout') ?></a> - (<?= Helper\escape(Helper\get_username()) ?>) - </li> - </ul> - </nav> - </header> - <section class="page"> - <?= Helper\flash('<div class="alert alert-success alert-fade-out">%s</div>') ?> - <?= Helper\flash_error('<div class="alert alert-error">%s</div>') ?> - <?= $content_for_layout ?> - </section> - <?php endif ?> - </body> -</html>
\ No newline at end of file diff --git a/templates/project_edit.php b/templates/project_edit.php deleted file mode 100644 index 557986bf..00000000 --- a/templates/project_edit.php +++ /dev/null @@ -1,24 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Edit project') ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - <form method="post" action="?controller=project&action=update&project_id=<?= $values['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('id', $values) ?> - - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors, array('required')) ?> - - <?= Helper\form_checkbox('is_active', t('Activated'), 1, isset($values['is_active']) && $values['is_active'] == 1 ? true : false) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/project_forbidden.php b/templates/project_forbidden.php deleted file mode 100644 index 1cba7b58..00000000 --- a/templates/project_forbidden.php +++ /dev/null @@ -1,9 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Forbidden') ?></h2> - </div> - - <p class="alert alert-error"> - <?= t('You are not allowed to access to this project.') ?> - </p> -</section>
\ No newline at end of file diff --git a/templates/project_index.php b/templates/project_index.php deleted file mode 100644 index df153fe7..00000000 --- a/templates/project_index.php +++ /dev/null @@ -1,98 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Projects') ?><span id="page-counter"> (<?= $nb_projects ?>)</span></h2> - <?php if (Helper\is_admin()): ?> - <ul> - <li><a href="?controller=project&action=create"><?= t('New project') ?></a></li> - </ul> - <?php endif ?> - </div> - <section> - <?php if (empty($projects)): ?> - <p class="alert"><?= t('No project') ?></p> - <?php else: ?> - <table> - <tr> - <th><?= t('Project') ?></th> - <th><?= t('Status') ?></th> - <th><?= t('Tasks') ?></th> - <th><?= t('Board') ?></th> - - <?php if (Helper\is_admin()): ?> - <th><?= t('Actions') ?></th> - <?php endif ?> - </tr> - <?php foreach ($projects as $project): ?> - <tr> - <td> - <a href="?controller=board&action=show&project_id=<?= $project['id'] ?>" title="project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a> - </td> - <td> - <?= $project['is_active'] ? t('Active') : t('Inactive') ?> - </td> - <td> - <?php if ($project['nb_tasks'] > 0): ?> - - <?php if ($project['nb_active_tasks'] > 0): ?> - <a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('%d tasks on the board', $project['nb_active_tasks']) ?></a>, - <?php endif ?> - - <?php if ($project['nb_inactive_tasks'] > 0): ?> - <a href="?controller=project&action=tasks&project_id=<?= $project['id'] ?>"><?= t('%d closed tasks', $project['nb_inactive_tasks']) ?></a>, - <?php endif ?> - - <?= t('%d tasks in total', $project['nb_tasks']) ?> - - <?php else: ?> - <?= t('no task for this project') ?> - <?php endif ?> - </td> - <td> - <ul> - <?php foreach ($project['columns'] as $column): ?> - <li> - <span title="column_id=<?= $column['id'] ?>"><?= Helper\escape($column['title']) ?></span> (<?= $column['nb_active_tasks'] ?>) - </li> - <?php endforeach ?> - </ul> - </td> - <?php if (Helper\is_admin()): ?> - <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> - <a href="?controller=project&action=users&project_id=<?= $project['id'] ?>"><?= t('Edit users access') ?></a> - </li> - <li> - <a href="?controller=board&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a> - </li> - <li> - <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a> - </li> - <li> - <?php if ($project['is_active']): ?> - <a href="?controller=project&action=disable&project_id=<?= $project['id'] ?>"><?= t('Disable') ?></a> - <?php else: ?> - <a href="?controller=project&action=enable&project_id=<?= $project['id'] ?>"><?= t('Enable') ?></a> - <?php endif ?> - </li> - <li> - <a href="?controller=project&action=confirm&project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a> - </li> - <li> - <a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a> - </li> - </ul> - </td> - <?php endif ?> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> - </section> -</section>
\ No newline at end of file diff --git a/templates/project_new.php b/templates/project_new.php deleted file mode 100644 index 2026d461..00000000 --- a/templates/project_new.php +++ /dev/null @@ -1,20 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('New project') ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - <form method="post" action="?controller=project&action=save" autocomplete="off"> - - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors, array('autofocus', 'required')) ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/project_remove.php b/templates/project_remove.php deleted file mode 100644 index e9f213b5..00000000 --- a/templates/project_remove.php +++ /dev/null @@ -1,16 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove project') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this project: "%s"?', $project['name']) ?> - </p> - - <div class="form-actions"> - <a href="?controller=project&action=remove&project_id=<?= $project['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file diff --git a/templates/project_search.php b/templates/project_search.php deleted file mode 100644 index 3594fd09..00000000 --- a/templates/project_search.php +++ /dev/null @@ -1,93 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2> - <?= t('Search in the project "%s"', $project['name']) ?> - <?php if (! empty($nb_tasks)): ?> - <span id="page-counter"> (<?= $nb_tasks ?>)</span> - <?php endif ?> - </h2> - <ul> - <li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li> - <li><a href="?controller=project&action=tasks&project_id=<?= $project['id'] ?>"><?= t('Completed tasks') ?></a></li> - <li><a href="?controller=project&action=index"><?= t('List of projects') ?></a></li> - </ul> - </div> - <section> - <form method="get" action="?" autocomplete="off"> - <?= Helper\form_hidden('controller', $values) ?> - <?= Helper\form_hidden('action', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> - <?= Helper\form_text('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"')) ?> - <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> - </form> - - <?php if (empty($tasks) && ! empty($values['search'])): ?> - <p class="alert"><?= t('Nothing found.') ?></p> - <?php elseif (! empty($tasks)): ?> - <table> - <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> - <th><?= t('Date created') ?></th> - <th><?= t('Date completed') ?></th> - <th><?= t('Status') ?></th> - </tr> - <?php foreach ($tasks as $task): ?> - <tr> - <td class="task task-<?= $task['color_id'] ?>"> - <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['id']) ?></a> - </td> - <td> - <?= 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'])): ?> - <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i> - <?php endif ?> - - <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> - <?php endif ?> - </div> - </td> - <td> - <?php if ($task['username']): ?> - <?= Helper\escape($task['username']) ?> - <?php else: ?> - <?= t('Unassigned') ?> - <?php endif ?> - </td> - <td> - <?= dt('%B %e, %G', $task['date_due']) ?> - </td> - <td> - <?= dt('%B %e, %G at %k:%M %p', $task['date_creation']) ?> - </td> - <td> - <?php if ($task['date_completed']): ?> - <?= dt('%B %e, %G at %k:%M %p', $task['date_completed']) ?> - <?php endif ?> - </td> - <td> - <?php if ($task['is_active'] == \Model\Task::STATUS_OPEN): ?> - <?= t('Open') ?> - <?php else: ?> - <?= t('Closed') ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> - - </section> -</section>
\ No newline at end of file diff --git a/templates/project_tasks.php b/templates/project_tasks.php deleted file mode 100644 index 9f4263b8..00000000 --- a/templates/project_tasks.php +++ /dev/null @@ -1,71 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Completed tasks for "%s"', $project['name']) ?><span id="page-counter"> (<?= $nb_tasks ?>)</span></h2> - <ul> - <li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li> - <li><a href="?controller=project&action=search&project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li> - <li><a href="?controller=project&action=index"><?= t('List of projects') ?></a></li> - </ul> - </div> - <section> - <?php if (empty($tasks)): ?> - <p class="alert"><?= t('No task') ?></p> - <?php else: ?> - <table> - <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> - <th><?= t('Date created') ?></th> - <th><?= t('Date completed') ?></th> - </tr> - <?php foreach ($tasks as $task): ?> - <tr> - <td class="task task-<?= $task['color_id'] ?>"> - <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['id']) ?></a> - </td> - <td> - <?= 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'])): ?> - <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i> - <?php endif ?> - - <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> - <?php endif ?> - </div> - </td> - <td> - <?php if ($task['username']): ?> - <?= Helper\escape($task['username']) ?> - <?php else: ?> - <?= t('Unassigned') ?> - <?php endif ?> - </td> - <td> - <?= dt('%B %e, %G', $task['date_due']) ?> - </td> - <td> - <?= dt('%B %e, %G at %k:%M %p', $task['date_creation']) ?> - </td> - <td> - <?php if ($task['date_completed']): ?> - <?= dt('%B %e, %G at %k:%M %p', $task['date_completed']) ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> - </section> -</section>
\ No newline at end of file diff --git a/templates/project_users.php b/templates/project_users.php deleted file mode 100644 index 0448004f..00000000 --- a/templates/project_users.php +++ /dev/null @@ -1,44 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Project access list for "%s"', $project['name']) ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> - - <?php if (! empty($users['not_allowed'])): ?> - <form method="post" action="?controller=project&action=allow&project_id=<?= $project['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?> - - <?= Helper\form_label(t('User'), 'user_id') ?> - <?= Helper\form_select('user_id', $users['not_allowed']) ?><br/> - - <div class="form-actions"> - <input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - <?php endif ?> - - <h3><?= t('List of authorized users') ?></h3> - <?php if (empty($users['allowed'])): ?> - <div class="alert alert-info"><?= t('Everybody have access to this project.') ?></div> - <?php else: ?> - <div class="listing"> - <p><?= t('Only those users have access to this project:') ?></p> - <ul> - <?php foreach ($users['allowed'] as $user_id => $username): ?> - <li> - <strong><?= Helper\escape($username) ?></strong> - (<a href="?controller=project&action=revoke&project_id=<?= $project['id'] ?>&user_id=<?= $user_id ?>"><?= t('revoke') ?></a>) - </li> - <?php endforeach ?> - </ul> - <p><?= t('Don\'t forget that administrators have access to everything.') ?></p> - </div> - <?php endif ?> - - </section> -</section>
\ No newline at end of file diff --git a/templates/task_close.php b/templates/task_close.php deleted file mode 100644 index 3531b37d..00000000 --- a/templates/task_close.php +++ /dev/null @@ -1,10 +0,0 @@ -<div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to close this task: "%s"?', Helper\escape($task['title'])) ?> - </p> - - <div class="form-actions"> - <a href="?controller=task&action=close&task_id=<?= $task['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> - </div> -</div>
\ No newline at end of file diff --git a/templates/task_edit.php b/templates/task_edit.php deleted file mode 100644 index 8c8bc107..00000000 --- a/templates/task_edit.php +++ /dev/null @@ -1,51 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Edit a task') ?></h2> - </div> - <section> - <form method="post" action="?controller=task&action=update" autocomplete="off"> - - <div class="form-column"> - - <?= Helper\form_label(t('Title'), 'title') ?> - <?= Helper\form_text('title', $values, $errors, array('required')) ?><br/> - - <?= Helper\form_label(t('Description'), 'description') ?> - <?= Helper\form_textarea('description', $values, $errors) ?><br/> - <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> - - </div> - - <div class="form-column"> - - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> - - <?= 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/> - - <?= Helper\form_label(t('Color'), 'color_id') ?> - <?= Helper\form_select('color_id', $colors_list, $values, $errors) ?><br/> - - <?= Helper\form_label(t('Story Points'), 'score') ?> - <?= Helper\form_number('score', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Due Date'), 'date_due') ?> - <?= Helper\form_text('date_due', $values, $errors, array('placeholder="'.t('month/day/year').'"'), 'form-date') ?><br/> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - - </div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=board&action=show&project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/task_layout.php b/templates/task_layout.php deleted file mode 100644 index 9a6bbd00..00000000 --- a/templates/task_layout.php +++ /dev/null @@ -1,16 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= Helper\escape($task['project_name']) ?> > <?= t('Task #%d', $task['id']) ?></h2> - <ul> - <li><a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li> - </ul> - </div> - <section class="task-show"> - - <?= Helper\template('task_sidebar', array('task' => $task)) ?> - - <div class="task-show-main"> - <?= $task_content_for_layout ?> - </div> - </section> -</section>
\ No newline at end of file diff --git a/templates/task_new.php b/templates/task_new.php deleted file mode 100644 index d233efd2..00000000 --- a/templates/task_new.php +++ /dev/null @@ -1,51 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('New task') ?></h2> - </div> - <section> - <form method="post" action="?controller=task&action=save" autocomplete="off"> - - <div class="form-column"> - <?= Helper\form_label(t('Title'), 'title') ?> - <?= Helper\form_text('title', $values, $errors, array('autofocus', 'required')) ?><br/> - - <?= Helper\form_label(t('Description'), 'description') ?> - <?= Helper\form_textarea('description', $values, $errors) ?><br/> - <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> - - <?php if (! isset($duplicate)): ?> - <?= Helper\form_checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> - <?php endif ?> - </div> - - <div class="form-column"> - - <?= Helper\form_hidden('project_id', $values) ?> - - <?= 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/> - - <?= Helper\form_label(t('Color'), 'color_id') ?> - <?= Helper\form_select('color_id', $colors_list, $values, $errors) ?><br/> - - <?= Helper\form_label(t('Story Points'), 'score') ?> - <?= Helper\form_number('score', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Due Date'), 'date_due') ?> - <?= Helper\form_text('date_due', $values, $errors, array('placeholder="'.t('month/day/year').'"'), 'form-date') ?><br/> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - </div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=board&action=show&project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/task_open.php b/templates/task_open.php deleted file mode 100644 index 54cc11f0..00000000 --- a/templates/task_open.php +++ /dev/null @@ -1,16 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Open a task') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to open this task: "%s"?', Helper\escape($task['title'])) ?> - </p> - - <div class="form-actions"> - <a href="?controller=task&action=open&task_id=<?= $task['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file diff --git a/templates/task_remove.php b/templates/task_remove.php deleted file mode 100644 index 1aa9503b..00000000 --- a/templates/task_remove.php +++ /dev/null @@ -1,10 +0,0 @@ -<div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this task: "%s"?', Helper\escape($task['title'])) ?> - </p> - - <div class="form-actions"> - <a href="?controller=task&action=remove&task_id=<?= $task['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> - </div> -</div>
\ No newline at end of file diff --git a/templates/task_show.php b/templates/task_show.php deleted file mode 100644 index a5b79359..00000000 --- a/templates/task_show.php +++ /dev/null @@ -1,94 +0,0 @@ -<article class="task task-<?= $task['color_id'] ?> task-show-details"> - <h2><?= Helper\escape($task['title']) ?></h2> -<?php if ($task['score']): ?> - <span class="task-score"><?= Helper\escape($task['score']) ?></span> -<?php endif ?> -<ul> - <li> - <?= dt('Created on %B %e, %G at %k:%M %p', $task['date_creation']) ?> - </li> - <?php if ($task['date_completed']): ?> - <li> - <?= dt('Completed on %B %e, %G at %k:%M %p', $task['date_completed']) ?> - </li> - <?php endif ?> - <?php if ($task['date_due']): ?> - <li> - <strong><?= dt('Must be done before %B %e, %G', $task['date_due']) ?></strong> - </li> - <?php endif ?> - <li> - <strong> - <?php if ($task['username']): ?> - <?= t('Assigned to %s', $task['username']) ?> - <?php else: ?> - <?= t('There is nobody assigned') ?> - <?php endif ?> - </strong> - </li> - <li> - <?= t('Column on the board:') ?> - <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') ?> - <?php else: ?> - <?= t('Status is closed') ?> - <?php endif ?> - </li> -</ul> -</article> - -<h2><?= t('Description') ?></h2> -<?php if ($task['description']): ?> - <article class="markdown task-show-description"> - <?= Helper\parse($task['description']) ?: t('There is no description.') ?> - </article> -<?php else: ?> - <form method="post" action="?controller=task&action=description&task_id=<?= $task['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('id', $description_form['values']) ?> - <?= Helper\form_textarea('description', $description_form['values'], $description_form['errors'], array('required', 'placeholder="'.t('Leave a description').'"')) ?><br/> - <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - </div> - </form> -<?php endif ?> - -<h2><?= t('Comments') ?></h2> -<?php if ($comments): ?> - <ul id="comments"> - <?php foreach ($comments as $comment): ?> - <?= Helper\template('comment_show', array( - 'comment' => $comment, - 'task' => $task, - 'display_edit_form' => $comment['id'] == $comment_edit_form['values']['id'], - 'values' => $comment_edit_form['values'] + array('comment' => $comment['comment']), - 'errors' => $comment_edit_form['errors'] - )) ?> - <?php endforeach ?> - </ul> -<?php endif ?> - -<?php if (! isset($hide_comment_form) || $hide_comment_form === false): ?> -<form method="post" action="?controller=comment&action=save&task_id=<?= $task['id'] ?>" autocomplete="off"> - - <?= Helper\form_hidden('task_id', $comment_form['values']) ?> - <?= Helper\form_hidden('user_id', $comment_form['values']) ?> - <?= Helper\form_textarea('comment', $comment_form['values'], $comment_form['errors'], array('required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?><br/> - <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Post comment') ?>" class="btn btn-blue"/> - </div> -</form> -<?php endif ?>
\ No newline at end of file diff --git a/templates/task_sidebar.php b/templates/task_sidebar.php deleted file mode 100644 index 314d5214..00000000 --- a/templates/task_sidebar.php +++ /dev/null @@ -1,17 +0,0 @@ -<div class="task-show-sidebar"> - <h2><?= t('Actions') ?></h2> - <div class="task-show-actions"> - <ul> - <li><a href="?controller=task&action=duplicate&project_id=<?= $task['project_id'] ?>&task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li> - <li><a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>"><?= t('Edit') ?></a></li> - <li> - <?php if ($task['is_active'] == 1): ?> - <a href="?controller=task&action=confirmClose&task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a> - <?php else: ?> - <a href="?controller=task&action=confirmOpen&task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a> - <?php endif ?> - </li> - <li><a href="?controller=task&action=confirmRemove&task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li> - </ul> - </div> -</div>
\ No newline at end of file diff --git a/templates/user_edit.php b/templates/user_edit.php deleted file mode 100644 index c857fe1c..00000000 --- a/templates/user_edit.php +++ /dev/null @@ -1,64 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Edit user') ?></h2> - <ul> - <li><a href="?controller=user"><?= t('All users') ?></a></li> - </ul> - </div> - <section> - <form method="post" action="?controller=user&action=update" autocomplete="off"> - - <div class="form-column"> - - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_hidden('is_ldap_user', $values) ?> - - <?= Helper\form_label(t('Username'), 'username') ?> - <?= Helper\form_text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '')) ?><br/> - - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Email'), 'email') ?> - <?= Helper\form_email('email', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Default Project'), 'default_project_id') ?> - <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/> - - </div> - - <div class="form-column"> - - <?php if ($values['is_ldap_user'] == 0): ?> - - <?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?> - <?= Helper\form_password('current_password', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Password'), 'password') ?> - <?= Helper\form_password('password', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Confirmation'), 'confirmation') ?> - <?= Helper\form_password('confirmation', $values, $errors) ?><br/> - - <?php endif ?> - - <?php if (Helper\is_admin()): ?> - <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?><br/> - <?php endif ?> - - <?php if (GOOGLE_AUTH && Helper\is_current_user($values['id'])): ?> - <?php if (empty($values['google_id'])): ?> - <a href="?controller=user&action=google"><?= t('Link my Google Account') ?></a> - <?php else: ?> - <a href="?controller=user&action=unlinkGoogle"><?= t('Unlink my Google Account') ?></a> - <?php endif ?> - <?php endif ?> - - </div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> <a href="?controller=user"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/user_forbidden.php b/templates/user_forbidden.php deleted file mode 100644 index 853159ba..00000000 --- a/templates/user_forbidden.php +++ /dev/null @@ -1,9 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Forbidden') ?></h2> - </div> - - <p class="alert alert-error"> - <?= t('Only administrators can access to this page.') ?> - </p> -</section>
\ No newline at end of file diff --git a/templates/user_index.php b/templates/user_index.php deleted file mode 100644 index f6302a6b..00000000 --- a/templates/user_index.php +++ /dev/null @@ -1,56 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Users') ?><span id="page-counter"> (<?= $nb_users ?>)</span></h2> - <?php if (Helper\is_admin()): ?> - <ul> - <li><a href="?controller=user&action=create"><?= t('New user') ?></a></li> - </ul> - <?php endif ?> - </div> - <section> - <?php if (empty($users)): ?> - <p class="alert"><?= t('No user') ?></p> - <?php else: ?> - <table> - <tr> - <th><?= t('Username') ?></th> - <th><?= t('Name') ?></th> - <th><?= t('Email') ?></th> - <th><?= t('Administrator') ?></th> - <th><?= t('Default Project') ?></th> - <th><?= t('Actions') ?></th> - </tr> - <?php foreach ($users as $user): ?> - <tr> - <td> - <span title="user_id=<?= $user['id'] ?>"><?= Helper\escape($user['username']) ?></span> - </td> - <td> - <?= Helper\escape($user['name']) ?> - </td> - <td> - <?= Helper\escape($user['email']) ?> - </td> - <td> - <?= $user['is_admin'] ? t('Yes') : t('No') ?> - </td> - <td> - <?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? Helper\escape($projects[$user['default_project_id']]) : t('None'); ?> - </td> - <td> - <?php if (Helper\is_admin() || Helper\is_current_user($user['id'])): ?> - <a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('edit') ?></a> - <?php endif ?> - <?php if (Helper\is_admin()): ?> - <?php if (count($users) > 1): ?> - <?= t('or') ?> - <a href="?controller=user&action=confirm&user_id=<?= $user['id'] ?>"><?= t('remove') ?></a> - <?php endif ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </table> - <?php endif ?> - </section> -</section> diff --git a/templates/user_login.php b/templates/user_login.php deleted file mode 100644 index 878170e3..00000000 --- a/templates/user_login.php +++ /dev/null @@ -1,28 +0,0 @@ -<div class="page-header"> - <h1><?= t('Sign in') ?></h1> -</div> - -<?php if (isset($errors['login'])): ?> - <p class="alert alert-error"><?= Helper\escape($errors['login']) ?></p> -<?php endif ?> - -<form method="post" action="?controller=user&action=check" class="form-login"> - - <?= Helper\form_label(t('Username'), 'username') ?> - <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/> - - <?= Helper\form_label(t('Password'), 'password') ?> - <?= Helper\form_password('password', $values, $errors, array('required')) ?> - - <?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/> - - <?php if (GOOGLE_AUTH): ?> - <p> - <a href="?controller=user&action=google"><?= t('Login with my Google Account') ?></a> - </p> - <?php endif ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/> - </div> -</form>
\ No newline at end of file diff --git a/templates/user_new.php b/templates/user_new.php deleted file mode 100644 index 6ad976f2..00000000 --- a/templates/user_new.php +++ /dev/null @@ -1,45 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('New user') ?></h2> - <ul> - <li><a href="?controller=user"><?= t('All users') ?></a></li> - </ul> - </div> - <section> - <form method="post" action="?controller=user&action=save" autocomplete="off"> - - <div class="form-column"> - - <?= Helper\form_label(t('Username'), 'username') ?> - <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/> - - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Email'), 'email') ?> - <?= Helper\form_email('email', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Default Project'), 'default_project_id') ?> - <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/> - - </div> - - <div class="form-column"> - - <?= Helper\form_label(t('Password'), 'password') ?> - <?= Helper\form_password('password', $values, $errors, array('required')) ?><br/> - - <?= Helper\form_label(t('Confirmation'), 'confirmation') ?> - <?= Helper\form_password('confirmation', $values, $errors, array('required')) ?><br/> - - <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?> - - </div> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=user"><?= t('cancel') ?></a> - </div> - </form> - </section> -</section>
\ No newline at end of file diff --git a/templates/user_remove.php b/templates/user_remove.php deleted file mode 100644 index a4db2e4a..00000000 --- a/templates/user_remove.php +++ /dev/null @@ -1,14 +0,0 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove user') ?></h2> - </div> - - <div class="confirm"> - <p class="alert alert-info"><?= t('Do you really want to remove this user: "%s"?', $user['username']) ?></p> - - <div class="form-actions"> - <a href="?controller=user&action=remove&user_id=<?= $user['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=user"><?= t('cancel') ?></a> - </div> - </div> -</section>
\ No newline at end of file |