-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
bar.php
69 lines (61 loc) · 2.2 KB
/
bar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\Registry\Registry;
$data = $displayData;
// Receive overridable options
$data['options'] = !empty($data['options']) ? $data['options'] : array();
if (is_array($data['options']))
{
$data['options'] = new Registry($data['options']);
}
// Options
$filterButton = $data['options']->get('filterButton', true);
$searchButton = $data['options']->get('searchButton', true);
$filters = $data['view']->filterForm->getGroup('filter');
?>
<?php if (!empty($filters['filter_search'])) : ?>
<?php if ($searchButton) : ?>
<div class="btn-group">
<div class="input-group">
<?php echo $filters['filter_search']->input; ?>
<?php if ($filters['filter_search']->description) : ?>
<div role="tooltip" id="<?php echo $filters['filter_search']->name . '-desc'; ?>">
<?php echo htmlspecialchars(Text::_($filters['filter_search']->description), ENT_COMPAT, 'UTF-8'); ?>
</div>
<?php endif; ?>
<span class="input-group-append">
<label for="filter_search" class="sr-only">
<?php if (isset($filters['filter_search']->label)) : ?>
<?php echo Text::_($filters['filter_search']->label); ?>
<?php else : ?>
<?php echo Text::_('JSEARCH_FILTER'); ?>
<?php endif; ?>
</label>
<button type="submit" class="btn btn-primary" aria-label="<?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?>">
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'search']); ?>
</button>
</span>
</div>
</div>
<div class="btn-group">
<?php if ($filterButton) : ?>
<button type="button" class="btn btn-primary js-stools-btn-filter">
<?php echo Text::_('JFILTER_OPTIONS'); ?>
<span class="fas fa-angle-down" aria-hidden="true"></span>
</button>
<?php endif; ?>
<button type="button" class="btn btn-primary js-stools-btn-clear">
<?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?>
</button>
</div>
<?php endif; ?>
<?php endif;