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.
This commit is contained in:
Busfreak 2016-01-12 18:28:31 +01:00
parent 6a7a4c2bd2
commit 286d46313a
2 changed files with 5 additions and 2 deletions

View File

@ -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>
</div>
<?= $this->hook->render('template:app:filters_helper:after', isset($project) ? array('project' => $project) : array('project' => $project = 0)) ?>

View File

@ -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">