<?php
$taskurl = Horde::addParameter('task.php', 'task=' . $task['task_id']);
$taskurl = Horde::addParameter($taskurl, 'tasklist=' . $tasklist_id);
$share = $GLOBALS['nag_shares']->getShare($tasklist_id);
?>
<table border="0" align="center" width="100%" cellspacing="0" cellpadding="2">
<tr class="control">
  <td align="left">
    <?php if ($share->hasPermission(Auth::getAuth(), _PERMS_EDIT)): ?>
      <?php if (!$task['completed']): ?>
        <?php echo Horde::link(Horde::applicationUrl(Horde::addParameter($taskurl, 'actionID=' . NAG_COMPLETE_TASKS)), _("Complete Task"), 'widget') ?><?php echo _("Complete Task") ?></a> |
      <?php endif; ?>
      <?php echo Horde::link(Horde::applicationUrl(Horde::addParameter($taskurl, 'actionID=' . NAG_MODIFY_TASK)), _("Modify Task"), 'widget') ?><?php echo _("Modify Task") ?></a>
    <?php endif; ?>
    <?php if ($share->hasPermission(Auth::getAuth(), _PERMS_DELETE)): ?>
      | <?php echo Horde::link(Horde::applicationUrl(Horde::addParameter($taskurl, 'actionID=' . NAG_DELETE_TASKS)), _("Delete Task"), 'widget') ?><?php echo _("Delete Task") ?></a>
    <?php endif; ?>
  </td>
  <td align="right">
    <?php echo Horde::link(Horde::applicationUrl('list.php'), _("Back to Task List"), 'widget') ?><?php echo _("Back to Task List") ?></a>&nbsp;&nbsp;
  </td>
</tr>
</table>
