Changes to footer

* 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
This commit is contained in:
Renzo 2016-07-30 00:19:50 -05:00
parent 61b48d0ca1
commit b3dcc13d0c

View File

@ -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 }) ?>