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,92 @@
<?php
/**
* @package Joomla.Administrator
* @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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
Text::script('COM_FINDER_FILTER_SHOW_ALL', true);
Text::script('COM_FINDER_FILTER_HIDE_ALL', true);
$this->ignore_fieldsets = ['jbasic'];
$this->useCoreUI = true;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate')
->useScript('com_finder.finder-edit');
?>
<form action="<?php echo Route::_('index.php?option=com_finder&view=filter&layout=edit&filter_id=' . (int) $this->item->filter_id); ?>" method="post" name="adminForm" id="adminForm" aria-label="<?php echo Text::_('COM_FINDER_FILTER_FORM_TITLE_' . ((int) $this->item->filter_id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
<div class="main-card">
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_FINDER_EDIT_FILTER')); ?>
<div class="row">
<div class="col-lg-9">
<?php if ($this->total > 0) : ?>
<div class="well">
<?php echo $this->form->renderField('map_count'); ?>
</div>
<button class="btn btn-secondary filter-toggle-all" type="button">
<span class="icon-square" aria-hidden="true"></span> <?php echo Text::_('JGLOBAL_SELECTION_INVERT'); ?></button>
<button class="btn btn-secondary float-end" type="button" id="expandAccordion"><?php echo Text::_('COM_FINDER_FILTER_SHOW_ALL'); ?></button>
<hr>
<?php endif; ?>
<?php echo HTMLHelper::_('filter.slider', ['selected_nodes' => $this->filter->data]); ?>
</div>
<div class="col-lg-3">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_OPTIONS')); ?>
<div class="row">
<div class="col-md-6">
<fieldset id="fieldset-publishingdata" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
<fieldset id="fieldset-filter" class="options-form">
<legend><?php echo Text::_('COM_FINDER_FILTER_FIELDSET_PARAMS'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('jbasic'); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo Factory::getApplication()->getInput()->get('return', '', 'BASE64'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</form>

View File

@ -0,0 +1,131 @@
<?php
/**
* @package Joomla.Administrator
* @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\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
$user = $this->getCurrentUser();
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
Text::script('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_finder.filters')
->useScript('table.columns')
->useScript('multiselect');
?>
<form action="<?php echo Route::_('index.php?option=com_finder&view=filters'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
<?php if (empty($this->items)) : ?>
<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 Text::_('COM_FINDER_NO_RESULTS_OR_FILTERS'); ?>
</div>
<?php else : ?>
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_FILTERS_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<td class="w-1 text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" class="w-1 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_CREATED_BY', 'a.created_by_alias', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_CREATED_ON', 'a.created', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_MAP_COUNT', 'a.map_count', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-1 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.filter_id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$canCreate = $user->authorise('core.create', 'com_finder');
$canEdit = $user->authorise('core.edit', 'com_finder');
$userAuthoriseCoreManage = $user->authorise('core.manage', 'com_checkin');
$userAuthoriseCoreEditState = $user->authorise('core.edit.state', 'com_finder');
$userId = $user->id;
foreach ($this->items as $i => $item) :
$canCheckIn = $userAuthoriseCoreManage || $item->checked_out == $userId || is_null($item->checked_out);
$canChange = $userAuthoriseCoreEditState && $canCheckIn;
$escapedTitle = $this->escape($item->title);
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->filter_id, false, 'cid', 'cb', $item->title); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'filters.', $canChange); ?>
</td>
<th scope="row">
<?php if ($item->checked_out) : ?>
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'filters.', $canCheckIn); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<a href="<?php echo Route::_('index.php?option=com_finder&task=filter.edit&filter_id=' . (int) $item->filter_id); ?>">
<?php echo $escapedTitle; ?></a>
<?php else : ?>
<?php echo $escapedTitle; ?>
<?php endif; ?>
</th>
<td class="d-none d-md-table-cell">
<?php echo $item->created_by_alias ?: $item->user_name; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')); ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo $item->map_count; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo (int) $item->filter_id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php endif; ?>
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_FILTERS_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_FINDER_FILTERS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Administrator
* @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\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
$displayData = [
'textPrefix' => 'COM_FINDER',
'formURL' => 'index.php?option=com_finder&view=filters',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Smart_Search_quickstart_guide',
'icon' => 'icon-search-plus finder',
'btnadd' => Text::_('COM_FINDER_FILTERS_EMPTYSTATE_BUTTON_ADD'),
'content' => Text::_('COM_FINDER_FILTERS_EMPTYSTATE_CONTENT'),
'title' => Text::_('COM_FINDER_FILTERS_TOOLBAR_TITLE'),
];
if ($this->getCurrentUser()->authorise('core.create', 'com_finder')) {
$displayData['createURL'] = "index.php?option=com_finder&task=filter.add";
}
echo LayoutHelper::render('joomla.content.emptystate', $displayData);

View File

@ -0,0 +1,169 @@
<?php
/**
* @package Joomla.Administrator
* @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\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$lang = $this->getLanguage();
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('multiselect')
->useScript('table.columns');
?>
<form action="<?php echo Route::_('index.php?option=com_finder&view=index'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
<?php if ($this->finderPluginId) : ?>
<?php $link = Route::_('index.php?option=com_plugins&client_id=0&task=plugin.edit&extension_id=' . $this->finderPluginId . '&tmpl=component&layout=modal'); ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'plugin' . $this->finderPluginId . 'Modal',
[
'url' => $link,
'title' => Text::_('COM_FINDER_EDIT_PLUGIN_SETTINGS'),
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'closeButton' => false,
'backdrop' => 'static',
'keyboard' => false,
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"'
. ' onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#closeBtn\'})">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#saveBtn\'})">'
. Text::_("JSAVE") . '</button>'
. '<button type="button" class="btn btn-success" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#applyBtn\'}); return false;">'
. Text::_("JAPPLY") . '</button>'
]
); ?>
<?php endif; ?>
<?php if (empty($this->items)) : ?>
<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 Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_INDEX_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<td class="w-1 text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" class="w-1 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'l.published', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'l.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_TYPE', 't.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_DATE', 'l.indexdate', $listDirn, $listOrder); ?>
</th>
<?php if (Multilanguage::isEnabled()) : ?>
<th scope="col" class="w-10 nowrap d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" class="w-15 d-none d-md-table-cell text-center">
<?php echo Text::_('COM_FINDER_INDEX_HEADING_DETAILS'); ?>
</th>
<th scope="col" class="w-30 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_LINK_URL', 'l.url', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php $canChange = $this->getCurrentUser()->authorise('core.manage', 'com_finder'); ?>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->link_id, false, 'cid', 'cb', $item->title); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'index.', $canChange, 'cb'); ?>
</td>
<th scope="row">
<?php if (JDEBUG) : ?>
<a href="index.php?option=com_finder&view=item&id=<?php echo $item->link_id; ?>">
<?php echo $this->escape($item->title); ?>
</a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
</th>
<td class="small d-none d-md-table-cell">
<?php
$key = LanguageHelper::branchSingular($item->t_title);
echo $lang->hasKey($key) ? Text::_($key) : $item->t_title;
?>
</td>
<td class="small d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('date', $item->indexdate, Text::_('DATE_FORMAT_LC4')); ?>
</td>
<?php if (Multilanguage::isEnabled()) : ?>
<td class="small d-none d-md-table-cell">
<?php echo LayoutHelper::render('joomla.content.language', $item); ?>
</td>
<?php endif; ?>
<td class="text-center d-none d-md-table-cell text-center">
<?php if ((int) $item->publish_start_date or (int) $item->publish_end_date or (int) $item->start_date or (int) $item->end_date) : ?>
<span tabindex="0">
<span class="icon-calendar" aria-hidden="true"></span>
<span class="visually-hidden"><?php echo Text::_('COM_FINDER_INDEX_DATE_INFO_TITLE'); ?></span>
</span>
<div role="tooltip" id="tip<?php echo $i; ?>">
<?php
$publishStartDate = $item->publish_start_date !== null ? HTMLHelper::_('date', $item->publish_start_date, Text::_('DATE_FORMAT_LC5'), 'UTC') : '';
$publishEndDate = $item->publish_end_date !== null ? HTMLHelper::_('date', $item->publish_end_date, Text::_('DATE_FORMAT_LC5'), 'UTC') : '';
$startDate = $item->start_date !== null ? HTMLHelper::_('date', $item->start_date, Text::_('DATE_FORMAT_LC5'), 'UTC') : '';
$endDate = $item->end_date !== null ? HTMLHelper::_('date', $item->end_date, Text::_('DATE_FORMAT_LC5'), 'UTC') : '';
?>
<?php echo Text::sprintf('COM_FINDER_INDEX_DATE_INFO', $publishStartDate, $publishEndDate, $startDate, $endDate); ?>
</div>
<?php endif; ?>
</td>
<td class="small break-word d-none d-md-table-cell">
<?php echo (strlen($item->url) > 80) ? substr($item->url, 0, 70) . '...' : $item->url; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php endif; ?>
<input type="hidden" name="task" value="display">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_INDEX_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_FINDER_INDEX_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,54 @@
<?php
/**
* @package Joomla.Administrator
* @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\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
$displayData = [
'textPrefix' => 'COM_FINDER',
'formURL' => 'index.php?option=com_finder&view=index',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Smart_Search_quickstart_guide',
'icon' => 'icon-search-plus finder',
'content' => Text::_('COM_FINDER_INDEX_NO_DATA') . '<br>' . Text::_('COM_FINDER_INDEX_TIP'),
'title' => Text::_('COM_FINDER_HEADING_INDEXER'),
'createURL' => "javascript:document.getElementsByClassName('button-index')[0].click();",
];
echo LayoutHelper::render('joomla.content.emptystate', $displayData);
if ($this->finderPluginId) : ?>
<?php $link = Route::_('index.php?option=com_plugins&client_id=0&task=plugin.edit&extension_id=' . $this->finderPluginId . '&tmpl=component&layout=modal'); ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'plugin' . $this->finderPluginId . 'Modal',
[
'url' => $link,
'title' => Text::_('COM_FINDER_EDIT_PLUGIN_SETTINGS'),
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'closeButton' => false,
'backdrop' => 'static',
'keyboard' => false,
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"'
. ' onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#closeBtn\'})">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#saveBtn\'})">'
. Text::_("JSAVE") . '</button>'
. '<button type="button" class="btn btn-success" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->finderPluginId . 'Modal\', buttonSelector: \'#applyBtn\'}); return false;">'
. Text::_("JAPPLY") . '</button>'
]
); ?>
<?php endif;

View File

@ -0,0 +1,61 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright (C) 2022 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;
/** @var Joomla\Component\Finder\Administrator\View\Indexer\HtmlView $this */
Text::script('COM_FINDER_INDEXER_MESSAGE_COMPLETE', true);
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('com_finder.debug');
?>
<form action="<?php echo Route::_('index.php?option=com_finder&layout=debug'); ?>" method="post" name="adminForm" id="debug-form">
<div class="form-horizontal">
<div class="card mt-3">
<div class="card-body">
<fieldset class="adminform p-4">
<div class="alert alert-info">
<h2 class="alert-heading"><?php echo Text::_('COM_FINDER_INDEXER_MSG_DEBUGGING_INDEXING'); ?></h2>
<?php echo Text::_('COM_FINDER_INDEXER_MSG_DEBUGGING_INDEXING_TEXT'); ?>
</div>
<?php echo $this->form->renderField('plugin'); ?>
<?php echo $this->form->renderField('id'); ?>
<input id="finder-indexer-token" type="hidden" name="<?php echo Factory::getSession()->getFormToken(); ?>" value="1">
</fieldset>
</div>
</div>
</div>
</form>
<div class="form-horizontal">
<div class="card mt-3">
<div class="card-body">
<fieldset class="adminform">
<legend><?php echo Text::_('COM_FINDER_INDEXER_OUTPUT_AREA_TITLE'); ?></legend>
<div id="indexer-output" class="border p-3" style="min-height:200px;">
</div>
</fieldset>
</div>
</div>
</div>

View File

@ -0,0 +1,41 @@
<?php
/**
* @package Joomla.Administrator
* @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;
Text::script('COM_FINDER_INDEXER_MESSAGE_COMPLETE');
Text::script('COM_FINDER_AN_ERROR_HAS_OCCURRED');
Text::script('COM_FINDER_MESSAGE_RETURNED');
Text::script('JLIB_JS_AJAX_ERROR_OTHER');
Text::script('JLIB_JS_AJAX_ERROR_PARSE');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useStyle('com_finder.indexer')
->useScript('com_finder.indexer');
?>
<div class="text-center">
<h1 id="finder-progress-header" class="m-t-2" aria-live="assertive"><?php echo Text::_('COM_FINDER_INDEXER_HEADER_INIT'); ?></h1>
<p id="finder-progress-message" aria-live="polite"><?php echo Text::_('COM_FINDER_INDEXER_MESSAGE_INIT'); ?></p>
<div id="progress" class="progress">
<div id="progress-bar" class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<?php if (JDEBUG) : ?>
<dl id="finder-debug-data" class="row">
</dl>
<?php endif; ?>
<input id="finder-indexer-token" type="hidden" name="<?php echo Factory::getSession()->getFormToken(); ?>" value="1">
</div>

View File

@ -0,0 +1,100 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright (C) 2022 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;
?>
<div role="main">
<h1 class="mb-3"><?php echo $this->item->title; ?></h1>
<div class="card mb-3">
<div class="card-header"><h2><?php echo Text::_('COM_FINDER_ITEM_FIELDSET_ITEM_TITLE'); ?></h2></div>
<div class="card-body">
<dl class="row">
<?php foreach ($this->item as $key => $value) : ?>
<dt class="col-sm-3"><?php echo $key; ?></dt>
<dd class="col-sm-9<?php echo $key == 'object' ? ' text-break' : '';?>"><?php echo $value; ?></dd>
<?php endforeach; ?>
</dl>
</div>
</div>
<div class="card mb-3">
<div class="card-header"><h2><?php echo Text::_('COM_FINDER_ITEM_FIELDSET_TERMS_TITLE'); ?></h2></div>
<div class="card-body">
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_ITEM_TERMS_TABLE_CAPTION'); ?>,
</caption>
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">term</th>
<th scope="col">stem</th>
<th scope="col">common</th>
<th scope="col">phrase</th>
<th scope="col">weight</th>
<th scope="col">links</th>
<th scope="col">language</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->terms as $term) : ?>
<tr>
<th scope="row"><?php echo $term->term_id; ?></th>
<td><?php echo $term->term; ?></td>
<td><?php echo $term->stem; ?></td>
<td><?php echo $term->common; ?></td>
<td><?php echo $term->phrase; ?></td>
<td><?php echo $term->weight; ?></td>
<td><?php echo $term->links; ?></td>
<td><?php echo $term->language; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="card mb-3">
<div class="card-header"><h2><?php echo Text::_('COM_FINDER_ITEM_FIELDSET_TAXONOMIES_TITLE'); ?></h2></div>
<div class="card-body">
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_ITEM_TAXONOMIES_TABLE_CAPTION'); ?>,
</caption>
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">title</th>
<th scope="col">alias</th>
<th scope="col">lft</th>
<th scope="col">path</th>
<th scope="col">state</th>
<th scope="col">access</th>
<th scope="col">language</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->taxonomies as $taxonomy) : ?>
<tr>
<th scope="row"><?php echo $taxonomy->id; ?></th>
<td><?php echo $taxonomy->title; ?></td>
<td><?php echo $taxonomy->alias; ?></td>
<td><?php echo $taxonomy->lft; ?></td>
<td><?php echo $taxonomy->path; ?></td>
<td><?php echo $taxonomy->state; ?></td>
<td><?php echo $taxonomy->access; ?></td>
<td><?php echo $taxonomy->language; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,174 @@
<?php
/**
* @package Joomla.Administrator
* @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\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$lang = Factory::getLanguage();
$branchFilter = $this->escape($this->state->get('filter.branch'));
Text::script('COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_finder.maps')
->useScript('table.columns')
->useScript('multiselect');
?>
<form action="<?php echo Route::_('index.php?option=com_finder&view=maps'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
<?php if (empty($this->items)) : ?>
<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 Text::_('COM_FINDER_MAPS_NO_CONTENT'); ?>
</div>
<?php else : ?>
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_MAPS_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<td class="w-1 text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" class="w-1 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'branch_title, a.lft', $listDirn, $listOrder); ?>
</th>
<?php if (!$branchFilter) : ?>
<th scope="col" class="w-1 text-center">
<?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?>
</th>
<?php endif; ?>
<th scope="col" class="w-1 text-center">
<span class="icon-check" aria-hidden="true"></span>
<span class="d-none d-md-inline"><?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?></span>
</th>
<th scope="col" class="w-1 text-center">
<span class="icon-times" aria-hidden="true"></span>
<span class="d-none d-md-inline"><?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?></span>
</th>
<?php if (Multilanguage::isEnabled()) : ?>
<th scope="col" class="w-10 nowrap d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php $canChange = $this->getCurrentUser()->authorise('core.manage', 'com_finder'); ?>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'maps.', $canChange, 'cb'); ?>
</td>
<th scope="row">
<?php
if (trim($item->branch_title, '*') === 'Language') {
$title = LanguageHelper::branchLanguageTitle($item->title);
} else {
$key = LanguageHelper::branchSingular($item->title);
$title = $lang->hasKey($key) ? Text::_($key) : $item->title;
}
?>
<?php echo str_repeat('<span class="gi">&mdash;</span>', $item->level - 1); ?>
<?php echo $this->escape($title); ?>
<?php if ($this->escape(trim($title, '*')) === 'Language' && Multilanguage::isEnabled()) : ?>
<div class="small">
<strong><?php echo Text::_('COM_FINDER_MAPS_MULTILANG'); ?></strong>
</div>
<?php endif; ?>
</th>
<?php if (!$branchFilter) : ?>
<td class="text-center btns itemnumber">
<?php if ($item->rgt - $item->lft > 1) : ?>
<a href="<?php echo Route::_('index.php?option=com_finder&view=maps&filter[branch]=' . $item->id); ?>"
aria-describedby="tip-map<?php echo $i; ?>">
<span class="btn btn-info"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span>
</a>
<div role="tooltip" id="tip-map<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>
</td>
<?php endif; ?>
<td class="text-center btns itemnumber">
<?php if ($item->level > 1) : ?>
<a class="btn <?php echo ((int) $item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>"
href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=1&filter[content_map]=' . $item->id); ?>"
aria-describedby="tip-publish<?php echo $i; ?>">
<?php echo (int) $item->count_published; ?>
</a>
<div role="tooltip" id="tip-publish<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>
</td>
<td class="text-center btns itemnumber">
<?php if ($item->level > 1) : ?>
<a class="btn <?php echo ((int) $item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>"
href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=0&filter[content_map]=' . $item->id); ?>"
aria-describedby="tip-unpublish<?php echo $i; ?>">
<?php echo (int) $item->count_unpublished; ?>
</a>
<div role="tooltip" id="tip-unpublish<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>
</td>
<?php if (Multilanguage::isEnabled()) : ?>
<td class="small d-none d-md-table-cell">
<?php echo $item->language; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php endif; ?>
</div>
<input type="hidden" name="task" value="display">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</div>
</form>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_MAPS_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_FINDER_MAPS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,24 @@
<?php
/**
* @package Joomla.Administrator
* @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\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
$displayData = [
'textPrefix' => 'COM_FINDER',
'formURL' => 'index.php?option=com_finder&view=maps',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Help4.x:Smart_Search:_Content_Maps',
'icon' => 'icon-search-plus finder',
'title' => Text::_('COM_FINDER_MAPS_TOOLBAR_TITLE')
];
echo LayoutHelper::render('joomla.content.emptystate', $displayData);

View File

@ -0,0 +1,83 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright (C) 2018 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\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('multiselect');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo Route::_('index.php?option=com_finder&view=searches'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this, 'options' => ['filterButton' => false]]); ?>
<?php if (empty($this->items)) : ?>
<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 Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_FINDER_SEARCHES_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_PHRASE', 'a.searchterm', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-15">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-1 text-center">
<?php echo Text::_('COM_FINDER_HEADING_RESULTS'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<th scope="row" class="break-word">
<?php echo $this->escape($item->searchterm); ?>
</th>
<td>
<?php echo (int) $item->hits; ?>
</td>
<td class="text-center btns">
<?php echo (int) $item->results; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php endif; ?>
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_SEARCH_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_FINDER_SEARCH_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,25 @@
<?php
/**
* @package Joomla.Administrator
* @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\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
$displayData = [
'textPrefix' => 'COM_FINDER',
'formURL' => 'index.php?option=com_finder&view=searches',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Help4.x:Smart_Search:_Search_Term_Analysis',
'icon' => 'icon-search',
'title' => Text::_('COM_FINDER_MANAGER_SEARCHES'),
'content' => Text::_('COM_FINDER_EMPTYSTATE_SEARCHES_CONTENT'),
];
echo LayoutHelper::render('joomla.content.emptystate', $displayData);

View File

@ -0,0 +1,54 @@
<?php
/**
* @package Joomla.Administrator
* @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\Language\Text;
?>
<div class="container-popup">
<table class="table table-sm">
<caption class="caption-top"><?php echo Text::sprintf('COM_FINDER_STATISTICS_STATS_DESCRIPTION', number_format($this->data->term_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->taxonomy_node_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->taxonomy_branch_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR'))); ?></caption>
<thead>
<tr>
<th scope="col">
<?php echo Text::_('COM_FINDER_STATISTICS_LINK_TYPE_HEADING'); ?>
</th>
<th scope="col">
<?php echo Text::_('COM_FINDER_STATISTICS_LINK_TYPE_COUNT'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->data->type_list as $type) : ?>
<tr>
<th scope="row">
<?php
$lang_key = 'PLG_FINDER_STATISTICS_' . str_replace(' ', '_', $type->type_title);
$lang_string = Text::_($lang_key);
echo $lang_string === $lang_key ? $type->type_title : $lang_string;
?>
</th>
<td>
<span class="badge bg-info"><?php echo number_format($type->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
</td>
</tr>
<?php endforeach; ?>
<tr>
<td>
<strong><?php echo Text::_('COM_FINDER_STATISTICS_LINK_TYPE_TOTAL'); ?></strong>
</td>
<td>
<span class="badge bg-info"><?php echo number_format($this->data->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_FINDER_STATS_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_FINDER_STATS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>