Added task creation menu for all projects views

This commit is contained in:
Frederic Guillot
2016-05-15 20:09:43 -04:00
parent 67b8361649
commit 8a6f02735b
14 changed files with 53 additions and 42 deletions

View File

@@ -12,9 +12,9 @@
<!-- column in expanded mode -->
<div class="board-column-expanded">
<?php if (! $not_editable && $this->user->hasProjectAccess('taskcreation', 'create', $column['project_id'])): ?>
<?php if (! $not_editable && $this->user->hasProjectAccess('TaskCreationController', 'show', $column['project_id'])): ?>
<div class="board-add-icon">
<?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
<?= $this->url->link('+', 'TaskCreationController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
</div>
<?php endif ?>
@@ -35,10 +35,10 @@
<i class="fa fa-minus-square fa-fw"></i>
<a href="#" class="board-toggle-column-view" data-column-id="<?= $column['id'] ?>"><?= t('Hide this column') ?></a>
</li>
<?php if ($this->user->hasProjectAccess('Taskcreation', 'create', $column['project_id'])): ?>
<?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $column['project_id'])): ?>
<li>
<i class="fa fa-align-justify" aria-hidden="true"></i>
<?= $this->url->link(t('Create tasks in bulk'), 'TaskBulk', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
<?= $this->url->link(t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
</li>
<?php if ($column['nb_tasks'] > 0): ?>
<li>

View File

@@ -13,7 +13,7 @@
data-save-url="<?= $this->url->href('board', 'save', array('project_id' => $project['id'])) ?>"
data-reload-url="<?= $this->url->href('board', 'reload', array('project_id' => $project['id'])) ?>"
data-check-url="<?= $this->url->href('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
data-task-creation-url="<?= $this->url->href('taskcreation', 'create', array('project_id' => $project['id'])) ?>"
data-task-creation-url="<?= $this->url->href('TaskCreationController', 'show', array('project_id' => $project['id'])) ?>"
>
<?php endif ?>
@@ -55,4 +55,4 @@
</table>
<?php endif ?>
</div>
</div>

View File

@@ -59,4 +59,4 @@
<?= $paginator ?>
<?php endif ?>
</section>
</section>

View File

@@ -30,21 +30,29 @@
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?>
<li>
<i class="fa fa-plus fa-fw"></i>
<?= $this->url->link(t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?>
</li>
<?php endif ?>
<li>
<i class="fa fa-dashboard fa-fw"></i>&nbsp;
<i class="fa fa-dashboard fa-fw"></i>
<?= $this->url->link(t('Activity'), 'activity', 'project', array('project_id' => $project['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('customfilter', 'index', $project['id'])): ?>
<li>
<i class="fa fa-filter fa-fw"></i>&nbsp;
<i class="fa fa-filter fa-fw"></i>
<?= $this->url->link(t('Custom filters'), 'customfilter', 'index', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($project['is_public']): ?>
<li>
<i class="fa fa-share-alt fa-fw"></i>&nbsp;<?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
<i class="fa fa-share-alt fa-fw"></i>
<?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
@@ -52,21 +60,21 @@
<?php if ($this->user->hasProjectAccess('analytic', 'tasks', $project['id'])): ?>
<li>
<i class="fa fa-line-chart fa-fw"></i>&nbsp;
<i class="fa fa-line-chart fa-fw"></i>
<?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('export', 'tasks', $project['id'])): ?>
<li>
<i class="fa fa-download fa-fw"></i>&nbsp;
<i class="fa fa-download fa-fw"></i>
<?= $this->url->link(t('Exports'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('ProjectEdit', 'edit', $project['id'])): ?>
<li>
<i class="fa fa-cog fa-fw"></i>&nbsp;
<i class="fa fa-cog fa-fw"></i>
<?= $this->url->link(t('Settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>

View File

@@ -2,7 +2,7 @@
<h2><?= t('Create tasks in bulk') ?></h2>
</div>
<form class="popover-form" method="post" action="<?= $this->url->href('TaskBulk', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<form class="popover-form" method="post" action="<?= $this->url->href('TaskBulkController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('column_id', $values) ?>
<?= $this->form->hidden('swimlane_id', $values) ?>

View File

@@ -2,7 +2,7 @@
<h2><?= t('New task') ?></h2>
</div>
<form class="popover-form" method="post" action="<?= $this->url->href('taskcreation', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off">
<form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>