Projects management refactoring
This commit is contained in:
@@ -1,77 +1,70 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2>
|
||||
</div>
|
||||
|
||||
<?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&project_id=<?= $project['id'] ?>&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_csrf() ?>
|
||||
<?= 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>
|
||||
<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_csrf() ?>
|
||||
<?= 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>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,43 +1,37 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2>
|
||||
</div>
|
||||
<section>
|
||||
|
||||
<h3><?= t('Define action parameters') ?></h3>
|
||||
<form method="post" action="?controller=action&action=create&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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>
|
||||
<section>
|
||||
|
||||
<h3><?= t('Define action parameters') ?></h3>
|
||||
<form method="post" action="?controller=action&action=create&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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>
|
||||
</form>
|
||||
@@ -1,16 +1,14 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Remove an automatic action') ?></h2>
|
||||
</div>
|
||||
<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="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'].Helper\param_csrf() ?>" 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 class="form-actions">
|
||||
<a href="?controller=action&action=remove&action_id=<?= $action['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=action&action=index&project_id=<?= $action['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -1,66 +1,58 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Edit the board for "%s"', $project['name']) ?></h2>
|
||||
</div>
|
||||
<section>
|
||||
|
||||
<h3><?= t('Change columns') ?></h3>
|
||||
<form method="post" action="?controller=board&action=update&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?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'].Helper\param_csrf() ?>"><?= 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'].Helper\param_csrf() ?>"><?= 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"/>
|
||||
</div>
|
||||
<section>
|
||||
</form>
|
||||
|
||||
<h3><?= t('Change columns') ?></h3>
|
||||
<form method="post" action="?controller=board&action=update&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?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'].Helper\param_csrf() ?>"><?= 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'].Helper\param_csrf() ?>"><?= 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>
|
||||
<h3><?= t('Add a new column') ?></h3>
|
||||
<form method="post" action="?controller=board&action=add&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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('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_csrf() ?>
|
||||
<?= 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>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Add this column') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,17 +1,15 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Remove a column') ?></h2>
|
||||
</div>
|
||||
<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="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'].Helper\param_csrf() ?>" 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 class="form-actions">
|
||||
<a href="?controller=board&action=remove&column_id=<?= $column['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=board&action=edit&project_id=<?= $column['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -1,24 +1,16 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="?controller=category&action=update&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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('autofocus required')) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
<section>
|
||||
|
||||
<form method="post" action="?controller=category&action=update&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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('autofocus required')) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</form>
|
||||
@@ -1,49 +1,41 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Categories') ?></h2>
|
||||
</div>
|
||||
|
||||
<?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_csrf() ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Category 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"/>
|
||||
</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_csrf() ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Category 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"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</form>
|
||||
14
app/Templates/project_disable.php
Normal file
14
app/Templates/project_disable.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Project activation') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info">
|
||||
<?= t('Do you really want to disable this project: "%s"?', $project['name']) ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="?controller=project&action=disable&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
14
app/Templates/project_duplicate.php
Normal file
14
app/Templates/project_duplicate.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Clone this project') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info">
|
||||
<?= t('Do you really want to duplicate this project: "%s"?', $project['name']) ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="?controller=project&action=duplicate&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,25 +1,17 @@
|
||||
<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 class="page-header">
|
||||
<h2><?= t('Edit project') ?></h2>
|
||||
</div>
|
||||
<form method="post" action="?controller=project&action=update&project_id=<?= $values['id'] ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="?controller=project&action=update&project_id=<?= $values['id'] ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= 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>
|
||||
</form>
|
||||
14
app/Templates/project_enable.php
Normal file
14
app/Templates/project_enable.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Project activation') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info">
|
||||
<?= t('Do you really want to enable this project: "%s"?', $project['name']) ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="?controller=project&action=enable&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,33 +1,24 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2>
|
||||
<?= t('Tasks exportation for "%s"', $project['name']) ?>
|
||||
</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=index"><?= t('List of projects') ?></a></li>
|
||||
</ul>
|
||||
<div class="page-header">
|
||||
<h2>
|
||||
<?= t('Tasks exportation for "%s"', $project['name']) ?>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<form method="get" action="?" autocomplete="off">
|
||||
|
||||
<?= Helper\form_hidden('controller', $values) ?>
|
||||
<?= Helper\form_hidden('action', $values) ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Start Date'), 'from') ?>
|
||||
<?= Helper\form_text('from', $values, $errors, array('required', 'placeholder="'.t('month/day/year').'"'), 'form-date') ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('End Date'), 'to') ?>
|
||||
<?= Helper\form_text('to', $values, $errors, array('required', 'placeholder="'.t('month/day/year').'"'), 'form-date') ?>
|
||||
|
||||
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
<section id="project-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_label(t('Start Date'), 'from') ?>
|
||||
<?= Helper\form_text('from', $values, $errors, array('required', 'placeholder="'.t('month/day/year').'"'), 'form-date') ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('End Date'), 'to') ?>
|
||||
<?= Helper\form_text('to', $values, $errors, array('required', 'placeholder="'.t('month/day/year').'"'), 'form-date') ?>
|
||||
|
||||
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</form>
|
||||
@@ -8,99 +8,32 @@
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<section>
|
||||
<?php if (empty($projects)): ?>
|
||||
<?php if (empty($active_projects) && empty($inactive_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>
|
||||
<ul>
|
||||
<?php if ($project['nb_tasks'] > 0): ?>
|
||||
<?php if (! empty($active_projects)): ?>
|
||||
<h3><?= t('Active projects') ?></h3>
|
||||
<ul class="project-listing">
|
||||
<?php foreach ($active_projects as $project): ?>
|
||||
<li>
|
||||
<a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['nb_active_tasks'] > 0): ?>
|
||||
<li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('%d tasks on the board', $project['nb_active_tasks']) ?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if (! empty($inactive_projects)): ?>
|
||||
<h3><?= t('Inactive projects') ?></h3>
|
||||
<ul class="project-listing">
|
||||
<?php foreach ($inactive_projects as $project): ?>
|
||||
<li>
|
||||
<a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= Helper\escape($project['name']) ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['nb_inactive_tasks'] > 0): ?>
|
||||
<li><a href="?controller=project&action=tasks&project_id=<?= $project['id'] ?>"><?= t('%d closed tasks', $project['nb_inactive_tasks']) ?></a></li>
|
||||
<?php endif ?>
|
||||
|
||||
<li><?= t('%d tasks in total', $project['nb_tasks']) ?></li>
|
||||
|
||||
<?php else: ?>
|
||||
<li><?= t('no task for this project') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</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'].Helper\param_csrf() ?>"><?= t('Disable') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="?controller=project&action=enable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= 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>
|
||||
<li>
|
||||
<a href="?controller=project&action=export&project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=duplicate&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Clone Project') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</section>
|
||||
17
app/Templates/project_layout.php
Normal file
17
app/Templates/project_layout.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Project "%s"', $project['name']) ?></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"><?= t('All projects') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="project-show" id="project-section">
|
||||
|
||||
<?= Helper\template('project_sidebar', array('project' => $project)) ?>
|
||||
|
||||
<div class="project-show-main">
|
||||
<?= $project_content_for_layout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -1,16 +1,14 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Remove project') ?></h2>
|
||||
</div>
|
||||
<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="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'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<a href="?controller=project&action=remove&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
18
app/Templates/project_share.php
Normal file
18
app/Templates/project_share.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Public access') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if ($project['is_public']): ?>
|
||||
|
||||
<div class="settings">
|
||||
<strong><a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></strong><br/>
|
||||
<input type="text" readonly="readonly" value="<?= Helper\get_current_base_url() ?>?controller=board&action=readonly&token=<?= $project['token'] ?>"/>
|
||||
</div>
|
||||
|
||||
<a href="?controller=project&action=disablePublic&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Disable public access') ?></a>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<a href="?controller=project&action=enablePublic&project_id=<?= $project['id'].Helper\param_csrf() ?>" class="btn btn-blue"><?= t('Enable public access') ?></a>
|
||||
|
||||
<?php endif ?>
|
||||
50
app/Templates/project_show.php
Normal file
50
app/Templates/project_show.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Summary') ?></h2>
|
||||
</div>
|
||||
<ul class="settings">
|
||||
<li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li>
|
||||
|
||||
<?php if ($project['is_public']): ?>
|
||||
<li><a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></li>
|
||||
<?php else: ?>
|
||||
<li><?= t('Public access disabled') ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['last_modified']): ?>
|
||||
<li><?= dt('Last modified on %B %e, %Y at %k:%M %p', $project['last_modified']) ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($stats['nb_tasks'] > 0): ?>
|
||||
|
||||
<?php if ($stats['nb_active_tasks'] > 0): ?>
|
||||
<li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('%d tasks on the board', $stats['nb_active_tasks']) ?></a></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($stats['nb_inactive_tasks'] > 0): ?>
|
||||
<li><a href="?controller=project&action=tasks&project_id=<?= $project['id'] ?>"><?= t('%d closed tasks', $stats['nb_inactive_tasks']) ?></a></li>
|
||||
<?php endif ?>
|
||||
|
||||
<li><?= t('%d tasks in total', $stats['nb_tasks']) ?></li>
|
||||
|
||||
<?php else: ?>
|
||||
<li><?= t('No task for this project') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Board') ?></h2>
|
||||
</div>
|
||||
<table class="table-stripped">
|
||||
<tr>
|
||||
<th width="50%"><?= t('Column') ?></th>
|
||||
<th><?= t('Task limit') ?></th>
|
||||
<th><?= t('Active tasks') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($stats['columns'] as $column): ?>
|
||||
<tr>
|
||||
<td><?= Helper\escape($column['title']) ?></td>
|
||||
<td><?= $column['task_limit'] ?: '∞' ?></td>
|
||||
<td><?= $column['nb_active_tasks'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
47
app/Templates/project_sidebar.php
Normal file
47
app/Templates/project_sidebar.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<div class="project-show-sidebar">
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
<div class="project-show-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="?controller=project&action=show&project_id=<?= $project['id'] ?>"><?= t('Summary') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=export&project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a>
|
||||
</li>
|
||||
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<li>
|
||||
<a href="?controller=project&action=share&project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit project') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=board&action=edit&project_id=<?= $project['id'] ?>"><?= t('Edit board') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=category&action=index&project_id=<?= $project['id'] ?>"><?= t('Categories management') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=users&project_id=<?= $project['id'] ?>"><?= t('Users management') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('Automatic actions') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=confirmDuplicate&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Duplicate') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($project['is_active']): ?>
|
||||
<a href="?controller=project&action=confirmDisable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Disable') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="?controller=project&action=confirmEnable&project_id=<?= $project['id'].Helper\param_csrf() ?>"><?= t('Enable') ?></a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?controller=project&action=confirmRemove&project_id=<?= $project['id'] ?>"><?= t('Remove') ?></a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,46 +1,36 @@
|
||||
<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>
|
||||
<div class="page-header">
|
||||
<h2><?= t('List of authorized users') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($users['not_allowed'])): ?>
|
||||
<form method="post" action="?controller=project&action=allow&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<?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.Helper\param_csrf() ?>"><?= t('revoke') ?></a>)
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<p><?= t('Don\'t forget that administrators have access to everything.') ?></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?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_csrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('User'), 'user_id') ?>
|
||||
<?= Helper\form_select('user_id', $users['not_allowed']) ?><br/>
|
||||
<?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?>
|
||||
|
||||
<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 ?>
|
||||
<?= Helper\form_label(t('User'), 'user_id') ?>
|
||||
<?= Helper\form_select('user_id', $users['not_allowed']) ?><br/>
|
||||
|
||||
<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.Helper\param_csrf() ?>"><?= t('revoke') ?></a>)
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<p><?= t('Don\'t forget that administrators have access to everything.') ?></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user