summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBusfreak <martin@middeke.de>2016-01-12 18:28:31 +0100
committerBusfreak <martin@middeke.de>2016-01-12 18:28:31 +0100
commit286d46313a6c3d2c49547ba2bfea2a1db7eac205 (patch)
treea5ace09a4fb907a8b98f0818c8f1db8b14709e8b /app
parent6a7a4c2bd225d7767ebc2d0c41e7090a31378088 (diff)
add hook to app/filters_helper, add $project delivery to project/filters
This request adds two new hooks to the app/filters_helper (before and after) including delivery of $project to hooked template if set. Additionally it delivers $project from project/filters to app/filters_helper.
Diffstat (limited to 'app')
-rw-r--r--app/Template/app/filters_helper.php4
-rw-r--r--app/Template/project/filters.php3
2 files changed, 5 insertions, 2 deletions
diff --git a/app/Template/app/filters_helper.php b/app/Template/app/filters_helper.php
index 71b57a8c..4e11c669 100644
--- a/app/Template/app/filters_helper.php
+++ b/app/Template/app/filters_helper.php
@@ -1,3 +1,4 @@
+<?= $this->hook->render('template:app:filters_helper:before', isset($project) ? array('project' => $project) : array('project' => $project = 0)) ?>
<div class="dropdown filters">
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Filters') ?></a>
<ul>
@@ -15,4 +16,5 @@
<?= $this->url->doc(t('View advanced search syntax'), 'search') ?>
</li>
</ul>
-</div> \ No newline at end of file
+</div>
+<?= $this->hook->render('template:app:filters_helper:after', isset($project) ? array('project' => $project) : array('project' => $project = 0)) ?> \ No newline at end of file
diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php
index 0dbb52c9..78794e1c 100644
--- a/app/Template/project/filters.php
+++ b/app/Template/project/filters.php
@@ -63,7 +63,8 @@
</form>
<div class="filter-dropdowns">
- <?= $this->render('app/filters_helper', array('reset' => 'status:open')) ?>
+
+ <?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?>
<?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?>
<div class="dropdown filters">