primo commit
This commit is contained in:
71
components/com_osmap/views/html/tmpl/default.php
Normal file
71
components/com_osmap/views/html/tmpl/default.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @package OSMap
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2007-2014 XMap - Joomla! Vargas - Guillermo Vargas. All rights reserved.
|
||||
* @copyright 2016-2024 Joomlashack.com. All rights reserved.
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of OSMap.
|
||||
*
|
||||
* OSMap is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OSMap is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OSMap. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Alledia\OSMap\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
if ($this->params->get('use_css', 1)) :
|
||||
HTMLHelper::_('stylesheet', 'com_osmap/sitemap_html.min.css', ['relative' => true]);
|
||||
endif;
|
||||
|
||||
if ($this->debug) :
|
||||
Factory::getApplication()->input->set('tmpl', 'component');
|
||||
HTMLHelper::_('stylesheet', 'com_osmap/sitemap_html_debug.min.css', ['relative' => true]);
|
||||
endif;
|
||||
|
||||
if ($this->params->get('menu_text') !== null) :
|
||||
// We have a menu, so let's use its params to display the heading
|
||||
$pageHeading = $this->params->get('page_heading', $this->params->get('page_title'));
|
||||
else :
|
||||
// We don't have a menu, so lets use the sitemap name
|
||||
$pageHeading = $this->sitemap->name;
|
||||
endif;
|
||||
|
||||
$class = join(' ', array_filter([
|
||||
'osmap-sitemap',
|
||||
$this->debug ? 'osmap-debug' : '',
|
||||
$this->params->get('pageclass_sfx', '')
|
||||
]));
|
||||
?>
|
||||
|
||||
<div id="osmap" class="<?php echo $class; ?>">
|
||||
<!-- Heading -->
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<div class="page-header">
|
||||
<h1><?php echo $this->escape($pageHeading); ?></h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Description -->
|
||||
<?php if ($this->params->get('show_sitemap_description', 1)) : ?>
|
||||
<div class="osmap-sitemap-description">
|
||||
<?php echo $this->params->get('sitemap_description', ''); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Items -->
|
||||
<?php echo $this->loadTemplate('items'); ?>
|
||||
</div>
|
||||
74
components/com_osmap/views/html/tmpl/default.xml
Normal file
74
components/com_osmap/views/html/tmpl/default.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_OSMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_OSMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<fields name="request">
|
||||
<fieldset name="request" addfieldpath="/administrator/components/com_osmap/form/fields">
|
||||
<field name="id"
|
||||
type="osmap.sitemaps"
|
||||
required="true"
|
||||
label="COM_OSMAP_SITEMAP"/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="COM_OSMAP_FIELDSET_SITEMAP_SETTINGS_LABEL">
|
||||
<field name="debug"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
label="COM_OSMAP_OPTION_DEBUG_LABEL"
|
||||
description="COM_OSMAP_OPTION_DEBUG_DESC"
|
||||
default="0">
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="use_css"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
label="COM_OSMAP_OPTION_USE_CSS_LABEL"
|
||||
description="COM_OSMAP_OPTION_USE_CSS_DESC"
|
||||
default="1">
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_menu_titles"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
label="COM_OSMAP_OPTION_SHOW_MENU_TITLES_LABEL"
|
||||
description="COM_OSMAP_OPTION_SHOW_MENU_TITLES_DESC"
|
||||
default="1">
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_sitemap_description"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
label="COM_OSMAP_SHOW_SITEMAP_DESCRIPTION_LABEL"
|
||||
description="COM_OSMAP_SHOW_SITEMAP_DESCRIPTION_DESC"
|
||||
default="0">
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="sitemap_description"
|
||||
type="editor"
|
||||
label="COM_OSMAP_SITEMAP_DESCRIPTION_LABEL"
|
||||
description="COM_OSMAP_SITEMAP_DESCRIPTION_DESC"
|
||||
buttons="true"
|
||||
hide="pagebreak,readmore"
|
||||
filter="safehtml"
|
||||
showon="show_sitemap_description:1"/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
46
components/com_osmap/views/html/tmpl/default_items.php
Normal file
46
components/com_osmap/views/html/tmpl/default_items.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @package OSMap
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2007-2014 XMap - Joomla! Vargas - Guillermo Vargas. All rights reserved.
|
||||
* @copyright 2016-2024 Joomlashack.com. All rights reserved.
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of OSMap.
|
||||
*
|
||||
* OSMap is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OSMap is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OSMap. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
if ($this->debug) : ?>
|
||||
<div class="osmap-debug-sitemap">
|
||||
<h1><?php echo Text::_('COM_OSMAP_DEBUG_ALERT_TITLE'); ?></h1>
|
||||
<p><?php echo Text::_('COM_OSMAP_DEBUG_ALERT'); ?></p>
|
||||
<?php echo Text::_('COM_OSMAP_SITEMAP_ID'); ?>: <?php echo $this->sitemap->id; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="osmap-items">
|
||||
<?php $this->sitemap->traverse([$this, 'registerNodeIntoList']); ?>
|
||||
<?php $this->renderSitemap(); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->debug) : ?>
|
||||
<div class="osmap-debug-items-count">
|
||||
<?php echo Text::_('COM_OSMAP_SITEMAP_ITEMS_COUNT'); ?>: <?php echo $this->generalCounter; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
34
components/com_osmap/views/html/view.html.php
Normal file
34
components/com_osmap/views/html/view.html.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* @package OSMap
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2007-2014 XMap - Joomla! Vargas - Guillermo Vargas. All rights reserved.
|
||||
* @copyright 2016-2024 Joomlashack.com. All rights reserved.
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of OSMap.
|
||||
*
|
||||
* OSMap is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* OSMap is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with OSMap. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Alledia\OSMap\View\Site\AbstractList;
|
||||
|
||||
// phpcs:disable PSR1.Files.SideEffects
|
||||
defined('_JEXEC') or die();
|
||||
// phpcs:enable PSR1.Files.SideEffects
|
||||
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||
|
||||
class OSMapViewHtml extends AbstractList
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user