Skip to content

Commit

Permalink
Adding hasFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Nov 20, 2017
1 parent e6e79fd commit dbce6ce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions components/com_fabrik/layouts/list/fabrik-filters-modal.php
Expand Up @@ -68,8 +68,10 @@
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal"><?php echo FabrikHelperHTML::icon('icon-cancel', FText::_('COM_FABRIK_CLOSE_WINDOW')); ?></a>
<?php
if ($d->showClearFilters) : ?>
<a class="btn clearFilters" href="#">
if ($d->showClearFilters) :
$clearFiltersClass = $d->gotOptionalFilters ? "btn clearFilters hasFilters" : "btn clearFilters";
?>
<a class="<?php echo $clearFiltersClass; ?>" href="#">
<?php echo FabrikHelperHTML::icon('icon-refresh', FText::_('COM_FABRIK_CLEAR')); ?>
</a>
<?php endif ?>
Expand Down
Expand Up @@ -44,9 +44,11 @@


<?php endif;
if (($this->showClearFilters && (($this->filterMode === 3 || $this->filterMode === 4)) || $this->bootShowFilters == false)) :?>
if (($this->showClearFilters && (($this->filterMode === 3 || $this->filterMode === 4)) || $this->bootShowFilters == false)) :
$clearFiltersClass = $this->gotOptionalFilters ? "clearFilters hasFilters" : "clearFilters";
?>
<li>
<a class="clearFilters" href="#">
<a class="<?php echo $clearFiltersClass; ?>" href="#">
<?php echo FabrikHelperHTML::icon('icon-refresh', FText::_('COM_FABRIK_CLEAR'));?>
</a>
</li>
Expand Down
6 changes: 4 additions & 2 deletions components/com_fabrik/views/list/tmpl/div/default_buttons.php
Expand Up @@ -46,9 +46,11 @@
</li>

<?php endif;
if (($this->showClearFilters && (($this->filterMode === 3 || $this->filterMode === 4)) || $this->bootShowFilters == false)) :?>
if (($this->showClearFilters && (($this->filterMode === 3 || $this->filterMode === 4)) || $this->bootShowFilters == false)):
$clearFiltersClass = $this->gotOptionalFilters ? "clearFilters hasFilters" : "clearFilters";
?>
<li>
<a class="clearFilters" href="#">
<a class="<?php echo $clearFiltersClass; ?>" href="#">
<?php echo FabrikHelperHTML::icon('icon-refresh'); ?>
<?php echo FText::_('COM_FABRIK_CLEAR')?>
</a>
Expand Down
1 change: 1 addition & 0 deletions components/com_fabrik/views/list/view.partial.php
Expand Up @@ -107,6 +107,7 @@ public function layoutFilters()
$displayData->toggleFilters = $this->toggleFilters;
$displayData->filterCols = $this->filterCols;
$displayData->showClearFilters = $this->showClearFilters;
$displayData->gotOptionalFilters = $this->gotOptionalFilters;
$displayData->filters = $this->filters;
$displayData->filter_action = $this->filter_action;
$layoutFile = $this->filterMode === 5 ? 'fabrik-filters-modal' : 'fabrik-filters';
Expand Down

0 comments on commit dbce6ce

Please sign in to comment.