first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,37 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$this->document->getWebAssetManager()
->useStyle('com_finder.finder')
->useScript('com_finder.finder');
?>
<div class="com-finder finder">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<div id="search-form" class="com-finder__form">
<?php echo $this->loadTemplate('form'); ?>
</div>
<?php // Load the search results layout if we are performing a search. ?>
<?php if ($this->query->search === true) : ?>
<div id="search-results" class="com-finder__results">
<?php echo $this->loadTemplate('results'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,312 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_MENU_SEARCH_VIEW_DEFAULT_TITLE">
<help
key = "Menu_Item:_Search"
/>
<message>
<![CDATA[COM_FINDER_MENU_SEARCH_VIEW_DEFAULT_TEXT]]>
</message>
</layout>
<fields name="request" addfieldprefix="Joomla\Component\Finder\Administrator\Field" >
<fieldset name="request">
<field
name="q"
type="text"
label="COM_FINDER_PREFILL_SEARCH_LABEL"
/>
<field
name="f"
type="searchfilter"
label="COM_FINDER_SELECT_FILTER_LABEL"
default=""
/>
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic">
<field
name="show_date_filters"
type="list"
label="COM_FINDER_CONFIG_SHOW_DATE_FILTERS_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_advanced"
type="list"
label="COM_FINDER_CONFIG_SHOW_ADVANCED_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="expand_advanced"
type="list"
label="COM_FINDER_CONFIG_EXPAND_ADVANCED_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field type="spacer" />
<field
name="show_taxonomy"
type="list"
label="COM_FINDER_CONFIG_SHOW_TAXONOMY_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_description"
type="list"
label="COM_FINDER_CONFIG_SHOW_DESCRIPTION_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="description_length"
type="number"
label="COM_FINDER_CONFIG_DESCRIPTION_LENGTH_LABEL"
filter="integer"
default=""
useglobal="true"
/>
<field
name="show_image"
type="list"
label="COM_FINDER_CONFIG_SHOW_IMAGE_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="image_class"
type="text"
label="COM_FINDER_CONFIG_IMAGE_CLASS_LABEL"
default=""
useglobal="true"
validate="CssIdentifier"
showon="show_image!:0"
/>
<field
name="link_image"
type="list"
label="COM_FINDER_CONFIG_LINKED_IMAGE_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
showon="show_image!:0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_date"
type="list"
label="COM_FINDER_CONFIG_SHOW_DATE_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_url"
type="list"
label="COM_FINDER_CONFIG_SHOW_URL_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field type="spacer" />
</fieldset>
<fieldset name="advanced">
<field
name="show_pagination_limit"
type="list"
label="JGLOBAL_DISPLAY_SELECT_LABEL"
validate="options"
class="form-select-color-state"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_pagination"
type="list"
label="JGLOBAL_PAGINATION_LABEL"
validate="options"
class="form-select-color-state"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="list"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
validate="options"
class="form-select-color-state"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="list_limit"
type="list"
label="JGLOBAL_LIST_LIMIT"
default="20"
validate="options"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="100">J100</option>
<option value="0">JALL</option>
</field>
<field
name="allow_empty_query"
type="list"
label="COM_FINDER_ALLOW_EMPTY_QUERY_LABEL"
description="COM_FINDER_ALLOW_EMPTY_QUERY_DESC"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="show_suggested_query"
type="list"
label="COM_FINDER_CONFIG_SHOW_SUGGESTED_QUERY_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="show_explained_query"
type="list"
label="COM_FINDER_CONFIG_SHOW_EXPLAINED_QUERY_LABEL"
default=""
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="sort_order"
type="list"
label="COM_FINDER_CONFIG_SORT_ORDER_LABEL"
default=""
useglobal="true"
validate="options"
>
<option value="relevance">COM_FINDER_CONFIG_SORT_OPTION_RELEVANCE</option>
<option value="title">COM_FINDER_CONFIG_SORT_OPTION_TITLE</option>
<option value="date">COM_FINDER_CONFIG_SORT_OPTION_START_DATE</option>
<option value="price">COM_FINDER_CONFIG_SORT_OPTION_LIST_PRICE</option>
<option value="sale_price">COM_FINDER_CONFIG_SORT_OPTION_SALES_PRICE</option>
</field>
<field
name="show_sort_order"
type="radio"
label="COM_FINDER_CONFIG_SHOW_SORT_ORDER_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="shown_sort_order"
type="list"
label="COM_FINDER_CONFIG_SORT_ORDER_FIELDS_LABEL"
layout="joomla.form.field.list-fancy-select"
multiple="true"
validate="options"
showon="show_sort_order:1"
>
<option value="relevance">COM_FINDER_CONFIG_SORT_OPTION_RELEVANCE</option>
<option value="title">COM_FINDER_CONFIG_SORT_OPTION_TITLE</option>
<option value="date">COM_FINDER_CONFIG_SORT_OPTION_START_DATE</option>
<option value="price">COM_FINDER_CONFIG_SORT_OPTION_LIST_PRICE</option>
<option value="sale_price">COM_FINDER_CONFIG_SORT_OPTION_SALES_PRICE</option>
</field>
<field
name="sort_direction"
type="list"
label="COM_FINDER_CONFIG_SORT_DIRECTION_LABEL"
default=""
useglobal="true"
validate="options"
>
<option value="desc">COM_FINDER_CONFIG_SORT_OPTION_DESCENDING</option>
<option value="asc">COM_FINDER_CONFIG_SORT_OPTION_ASCENDING</option>
</field>
</fieldset>
<fieldset name="integration">
<field
name="show_feed_link"
type="list"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
validate="options"
class="form-select-color-state"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,82 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/*
* This segment of code sets up the autocompleter.
*/
if ($this->params->get('show_autosuggest', 1)) {
$this->document->getWebAssetManager()->usePreset('awesomplete');
$this->document->addScriptOptions('finder-search', ['url' => Route::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component', false)]);
Text::script('JLIB_JS_AJAX_ERROR_OTHER');
Text::script('JLIB_JS_AJAX_ERROR_PARSE');
}
?>
<form action="<?php echo Route::_($this->query->toUri()); ?>" method="get" class="js-finder-searchform">
<?php echo $this->getFields(); ?>
<fieldset class="com-finder__search word mb-3">
<legend class="com-finder__search-legend visually-hidden">
<?php echo Text::_('COM_FINDER_SEARCH_FORM_LEGEND'); ?>
</legend>
<div class="form-inline">
<label for="q" class="me-2">
<?php echo Text::_('COM_FINDER_SEARCH_TERMS'); ?>
</label>
<div class="input-group">
<input type="text" name="q" id="q" class="js-finder-search-query form-control" value="<?php echo $this->escape($this->query->input); ?>">
<button type="submit" class="btn btn-primary">
<span class="icon-search icon-white" aria-hidden="true"></span>
<?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?>
</button>
<?php if ($this->params->get('show_advanced', 1)) : ?>
<?php HTMLHelper::_('bootstrap.collapse'); ?>
<button class="btn btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#advancedSearch" aria-expanded="<?php echo ($this->params->get('expand_advanced', 0) ? 'true' : 'false'); ?>">
<span class="icon-search-plus" aria-hidden="true"></span>
<?php echo Text::_('COM_FINDER_ADVANCED_SEARCH_TOGGLE'); ?></button>
<?php endif; ?>
</div>
</div>
</fieldset>
<?php if ($this->params->get('show_advanced', 1)) : ?>
<fieldset id="advancedSearch" class="com-finder__advanced js-finder-advanced collapse<?php if ($this->params->get('expand_advanced', 0)) {
echo ' show';
} ?>">
<legend class="com-finder__search-advanced visually-hidden">
<?php echo Text::_('COM_FINDER_SEARCH_ADVANCED_LEGEND'); ?>
</legend>
<?php if ($this->params->get('show_advanced_tips', 1)) : ?>
<div class="com-finder__tips card card-outline-secondary mb-3">
<div class="card-body">
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_INTRO'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_AND'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_NOT'); ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OR'); ?>
<?php if ($this->params->get('tuplecount', 1) > 1) : ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_PHRASE'); ?>
<?php endif; ?>
<?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OUTRO'); ?>
</div>
</div>
<?php endif; ?>
<div id="finder-filter-window" class="com-finder__filter">
<?php echo HTMLHelper::_('filter.select', $this->query, $this->params); ?>
</div>
</fieldset>
<?php endif; ?>
</form>

View File

@ -0,0 +1,129 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
use Joomla\Component\Finder\Administrator\Indexer\Helper;
use Joomla\Component\Finder\Administrator\Indexer\Taxonomy;
use Joomla\String\StringHelper;
$user = $this->getCurrentUser();
$show_description = $this->params->get('show_description', 1);
if ($show_description) {
// Calculate number of characters to display around the result
$term_length = StringHelper::strlen($this->query->input);
$desc_length = $this->params->get('description_length', 255);
$pad_length = $term_length < $desc_length ? (int) floor(($desc_length - $term_length) / 2) : 0;
// Make sure we highlight term both in introtext and fulltext
$full_description = $this->result->description;
if (!empty($this->result->summary) && !empty($this->result->body)) {
$full_description = Helper::parse($this->result->summary . $this->result->body);
}
// Find the position of the search term
$pos = $term_length ? StringHelper::strpos(StringHelper::strtolower($full_description), StringHelper::strtolower($this->query->input)) : false;
// Find a potential start point
$start = ($pos && $pos > $pad_length) ? $pos - $pad_length : 0;
// Find a space between $start and $pos, start right after it.
$space = StringHelper::strpos($full_description, ' ', $start > 0 ? $start - 1 : 0);
$start = ($space && $space < $pos) ? $space + 1 : $start;
$description = HTMLHelper::_('string.truncate', StringHelper::substr($full_description, $start), $desc_length, true);
}
$showImage = $this->params->get('show_image', 0);
$imageClass = $this->params->get('image_class', '');
$extraAttr = [];
if ($showImage && !empty($this->result->imageUrl) && $imageClass !== '') {
$extraAttr['class'] = $imageClass;
}
$icon = '';
if (!empty($this->result->mime)) {
$icon = '<span class="icon-file-' . $this->result->mime . '" aria-hidden="true"></span> ';
}
$show_url = '';
if ($this->params->get('show_url', 1)) {
$show_url = '<cite class="result__title-url">' . $this->baseUrl . Route::_($this->result->cleanURL) . '</cite>';
}
?>
<li class="result__item">
<?php if ($showImage && isset($this->result->imageUrl)) : ?>
<figure class="<?php echo htmlspecialchars($imageClass, ENT_COMPAT, 'UTF-8'); ?> result__image">
<?php if ($this->params->get('link_image') && $this->result->route) : ?>
<a href="<?php echo Route::_($this->result->route); ?>">
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
</a>
<?php else : ?>
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
<?php endif; ?>
</figure>
<?php endif; ?>
<p class="result__title">
<?php if ($this->result->route) : ?>
<?php echo HTMLHelper::link(
Route::_($this->result->route),
'<span class="result__title-text">' . $icon . $this->result->title . '</span>' . $show_url,
[
'class' => 'result__title-link'
]
); ?>
<?php else : ?>
<?php echo $this->result->title; ?>
<?php endif; ?>
</p>
<?php if ($show_description && $description !== '') : ?>
<p class="result__description">
<?php if ($this->result->start_date && $this->params->get('show_date', 1)) : ?>
<time class="result__date" datetime="<?php echo HTMLHelper::_('date', $this->result->start_date, 'c'); ?>">
<?php echo HTMLHelper::_('date', $this->result->start_date, Text::_('DATE_FORMAT_LC3')); ?>
</time>
<?php endif; ?>
<?php echo $description; ?>
</p>
<?php endif; ?>
<?php $taxonomies = $this->result->getTaxonomy(); ?>
<?php if (count($taxonomies) && $this->params->get('show_taxonomy', 1)) : ?>
<ul class="result__taxonomy">
<?php foreach ($taxonomies as $type => $taxonomy) : ?>
<?php if ($type == 'Language' && (!Multilanguage::isEnabled() || (isset($taxonomy[0]) && $taxonomy[0]->title == '*'))) : ?>
<?php continue; ?>
<?php endif; ?>
<?php $branch = Taxonomy::getBranch($type); ?>
<?php if ($branch->state == 1 && in_array($branch->access, $user->getAuthorisedViewLevels())) : ?>
<?php $taxonomy_text = []; ?>
<?php foreach ($taxonomy as $node) : ?>
<?php if ($node->state == 1 && in_array($node->access, $user->getAuthorisedViewLevels())) : ?>
<?php $taxonomy_text[] = $node->title; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php if (count($taxonomy_text)) : ?>
<li class="result__taxonomy-item result__taxonomy--<?php echo $type; ?>">
<span><?php echo Text::_(LanguageHelper::branchSingular($type)); ?>:</span>
<?php echo Text::_(LanguageHelper::branchSingular(implode(',', $taxonomy_text))); ?>
</li>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>

View File

@ -0,0 +1,96 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2011 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\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
?>
<?php // Display the suggested search if it is different from the current search. ?>
<?php if (($this->suggested && $this->params->get('show_suggested_query', 1)) || ($this->explained && $this->params->get('show_explained_query', 1))) : ?>
<div id="search-query-explained" class="com-finder__explained">
<?php // Display the suggested search query. ?>
<?php if ($this->suggested && $this->params->get('show_suggested_query', 1)) : ?>
<?php // Replace the base query string with the suggested query string. ?>
<?php $uri = Uri::getInstance($this->query->toUri()); ?>
<?php $uri->setVar('q', $this->suggested); ?>
<?php // Compile the suggested query link. ?>
<?php $linkUrl = Route::_($uri->toString(['path', 'query'])); ?>
<?php $link = '<a href="' . $linkUrl . '">' . $this->escape($this->suggested) . '</a>'; ?>
<?php echo Text::sprintf('COM_FINDER_SEARCH_SIMILAR', $link); ?>
<?php elseif ($this->explained && $this->params->get('show_explained_query', 1)) : ?>
<?php // Display the explained search query. ?>
<p role="alert">
<?php echo Text::plural('COM_FINDER_QUERY_RESULTS', $this->total, $this->explained); ?>
</p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php // Display the 'no results' message and exit the template. ?>
<?php if (($this->total === 0) || ($this->total === null)) : ?>
<div id="search-result-empty" class="com-finder__empty">
<h2><?php echo Text::_('COM_FINDER_SEARCH_NO_RESULTS_HEADING'); ?></h2>
<?php $multilang = Factory::getApplication()->getLanguageFilter() ? '_MULTILANG' : ''; ?>
<p><?php echo Text::sprintf('COM_FINDER_SEARCH_NO_RESULTS_BODY' . $multilang, $this->escape($this->query->input)); ?></p>
</div>
<?php // Exit this template. ?>
<?php return; ?>
<?php endif; ?>
<?php // Display the 'Sort By' drop-down. ?>
<?php if ($this->params->get('show_sort_order', 0) && !empty($this->sortOrderFields) && !empty($this->results)) : ?>
<div id="search-sorting" class="com-finder__sorting">
<?php echo $this->loadTemplate('sorting'); ?>
</div>
<?php endif; ?>
<?php // Activate the highlighter if enabled. ?>
<?php if (!empty($this->query->highlight) && $this->params->get('highlight_terms', 1)) : ?>
<?php
// Allow a maximum of 10 tokens to be highlighted. Otherwise the URL can get too long.
$this->document->getWebAssetManager()->useScript('highlight');
$this->document->addScriptOptions(
'highlight',
[[
'class' => 'js-highlight',
'highLight' => array_slice($this->query->highlight, 0, 10),
]]
);
?>
<?php endif; ?>
<?php // Display a list of results ?>
<ul id="search-result-list" class="js-highlight com-finder__results-list" start="<?php echo (int) $this->pagination->limitstart + 1; ?>">
<?php $this->baseUrl = Uri::getInstance()->toString(['scheme', 'host', 'port']); ?>
<?php foreach ($this->results as $i => $result) : ?>
<?php $this->result = &$result; ?>
<?php $this->result->counter = $i + 1; ?>
<?php $layout = $this->getLayoutFile($this->result->layout); ?>
<?php echo $this->loadTemplate($layout); ?>
<?php endforeach; ?>
</ul>
<?php // Display the pagination ?>
<div class="com-finder__navigation search-pagination">
<?php if ($this->params->get('show_pagination', 1) > 0) : ?>
<div class="com-finder__pagination w-100">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_results', 1) > 0) : ?>
<div class="com-finder__counter search-pages-counter">
<?php // Prepare the pagination string. Results X - Y of Z ?>
<?php $start = (int) $this->pagination->limitstart + 1; ?>
<?php $total = (int) $this->pagination->total; ?>
<?php $limit = (int) $this->pagination->limit * $this->pagination->pagesCurrent; ?>
<?php $limit = (int) min($limit, $total); ?>
<?php echo Text::sprintf('COM_FINDER_SEARCH_RESULTS_OF', $start, $limit, $total); ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,46 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright (C) 2021 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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
?>
<?php HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle'); ?>
<div class="sorting">
<label id="sorting_label" for="sorting_btn"><?php echo Text::_('COM_FINDER_SORT_BY'); ?></label>
<div class="sorting__select btn-group">
<?php foreach ($this->sortOrderFields as $sortOrderField) : ?>
<?php if ($sortOrderField->active) : ?>
<button id="sorting_btn" class="btn btn-secondary dropdown-toggle" type="button"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-expanded="false" aria-controls="finder_sorting_list">
<?php echo $this->escape($sortOrderField->label); ?>
</button>
<?php
break;
endif; ?>
<?php endforeach; ?>
<ul id="finder_sorting_list" class="sorting__list block dropdown-menu" role="listbox" aria-labelledby="finder_sorting_desc">
<?php foreach ($this->sortOrderFields as $sortOrderField) : ?>
<li class="sorting__list-li <?php echo $sortOrderField->active ? 'sorting__list-li-active' : ''; ?>">
<a class="dropdown-item" role="option" href="<?php echo Route::_($sortOrderField->url);?>" <?php echo $sortOrderField->active ? 'aria-current="true"' : ''; ?>>
<?php echo $this->escape($sortOrderField->label); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="clearfix"></div>
</div>