Skip to content

Commit

Permalink
Changes to footer
Browse files Browse the repository at this point in the history
* Added "Force restart" option to processing jobs
* "Restart" and the new link are only shown to admins as only admins have access to that action
  • Loading branch information
Parziphal committed Jul 30, 2016
1 parent 61b48d0 commit b3dcc13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/job_task/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

<?php $this->contentFor('subnavbar', function(){ ?>
<li><?= $this->linkTo($this->t(".nav.list"), ['action' => "index"]) ?></li>
<?php if ($this->job_task->status == "error") : ?>
<?php if (current_user()->is_admin() && $this->job_task->status == "error") : ?>
<li><?= $this->linkTo($this->t(".nav.restart"), ["#restart", 'id' => $this->job_task->id]) ?></li>
<?php elseif (current_user()->is_admin() && $this->job_task->status != 'pending') : ?>
<li><?= $this->linkTo('Force restart', ["#restart", 'id' => $this->job_task->id]) ?></li>
<?php endif ?>
<?php }) ?>

0 comments on commit b3dcc13

Please sign in to comment.