Regular users can remove only their own tasks

This commit is contained in:
Frédéric Guillot
2014-09-23 15:17:04 +02:00
parent 0bd0beba41
commit 484c9614d1
6 changed files with 145 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
</div>
<section class="task-show" id="task-section">
<?= Helper\template('task_sidebar', array('task' => $task)) ?>
<?= Helper\template('task_sidebar', array('task' => $task, 'hide_remove_menu' => isset($hide_remove_menu))) ?>
<div class="task-show-main">
<?= $task_content_for_layout ?>

View File

@@ -18,7 +18,9 @@
<a href="?controller=task&amp;action=open&amp;task_id=<?= $task['id'] ?>"><?= t('Open this task') ?></a>
<?php endif ?>
</li>
<li><a href="?controller=task&amp;action=remove&amp;task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li>
<?php if (! $hide_remove_menu): ?>
<li><a href="?controller=task&amp;action=remove&amp;task_id=<?= $task['id'] ?>"><?= t('Remove') ?></a></li>
<?php endif ?>
</ul>
</div>
</div>