First commit

This commit is contained in:
Frédéric Guillot
2014-01-25 14:56:02 -05:00
commit 9383a15af6
80 changed files with 7519 additions and 0 deletions

1
templates/.htaccess Normal file
View File

@@ -0,0 +1 @@
Deny from all

40
templates/board_edit.php Normal file
View File

@@ -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>

57
templates/board_index.php Normal file
View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

51
templates/layout.php Normal file
View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

20
templates/project_new.php Normal file
View File

@@ -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>

View File

@@ -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>

16
templates/task_close.php Normal file
View File

@@ -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>

36
templates/task_edit.php Normal file
View File

@@ -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>

34
templates/task_new.php Normal file
View File

@@ -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>

16
templates/task_open.php Normal file
View File

@@ -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>

54
templates/task_show.php Normal file
View File

@@ -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>

34
templates/user_edit.php Normal file
View File

@@ -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>

View File

@@ -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>

46
templates/user_index.php Normal file
View File

@@ -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>

20
templates/user_login.php Normal file
View File

@@ -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>

31
templates/user_new.php Normal file
View File

@@ -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>

14
templates/user_remove.php Normal file
View File

@@ -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>