diff options
Diffstat (limited to 'app/Template/tasklink')
-rw-r--r-- | app/Template/tasklink/create.php | 10 | ||||
-rw-r--r-- | app/Template/tasklink/edit.php | 2 | ||||
-rw-r--r-- | app/Template/tasklink/show.php | 32 |
3 files changed, 21 insertions, 23 deletions
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php index 2832bdc7..02d38a9b 100644 --- a/app/Template/tasklink/create.php +++ b/app/Template/tasklink/create.php @@ -2,7 +2,7 @@ <h2><?= t('Add a new link') ?></h2> </div> -<form action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off"> +<form class="popover-form" action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> @@ -26,12 +26,8 @@ 'autocomplete') ?> <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> - <?php if (isset($ajax)): ?> - <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> - <?php else: ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - <?php endif ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> </form>
\ No newline at end of file diff --git a/app/Template/tasklink/edit.php b/app/Template/tasklink/edit.php index 896f84c0..15afe047 100644 --- a/app/Template/tasklink/edit.php +++ b/app/Template/tasklink/edit.php @@ -27,7 +27,7 @@ 'autocomplete') ?> <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php index 5843da17..8527a344 100644 --- a/app/Template/tasklink/show.php +++ b/app/Template/tasklink/show.php @@ -1,15 +1,17 @@ -<?php if (! empty($links)): ?> <div class="page-header"> - <h2><?= t('Links') ?></h2> + <h2><?= t('Internal links') ?></h2> </div> -<table id="links"> +<?php if (empty($links)): ?> + <p class="alert"><?= t('There is no internal link for the moment.') ?></p> +<?php else: ?> +<table id="links" class="table-small table-stripped"> <tr> <th class="column-20"><?= t('Label') ?></th> <th class="column-30"><?= t('Task') ?></th> <th class="column-20"><?= t('Project') ?></th> <th><?= t('Column') ?></th> <th><?= t('Assignee') ?></th> - <?php if ($editable): ?> + <?php if ($editable && $this->user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?> <th class="column-5"><?= t('Action') ?></th> <?php endif ?> </tr> @@ -25,7 +27,7 @@ <td> <?php if ($is_public): ?> <?= $this->url->link( - $this->e('#'.$link['task_id'].' '.$link['title']), + $this->text->e('#'.$link['task_id'].' '.$link['title']), 'task', 'readonly', array('task_id' => $link['task_id'], 'token' => $project['token']), @@ -34,7 +36,7 @@ ) ?> <?php else: ?> <?= $this->url->link( - $this->e('#'.$link['task_id'].' '.$link['title']), + $this->text->e('#'.$link['task_id'].' '.$link['title']), 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), @@ -43,28 +45,28 @@ ) ?> <?php endif ?> - <br/> + <br> <?php if (! empty($link['task_time_spent'])): ?> - <strong><?= $this->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?> + <strong><?= $this->text->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?> <?php endif ?> <?php if (! empty($link['task_time_estimated'])): ?> - <strong><?= $this->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?> + <strong><?= $this->text->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?> <?php endif ?> </td> - <td><?= $this->e($link['project_name']) ?></td> - <td><?= $this->e($link['column_title']) ?></td> + <td><?= $this->text->e($link['project_name']) ?></td> + <td><?= $this->text->e($link['column_title']) ?></td> <td> <?php if (! empty($link['task_assignee_username'])): ?> <?php if ($editable): ?> - <?= $this->url->link($this->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?> + <?= $this->url->link($this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?> <?php else: ?> - <?= $this->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?> + <?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?> <?php endif ?> <?php endif ?> </td> - <?php if ($editable): ?> + <?php if ($editable && $this->user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?> <td> <div class="dropdown"> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a> @@ -102,7 +104,7 @@ ), 'autocomplete') ?> - <input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/> + <button type="submit" class="btn btn-blue"><?= t('Add') ?></button> </form> <?php endif ?> |