summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/.htaccess1
-rw-r--r--templates/board_edit.php40
-rw-r--r--templates/board_index.php57
-rw-r--r--templates/board_remove.php17
-rw-r--r--templates/config_index.php55
-rw-r--r--templates/layout.php51
-rw-r--r--templates/project_edit.php24
-rw-r--r--templates/project_index.php70
-rw-r--r--templates/project_new.php20
-rw-r--r--templates/project_remove.php16
-rw-r--r--templates/task_close.php16
-rw-r--r--templates/task_edit.php36
-rw-r--r--templates/task_new.php34
-rw-r--r--templates/task_open.php16
-rw-r--r--templates/task_show.php54
-rw-r--r--templates/user_edit.php34
-rw-r--r--templates/user_forbidden.php10
-rw-r--r--templates/user_index.php46
-rw-r--r--templates/user_login.php20
-rw-r--r--templates/user_new.php31
-rw-r--r--templates/user_remove.php14
21 files changed, 662 insertions, 0 deletions
diff --git a/templates/.htaccess b/templates/.htaccess
new file mode 100644
index 00000000..14249c50
--- /dev/null
+++ b/templates/.htaccess
@@ -0,0 +1 @@
+Deny from all \ No newline at end of file
diff --git a/templates/board_edit.php b/templates/board_edit.php
new file mode 100644
index 00000000..605773ae
--- /dev/null
+++ b/templates/board_edit.php
@@ -0,0 +1,40 @@
+<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&amp;action=update&amp;project_id=<?= $project['id'] ?>" autocomplete="off">
+
+ <?php $i = 0; ?>
+
+ <?php foreach ($columns as $column_id => $column_title): ?>
+ <?= Helper\form_label(t('Column %d', ++$i), 'title['.$column_id.']') ?>
+ <?= Helper\form_text('title['.$column_id.']', $values, $errors, array('required')) ?>
+ <a href="?controller=board&amp;action=confirm&amp;project_id=<?= $project['id'] ?>&amp;column_id=<?= $column_id ?>"><?= t('Remove') ?></a>
+ <?php endforeach ?>
+
+ <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&amp;action=add&amp;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
new file mode 100644
index 00000000..777d601b
--- /dev/null
+++ b/templates/board_index.php
@@ -0,0 +1,57 @@
+<section id="main">
+
+ <div class="page-header">
+ <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&amp;action=show&amp;project_id=<?= $project_id ?>"><?= Helper\escape($project_name) ?></a>
+ </li>
+ <?php endif ?>
+ <?php endforeach ?>
+ </ul>
+ </div>
+
+ <table id="board" data-project-id="<?= $current_project_id ?>">
+ <tr>
+ <?php $column_with = round(100 / count($columns), 2); ?>
+ <?php foreach ($columns as $column): ?>
+ <th width="<?= $column_with ?>%">
+ <a href="?controller=task&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a>
+ <?= Helper\escape($column['title']) ?>
+ </th>
+ <?php endforeach ?>
+ </tr>
+ <tr>
+ <?php foreach ($columns as $column): ?>
+ <td id="column-<?= $column['id'] ?>" class="column" data-column-id="<?= $column['id'] ?>" dropzone="copy">
+ <?php foreach ($column['tasks'] as $task): ?>
+ <div class="draggable-item" draggable="true">
+ <div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>">
+
+ <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>">#<?= $task['id'] ?></a> -
+
+ <span class="task-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <?= t('Assigned to %s', $task['username']) ?>
+ <?php else: ?>
+ <span class="task-nobody"><?= t('No body assigned') ?></span>
+ <?php endif ?>
+ </span>
+
+ <div class="task-title">
+ <?= Helper\escape($task['title']) ?>
+ </div>
+
+ </div>
+ </div>
+ <?php endforeach ?>
+ </td>
+ <?php endforeach ?>
+ </tr>
+ </table>
+
+</section>
+
+<script type="text/javascript" src="assets/js/board.js"></script> \ No newline at end of file
diff --git a/templates/board_remove.php b/templates/board_remove.php
new file mode 100644
index 00000000..c95c8a28
--- /dev/null
+++ b/templates/board_remove.php
@@ -0,0 +1,17 @@
+<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"?', Helper\escape($column['title'])) ?>
+ <?= t('This action will REMOVE ALL TASKS associated to this column!') ?>
+ </p>
+
+ <div class="form-actions">
+ <a href="?controller=board&amp;action=remove&amp;column_id=<?= $column['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a>
+ <?= t('or') ?> <a href="?controller=board&amp;action=edit&amp;project_id=<?= $column['project_id'] ?>"><?= t('cancel') ?></a>
+ </div>
+ </div>
+</section> \ No newline at end of file
diff --git a/templates/config_index.php b/templates/config_index.php
new file mode 100644
index 00000000..43145caf
--- /dev/null
+++ b/templates/config_index.php
@@ -0,0 +1,55 @@
+<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&amp;action=save" autocomplete="off">
+
+ <?= Helper\form_label(t('Language'), 'language') ?>
+ <?= Helper\form_select('language', $languages, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Webhooks token'), 'webhooks_token') ?>
+ <?= Helper\form_text('webhooks_token', $values, $errors, array('readonly')) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+ </form>
+ </section>
+ <div class="page-header">
+ <h2><?= t('More information') ?></h2>
+ </div>
+ <section class="settings">
+ <ul>
+ <li><?= t('Database size:') ?> <strong><?= Helper\format_bytes($db_size) ?></strong></li>
+ <li>
+ <a href="?controller=config&amp;action=downloadDb"><?= t('Download the database') ?></a>
+ <?= t('(Gzip compressed Sqlite file)') ?>
+ </li>
+ <li>
+ <a href="?controller=config&amp;action=optimizeDb"><?= t('Optimize the database') ?></a>
+ <?= t('(VACUUM command)') ?>
+ </li>
+ <li>
+ <?= t('Official website:') ?>
+ <a href="http://kanboard.net/" target="_blank">http://kanboard.net/</a>
+ </li>
+ </ul>
+ </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']) ? $projects[$user['default_project_id']] : t('None') ?>,
+ <a href="?controller=user&amp;action=edit&amp;user_id=<?= $user['id'] ?>"><?= t('edit') ?></a>
+ </li>
+ </ul>
+ </section>
+</section> \ No newline at end of file
diff --git a/templates/layout.php b/templates/layout.php
new file mode 100644
index 00000000..7739db1a
--- /dev/null
+++ b/templates/layout.php
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" href="assets/css/app.css" media="screen">
+ <!--
+ <link rel="icon" type="image/png" href="assets/img/favicon.png">
+ <link rel="shortcut icon" href="favicon.ico">
+ <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' ?></title>
+ </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&amp;action=logout"><?= t('logout') ?></a>
+ (<?= Helper\escape($_SESSION['user']['username']) ?>)
+ </li>
+ </ul>
+ </nav>
+ </header>
+ <section class="page">
+ <?= Helper\flash('<div class="alert alert-success">%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
new file mode 100644
index 00000000..518e72df
--- /dev/null
+++ b/templates/project_edit.php
@@ -0,0 +1,24 @@
+<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&amp;action=update&amp;project_id=<?= $project['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_index.php b/templates/project_index.php
new file mode 100644
index 00000000..8bb09a62
--- /dev/null
+++ b/templates/project_index.php
@@ -0,0 +1,70 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Projects') ?><span id="page-counter"> (<?= $nb_projects ?>)</span></h2>
+ <ul>
+ <li><a href="?controller=project&amp;action=create"><?= t('New project') ?></a></li>
+ </ul>
+ </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 ($_SESSION['user']['is_admin'] == 1): ?>
+ <th><?= t('Actions') ?></th>
+ <?php endif ?>
+ </tr>
+ <?php foreach ($projects as $project): ?>
+ <tr>
+ <td>
+ <a href="?controller=board&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a>
+ </td>
+ <td>
+ <?= $project['is_active'] ? t('Active') : t('Inactive') ?>
+ </td>
+ <td>
+ <?= t('%d tasks on the board', $project['nb_active_tasks']) ?>, <?= t('%d tasks in total', $project['nb_tasks']) ?>
+ </td>
+ <td>
+ <ul>
+ <?php foreach ($project['columns'] as $column): ?>
+ <li>
+ <?= Helper\escape($column['title']) ?> (<?= $column['nb_active_tasks'] ?>)
+ </li>
+ <?php endforeach ?>
+ </ul>
+ </td>
+ <?php if ($_SESSION['user']['is_admin'] == 1): ?>
+ <td>
+ <ul>
+ <li>
+ <a href="?controller=project&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a>
+ </li>
+ <li>
+ <a href="?controller=board&amp;action=edit&amp;project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a>
+ </li>
+ <li>
+ <?php if ($project['is_active']): ?>
+ <a href="?controller=project&amp;action=disable&amp;project_id=<?= $project['id'] ?>"><?= t('Disable') ?></a>
+ <?php else: ?>
+ <a href="?controller=project&amp;action=enable&amp;project_id=<?= $project['id'] ?>"><?= t('Enable') ?></a>
+ <?php endif ?>
+ </li>
+ <li>
+ <a href="?controller=project&amp;action=confirm&amp;project_id=<?= $project['id'] ?>"><?= t('Remove') ?></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
new file mode 100644
index 00000000..5ce6f97d
--- /dev/null
+++ b/templates/project_new.php
@@ -0,0 +1,20 @@
+<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&amp;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
new file mode 100644
index 00000000..f63c4031
--- /dev/null
+++ b/templates/project_remove.php
@@ -0,0 +1,16 @@
+<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"?', Helper\escape($project['name'])) ?>
+ </p>
+
+ <div class="form-actions">
+ <a href="?controller=project&amp;action=remove&amp;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/task_close.php b/templates/task_close.php
new file mode 100644
index 00000000..6bc32813
--- /dev/null
+++ b/templates/task_close.php
@@ -0,0 +1,16 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Close a task') ?></h2>
+ </div>
+
+ <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&amp;action=close&amp;task_id=<?= $task['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a>
+ <?= t('or') ?> <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+ </div>
+ </div>
+</section> \ No newline at end of file
diff --git a/templates/task_edit.php b/templates/task_edit.php
new file mode 100644
index 00000000..cf01c4a7
--- /dev/null
+++ b/templates/task_edit.php
@@ -0,0 +1,36 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Edit a task') ?></h2>
+ </div>
+ <section>
+ <form method="post" action="?controller=task&amp;action=update" autocomplete="off">
+
+ <?= Helper\form_hidden('id', $values) ?>
+
+ <?= Helper\form_label(t('Title'), 'title') ?>
+ <?= Helper\form_text('title', $values, $errors, array('required')) ?><br/>
+
+ <?= Helper\form_label(t('Project'), 'project_id') ?>
+ <?= Helper\form_select('project_id', $projects_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('Assignee'), 'owner_id') ?>
+ <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Description'), 'description') ?>
+ <?= Helper\form_textarea('description', $values, $errors) ?><br/>
+
+ <?= Helper\form_checkbox('another_task', t('Create another task'), 1) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?> <a href="?controller=board&amp;action=show&amp;project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a>
+ </div>
+ </form>
+ </section>
+</section> \ No newline at end of file
diff --git a/templates/task_new.php b/templates/task_new.php
new file mode 100644
index 00000000..e418748c
--- /dev/null
+++ b/templates/task_new.php
@@ -0,0 +1,34 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('New task') ?></h2>
+ </div>
+ <section>
+ <form method="post" action="?controller=task&amp;action=save" autocomplete="off">
+
+ <?= Helper\form_label(t('Title'), 'title') ?>
+ <?= Helper\form_text('title', $values, $errors, array('autofocus required')) ?><br/>
+
+ <?= Helper\form_label(t('Project'), 'project_id') ?>
+ <?= Helper\form_select('project_id', $projects_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('Assignee'), 'owner_id') ?>
+ <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Description'), 'description') ?>
+ <?= Helper\form_textarea('description', $values, $errors) ?><br/>
+
+ <?= Helper\form_checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?> <a href="?controller=board&amp;action=show&amp;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
new file mode 100644
index 00000000..54cc11f0
--- /dev/null
+++ b/templates/task_open.php
@@ -0,0 +1,16 @@
+<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&amp;action=open&amp;task_id=<?= $task['id'] ?>" class="btn btn-red"><?= t('Yes') ?></a>
+ <?= t('or') ?> <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+ </div>
+ </div>
+</section> \ No newline at end of file
diff --git a/templates/task_show.php b/templates/task_show.php
new file mode 100644
index 00000000..e2789fca
--- /dev/null
+++ b/templates/task_show.php
@@ -0,0 +1,54 @@
+<section id="main">
+ <div class="page-header">
+ <h2>#<?= $task['id'] ?> - <?= Helper\escape($task['title']) ?></h2>
+ <ul>
+ <li><a href="?controller=board&amp;action=show&amp;project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li>
+ </ul>
+ </div>
+ <section>
+ <h3><?= t('Details') ?></h3>
+ <article id="infos" class="task task-<?= $task['color_id'] ?>">
+ <ul>
+ <li>
+ <?= dt('Created on %B %e, %G at %k:%M %p', $task['date_creation']) ?>
+ </li>
+ <li>
+ <strong>
+ <?php if ($task['username']): ?>
+ <?= t('Assigned to %s', $task['username']) ?>
+ <?php else: ?>
+ <?= t('There is no body assigned') ?>
+ <?php endif ?>
+ </strong>
+ </li>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ (<?= Helper\escape($task['project_name']) ?>)
+ </li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <?= t('Status is open') ?>
+ <?php else: ?>
+ <?= t('Status is closed') ?>
+ <?php endif ?>
+ </li>
+ <li>
+ <a href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>"><?= t('Edit') ?></a>
+ <?= t('or') ?>
+ <?php if ($task['is_active'] == 1): ?>
+ <a href="?controller=task&amp;action=confirmClose&amp;task_id=<?= $task['id'] ?>"><?= t('close this task') ?></a>
+ <?php else: ?>
+ <a href="?controller=task&amp;action=confirmOpen&amp;task_id=<?= $task['id'] ?>"><?= t('open this task') ?></a>
+ <?php endif ?>
+ </li>
+ </ul>
+ </article>
+
+ <h3><?= t('Description') ?></h3>
+ <article id="description">
+ <?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
+ </article>
+
+ </section>
+</section> \ No newline at end of file
diff --git a/templates/user_edit.php b/templates/user_edit.php
new file mode 100644
index 00000000..a6f5d600
--- /dev/null
+++ b/templates/user_edit.php
@@ -0,0 +1,34 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Edit user') ?></h2>
+ <ul>
+ <li><a href="?action=users"><?= t('All users') ?></a></li>
+ </ul>
+ </div>
+ <section>
+ <form method="post" action="?controller=user&amp;action=update&amp;username=<?= Helper\escape($username) ?>" autocomplete="off">
+
+ <?= Helper\form_hidden('id', $values) ?>
+
+ <?= Helper\form_label(t('Username'), 'username') ?>
+ <?= Helper\form_text('username', $values, $errors, array('required')) ?><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/>
+
+ <?= Helper\form_label(t('Default Project'), 'default_project_id') ?>
+ <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
+
+ <?php if ($values['is_admin'] == 1): ?>
+ <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
+ <?php endif ?>
+
+ <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
new file mode 100644
index 00000000..bb71d9b1
--- /dev/null
+++ b/templates/user_forbidden.php
@@ -0,0 +1,10 @@
+<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
new file mode 100644
index 00000000..c83a5417
--- /dev/null
+++ b/templates/user_index.php
@@ -0,0 +1,46 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Users') ?><span id="page-counter"> (<?= $nb_users ?>)</span></h2>
+ <ul>
+ <li><a href="?controller=user&amp;action=create"><?= t('New user') ?></a></li>
+ </ul>
+ </div>
+ <section>
+ <?php if (empty($users)): ?>
+ <p class="alert"><?= t('No user') ?></p>
+ <?php else: ?>
+ <table>
+ <tr>
+ <th><?= t('Username') ?></th>
+ <th><?= t('Administrator') ?></th>
+ <th><?= t('Default Project') ?></th>
+ <?php if ($_SESSION['user']['is_admin'] == 1): ?>
+ <th><?= t('Actions') ?></th>
+ <?php endif ?>
+ </tr>
+ <?php foreach ($users as $user): ?>
+ <tr>
+ <td>
+ <?= Helper\escape($user['username']) ?>
+ </td>
+ <td>
+ <?= $user['is_admin'] ? t('Yes') : t('No') ?>
+ </td>
+ <td>
+ <?= $projects[$user['default_project_id']] ?>
+ </td>
+ <?php if ($_SESSION['user']['is_admin'] == 1): ?>
+ <td>
+ <a href="?controller=user&amp;action=edit&amp;user_id=<?= $user['id'] ?>"><?= t('edit') ?></a>
+ <?php if (count($users) > 1): ?>
+ <?= t('or') ?>
+ <a href="?controller=user&amp;action=confirm&amp;user_id=<?= $user['id'] ?>"><?= t('remove') ?></a>
+ <?php endif ?>
+ </td>
+ <?php endif ?>
+ </tr>
+ <?php endforeach ?>
+ </table>
+ <?php endif ?>
+ </section>
+</section> \ No newline at end of file
diff --git a/templates/user_login.php b/templates/user_login.php
new file mode 100644
index 00000000..0bbd48a1
--- /dev/null
+++ b/templates/user_login.php
@@ -0,0 +1,20 @@
+<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&amp;action=check">
+
+ <?= 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')) ?>
+
+ <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
new file mode 100644
index 00000000..0c753c2a
--- /dev/null
+++ b/templates/user_new.php
@@ -0,0 +1,31 @@
+<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&amp;action=save" autocomplete="off">
+
+ <?= 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')) ?><br/>
+
+ <?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
+ <?= Helper\form_password('confirmation', $values, $errors, array('required')) ?><br/>
+
+ <?= Helper\form_label(t('Default Project'), 'default_project_id') ?>
+ <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
+
+ <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
+
+ <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
new file mode 100644
index 00000000..e1dc6f7b
--- /dev/null
+++ b/templates/user_remove.php
@@ -0,0 +1,14 @@
+<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"?', Helper\escape($user['username'])) ?></p>
+
+ <div class="form-actions">
+ <a href="?controller=user&amp;action=remove&amp;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