activitylog: add links to previous/next action
This commit is contained in:
parent
40656be2c3
commit
dc1363238b
|
@ -136,6 +136,12 @@ class ShowController extends ActionController
|
|||
$this->view->entry = $this->db()->fetchActivityLogEntry(Util::hex2binary($checksum));
|
||||
}
|
||||
|
||||
$this->view->neighbors = $this->db()->getActivitylogNeighbors(
|
||||
$id,
|
||||
$this->params->get('type'),
|
||||
$this->params->get('name')
|
||||
);
|
||||
|
||||
$entry = $this->view->entry;
|
||||
$this->activityTabs($entry);
|
||||
$this->showInfo($entry);
|
||||
|
|
|
@ -8,6 +8,8 @@ class ActivityLogTable extends QuickTable
|
|||
{
|
||||
protected $filters = array();
|
||||
|
||||
protected $extraParams = array();
|
||||
|
||||
public function getColumns()
|
||||
{
|
||||
return array(
|
||||
|
@ -20,7 +22,10 @@ class ActivityLogTable extends QuickTable
|
|||
|
||||
protected function getActionUrl($row)
|
||||
{
|
||||
return $this->url('director/show/activitylog', array('id' => $row->id));
|
||||
return $this->url(
|
||||
'director/show/activitylog',
|
||||
array_merge(array('id' => $row->id), $this->extraParams
|
||||
));
|
||||
}
|
||||
|
||||
public function getTitles()
|
||||
|
@ -37,6 +42,10 @@ class ActivityLogTable extends QuickTable
|
|||
{
|
||||
$this->filters[] = array('l.object_type = ?', $type);
|
||||
$this->filters[] = array('l.object_name = ?', $name);
|
||||
$this->extraParams = array(
|
||||
'type' => $type,
|
||||
'name' => $name,
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -4,5 +4,11 @@
|
|||
</div>
|
||||
|
||||
<div class="content">
|
||||
<p><?php if ($this->neighbors->prev): ?>
|
||||
<?= $this->qlink('<- prev', $this->url()->with('id', $this->neighbors->prev)) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->neighbors->next): ?>
|
||||
<?= $this->qlink('next ->', $this->url()->with('id', $this->neighbors->next)) ?>
|
||||
<?php endif ?></p>
|
||||
<?= $this->output ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue