Start templates cleanup and reorganisation
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
</div>
|
||||
|
||||
<h3><?= t('Choose an event') ?></h3>
|
||||
<form method="post" action="?controller=action&action=params&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('action', 'params', array('project_id' => $project['id'])) ?>">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
<?= Helper\form_hidden('action_name', $values) ?>
|
||||
|
||||
@@ -17,6 +19,7 @@
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?> <a href="?controller=action&action=index&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -42,17 +42,16 @@
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<a href="?controller=action&action=confirm&project_id=<?= $project['id'] ?>&action_id=<?= $action['id'] ?>"><?= t('Remove') ?></a>
|
||||
<?= Helper\a(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<h3><?= t('Add an action') ?></h3>
|
||||
<form method="post" action="?controller=action&action=event&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('action', 'event', array('project_id' => $project['id'])) ?>">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
</div>
|
||||
|
||||
<h3><?= t('Define action parameters') ?></h3>
|
||||
<form method="post" action="?controller=action&action=create&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('action', 'create', array('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) ?>
|
||||
@@ -35,6 +37,7 @@
|
||||
|
||||
<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>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<div class="form-actions">
|
||||
<?= Helper\a(t('Yes'), 'action', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?>
|
||||
<?= t('or') ?> <?= Helper\a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,24 +1,21 @@
|
||||
<section id="main">
|
||||
|
||||
<div class="page-header board">
|
||||
<h2><?= t('Project "%s"', $current_project_name) ?></h2>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h3><?= t('Change assignee for the task "%s"', $values['title']) ?></h3>
|
||||
<form method="post" action="?controller=board&action=updateAssignee" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('board', 'updateAssignee', array('task_id' => $values['id'])) ?>">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
|
||||
<?= Helper\form_hidden('id', $values) ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Assignee'), 'owner_id') ?>
|
||||
<?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
|
||||
<?= Helper\form_select('owner_id', $users_list, $values) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?> <a href="?controller=board&action=show&project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
@@ -1,22 +1,20 @@
|
||||
<section id="main">
|
||||
|
||||
<div class="page-header board">
|
||||
<h2><?= t('Project "%s"', $current_project_name) ?></h2>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h3><?= t('Change category for the task "%s"', $values['title']) ?></h3>
|
||||
<form method="post" action="?controller=board&action=updateCategory" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('board', 'updateCategory', array('task_id' => $values['id'])) ?>">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
|
||||
<?= Helper\form_hidden('id', $values) ?>
|
||||
<?= Helper\form_hidden('project_id', $values) ?>
|
||||
|
||||
<?= Helper\form_label(t('Category'), 'category_id') ?>
|
||||
<?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/>
|
||||
<?= Helper\form_select('category_id', $categories_list, $values) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?> <a href="?controller=board&action=show&project_id=<?= $values['project_id'] ?>"><?= t('cancel') ?></a>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -4,7 +4,7 @@
|
||||
<section>
|
||||
|
||||
<h3><?= t('Change columns') ?></h3>
|
||||
<form method="post" action="?controller=board&action=update&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('board', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?php $i = 0; ?>
|
||||
<table>
|
||||
@@ -46,9 +46,12 @@
|
||||
</form>
|
||||
|
||||
<h3><?= t('Add a new column') ?></h3>
|
||||
<form method="post" action="?controller=board&action=add&project_id=<?= $project['id'] ?>" autocomplete="off">
|
||||
<form method="post" action="<?= Helper\u('board', 'add', array('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')) ?>
|
||||
|
||||
35
app/Template/board/filters.php
Normal file
35
app/Template/board/filters.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('Filter by user') ?>
|
||||
<?= Helper\form_select('user_id', $users) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= t('Filter by category') ?>
|
||||
<?= Helper\form_select('category_id', $categories) ?>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-search"></i>
|
||||
<?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-check-square-o fa-fw"></i>
|
||||
<?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
<?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-line-chart fa-fw"></i>
|
||||
<?= Helper\a(t('Analytics'), 'analytic', 'repartition', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<li><i class="fa fa-cog fa-fw"></i>
|
||||
<?= Helper\a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
21
app/Template/board/index.php
Normal file
21
app/Template/board/index.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<section id="main">
|
||||
|
||||
<?= Helper\template('board/filters', array(
|
||||
'categories' => $categories,
|
||||
'users' => $users,
|
||||
'project' => $project,
|
||||
)) ?>
|
||||
|
||||
<?php if (empty($board)): ?>
|
||||
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
|
||||
<?php else: ?>
|
||||
<?= Helper\template('board/show', array(
|
||||
'project' => $project,
|
||||
'board' => $board,
|
||||
'categories' => $categories,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
</section>
|
||||
@@ -21,7 +21,7 @@
|
||||
<?php foreach ($column['tasks'] as $task): ?>
|
||||
<div class="task-board task-<?= $task['color_id'] ?>">
|
||||
|
||||
<?= Helper\template('board_task', array('task' => $task, 'categories' => $categories, 'not_editable' => true, 'project' => $project)) ?>
|
||||
<?= Helper\template('board/task', array('task' => $task, 'categories' => $categories, 'not_editable' => true, 'project' => $project)) ?>
|
||||
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
@@ -1,8 +1,9 @@
|
||||
<table id="board"
|
||||
data-project-id="<?= $current_project_id ?>"
|
||||
data-time="<?= time() ?>"
|
||||
data-project-id="<?= $project['id'] ?>"
|
||||
data-check-interval="<?= $board_private_refresh_interval ?>"
|
||||
data-csrf-token=<?= \Core\Security::getCSRFToken() ?>>
|
||||
data-save-url="<?= Helper\u('board', 'save', array('project_id' => $project['id'])) ?>"
|
||||
data-check-url="<?= Helper\u('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
|
||||
>
|
||||
<tr>
|
||||
<?php $column_with = round(100 / count($board), 2); ?>
|
||||
<?php foreach ($board as $column): ?>
|
||||
@@ -37,9 +38,10 @@
|
||||
data-owner-id="<?= $task['owner_id'] ?>"
|
||||
data-category-id="<?= $task['category_id'] ?>"
|
||||
data-due-date="<?= $task['date_due'] ?>"
|
||||
data-task-url="<?= Helper\u('task', 'show', array('task_id' => $task['id'])) ?>"
|
||||
title="<?= t('View this task') ?>">
|
||||
|
||||
<?= Helper\template('board_task', array('task' => $task, 'categories' => $categories)) ?>
|
||||
<?= Helper\template('board/task', array('task' => $task, 'categories' => $categories)) ?>
|
||||
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php if (isset($not_editable)): ?>
|
||||
|
||||
<a href="?controller=task&action=readonly&task_id=<?= $task['id'] ?>&token=<?= $project['token'] ?>">#<?= $task['id'] ?></a>
|
||||
<?= Helper\a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
|
||||
|
||||
<?php if ($task['reference']): ?>
|
||||
<span class="task-board-reference" title="<?= t('Reference') ?>">
|
||||
@@ -23,14 +23,12 @@
|
||||
<?php endif ?>
|
||||
|
||||
<div class="task-board-title">
|
||||
<a href="?controller=task&action=readonly&task_id=<?= $task['id'] ?>&token=<?= $project['token'] ?>">
|
||||
<?= Helper\escape($task['title']) ?>
|
||||
</a>
|
||||
<?= Helper\a(Helper\escape($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<a class="task-edit-popover" href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a>
|
||||
<?= Helper\a('#'.$task['id'], 'task', 'edit', array('task_id' => $task['id']), false, 'task-edit-popover', t('Edit this task')) ?>
|
||||
|
||||
<?php if ($task['reference']): ?>
|
||||
<span class="task-board-reference" title="<?= t('Reference') ?>">
|
||||
@@ -41,13 +39,15 @@
|
||||
-
|
||||
|
||||
<span class="task-board-user">
|
||||
<a class="assignee-popover" href="?controller=board&action=changeAssignee&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>">
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?></a>
|
||||
<?php else: ?>
|
||||
<?= t('Nobody assigned') ?>
|
||||
<?php endif ?>
|
||||
</a>
|
||||
<?= Helper\a(
|
||||
! empty($task['owner_id']) ? t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned'),
|
||||
'board',
|
||||
'changeAssignee',
|
||||
array('task_id' => $task['id']),
|
||||
false,
|
||||
'assignee-popover',
|
||||
t('Change assignee')
|
||||
) ?>
|
||||
</span>
|
||||
|
||||
<?php if ($task['score']): ?>
|
||||
@@ -55,7 +55,7 @@
|
||||
<?php endif ?>
|
||||
|
||||
<div class="task-board-title">
|
||||
<a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a>
|
||||
<?= Helper\a(Helper\escape($task['title']), 'task', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
@@ -64,9 +64,15 @@
|
||||
<?php if ($task['category_id']): ?>
|
||||
<div class="task-board-category-container">
|
||||
<span class="task-board-category">
|
||||
<a class="category-popover" href="?controller=board&action=changeCategory&task_id=<?= $task['id'] ?>" title="<?= t('Change category') ?>">
|
||||
<?= Helper\in_list($task['category_id'], $categories) ?>
|
||||
</a>
|
||||
<?= Helper\a(
|
||||
Helper\in_list($task['category_id'], $categories),
|
||||
'board',
|
||||
'changeCategory',
|
||||
array('task_id' => $task['id']),
|
||||
false,
|
||||
'category-popover',
|
||||
t('Change category')
|
||||
) ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -1,50 +0,0 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('Filter by user') ?>
|
||||
<?= Helper\form_select('user_id', $users, $filters) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= t('Filter by category') ?>
|
||||
<?= Helper\form_select('category_id', $categories, $filters) ?>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-search"></i>
|
||||
<?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-check-square-o fa-fw"></i>
|
||||
<?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
<?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-line-chart fa-fw"></i>
|
||||
<?= Helper\a(t('Analytics'), 'analytic', 'repartition', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<li><i class="fa fa-cog fa-fw"></i>
|
||||
<?= Helper\a(t('Configure'), 'project', 'show', array('project_id' => $current_project_id)) ?>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php if (empty($board)): ?>
|
||||
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
|
||||
<?php else: ?>
|
||||
<?= Helper\template('board_show', array(
|
||||
'current_project_id' => $current_project_id,
|
||||
'board' => $board,
|
||||
'categories' => $categories,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
</section>
|
||||
@@ -34,7 +34,7 @@
|
||||
<ul>
|
||||
<?php if (isset($board_selector) && ! empty($board_selector)): ?>
|
||||
<li>
|
||||
<select id="board-selector" data-placeholder="<?= t('Display another project') ?>">
|
||||
<select id="board-selector" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= Helper\u('board', 'show', array('project_id' => '%d')) ?>">
|
||||
<option value=""></option>
|
||||
<?php foreach($board_selector as $board_id => $board_name): ?>
|
||||
<option value="<?= $board_id ?>"><?= Helper\escape($board_name) ?></option>
|
||||
|
||||
Reference in New Issue
Block a user