neighbors->prev): ?> += $this->qlink('<- prev', $this->url()->with('id', $this->neighbors->prev)) ?> + +neighbors->next): ?> + = $this->qlink('next ->', $this->url()->with('id', $this->neighbors->next)) ?> +
= $this->output ?>diff --git a/application/controllers/ShowController.php b/application/controllers/ShowController.php index ce30eccc..9495be98 100644 --- a/application/controllers/ShowController.php +++ b/application/controllers/ShowController.php @@ -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); diff --git a/application/tables/ActivityLogTable.php b/application/tables/ActivityLogTable.php index 299741e1..442a87f5 100644 --- a/application/tables/ActivityLogTable.php +++ b/application/tables/ActivityLogTable.php @@ -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; } diff --git a/application/views/scripts/show/activitylog.phtml b/application/views/scripts/show/activitylog.phtml index 06a9d4fd..40523a4c 100644 --- a/application/views/scripts/show/activitylog.phtml +++ b/application/views/scripts/show/activitylog.phtml @@ -4,5 +4,11 @@
neighbors->prev): ?> += $this->qlink('<- prev', $this->url()->with('id', $this->neighbors->prev)) ?> + +neighbors->next): ?> + = $this->qlink('next ->', $this->url()->with('id', $this->neighbors->next)) ?> +
= $this->output ?>