first commit
This commit is contained in:
62
layouts/joomla/searchtools/default/bar.php
Normal file
62
layouts/joomla/searchtools/default/bar.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
$data = $displayData;
|
||||
|
||||
// Receive overridable options
|
||||
$data['options'] = !empty($data['options']) ? $data['options'] : [];
|
||||
|
||||
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');
|
||||
|
||||
if (empty($filters['filter_search']) || !$searchButton) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="filter-search-bar 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']->id ?: $filters['filter_search']->name) . '-desc'; ?>" class="filter-search-bar__description">
|
||||
<?php echo htmlspecialchars(Text::_($filters['filter_search']->description), ENT_COMPAT, 'UTF-8'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<span class="filter-search-bar__label visually-hidden">
|
||||
<?php echo $filters['filter_search']->label; ?>
|
||||
</span>
|
||||
<button type="submit" class="filter-search-bar__button btn btn-primary" aria-label="<?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?>">
|
||||
<span class="filter-search-bar__button-icon icon-search" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-search-actions btn-group">
|
||||
<?php if ($filterButton) : ?>
|
||||
<button type="button" class="filter-search-actions__button btn btn-primary js-stools-btn-filter">
|
||||
<?php echo Text::_('JFILTER_OPTIONS'); ?>
|
||||
<span class="icon-angle-down" aria-hidden="true"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="filter-search-actions__button btn btn-primary js-stools-btn-clear">
|
||||
<?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?>
|
||||
</button>
|
||||
</div>
|
||||
39
layouts/joomla/searchtools/default/filters.php
Normal file
39
layouts/joomla/searchtools/default/filters.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Form\FormHelper;
|
||||
|
||||
$data = $displayData;
|
||||
|
||||
// Load the form filters
|
||||
$filters = $data['view']->filterForm->getGroup('filter');
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
|
||||
?>
|
||||
<?php if ($filters) : ?>
|
||||
<?php foreach ($filters as $fieldName => $field) : ?>
|
||||
<?php if ($fieldName !== 'filter_search') : ?>
|
||||
<?php $dataShowOn = ''; ?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php $wa->useScript('showon'); ?>
|
||||
<?php $dataShowOn = " data-showon='" . json_encode(FormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . "'"; ?>
|
||||
<?php endif; ?>
|
||||
<div class="js-stools-field-filter"<?php echo $dataShowOn; ?>>
|
||||
<span class="visually-hidden"><?php echo $field->label; ?></span>
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
27
layouts/joomla/searchtools/default/list.php
Normal file
27
layouts/joomla/searchtools/default/list.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$data = $displayData;
|
||||
|
||||
// Load the form list fields
|
||||
$list = $data['view']->filterForm->getGroup('list');
|
||||
?>
|
||||
<?php if ($list) : ?>
|
||||
<div class="ordering-select">
|
||||
<?php foreach ($list as $fieldName => $field) : ?>
|
||||
<div class="js-stools-field-list">
|
||||
<span class="visually-hidden"><?php echo $field->label; ?></span>
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
20
layouts/joomla/searchtools/default/noitems.php
Normal file
20
layouts/joomla/searchtools/default/noitems.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$data = $displayData;
|
||||
?>
|
||||
<div class="alert alert-info">
|
||||
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
|
||||
<?php echo $data['options']['noResultsText']; ?>
|
||||
</div>
|
||||
20
layouts/joomla/searchtools/default/selector.php
Normal file
20
layouts/joomla/searchtools/default/selector.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$data = $displayData;
|
||||
?>
|
||||
<div class="js-stools-field-selector">
|
||||
<div class="visually-hidden">
|
||||
<?php echo $data['view']->filterForm->getField($data['options']['selectorFieldName'])->label; ?>
|
||||
</div>
|
||||
<?php echo $data['view']->filterForm->getField($data['options']['selectorFieldName'])->input; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user