primo commit
This commit is contained in:
		| @ -0,0 +1,191 @@ | ||||
| <?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; | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Layout\LayoutHelper; | ||||
| use Joomla\CMS\Router\Route; | ||||
| use Joomla\CMS\Uri\Uri; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| HTMLHelper::_('bootstrap.tooltip'); | ||||
| HTMLHelper::_('formbehavior.chosen', 'select'); | ||||
|  | ||||
| $container = Factory::getPimpleContainer(); | ||||
|  | ||||
| $baseUrl   = $container->router->sanitizeURL(Uri::root()); | ||||
| $listOrder = $this->state->get('list.ordering'); | ||||
| $listDir   = $this->state->get('list.direction'); | ||||
| ?> | ||||
| <form action="<?php echo Route::_('index.php?option=com_osmap&view=sitemaps'); ?>" | ||||
|       method="post" | ||||
|       name="adminForm" | ||||
|       id="adminForm"> | ||||
|     <div id="j-sidebar-container" class="span2"> | ||||
|         <?php echo $this->sidebar; ?> | ||||
|     </div> | ||||
|  | ||||
|     <div id="j-main-container" class="span10"> | ||||
|         <?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?> | ||||
|  | ||||
|         <?php if (empty($this->items)) : ?> | ||||
|             <div class="alert alert-no-items"> | ||||
|                 <?php echo Text::_('COM_OSMAP_NO_MATCHING_RESULTS'); ?> | ||||
|             </div> | ||||
|  | ||||
|         <?php else : ?> | ||||
|             <table class="adminlist table table-striped" id="sitemapList"> | ||||
|                 <thead> | ||||
|                 <tr> | ||||
|                     <th style="width: 1%"> | ||||
|                         <?php echo HTMLHelper::_('grid.checkall'); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 1%; min-width:55px" class="nowrap center"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'searchtools.sort', | ||||
|                             'COM_OSMAP_HEADING_STATUS', | ||||
|                             'sitemap.published', | ||||
|                             $listDir, | ||||
|                             $listOrder | ||||
|                         ); | ||||
|                         ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th class="title"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'searchtools.sort', | ||||
|                             'COM_OSMAP_HEADING_NAME', | ||||
|                             'sitemap.name', | ||||
|                             $listDir, | ||||
|                             $listOrder | ||||
|                         ); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <?php | ||||
|                     $editLinksWidth = empty($this->languages) ? '63' : '130'; | ||||
|                     $editLinksClass = empty($this->languages) ? 'center' : ''; | ||||
|                     ?> | ||||
|                     <th style="width: 8%; min-width: <?php echo $editLinksWidth . 'px'; ?>" | ||||
|                         class="<?php echo $editLinksClass; ?>"> | ||||
|                         <?php echo Text::_('COM_OSMAP_HEADING_SITEMAP_EDIT_LINKS'); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 260px" class="center"> | ||||
|                         <?php echo Text::_('COM_OSMAP_HEADING_SITEMAP_LINKS'); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 8%" class="nowrap center"> | ||||
|                         <?php echo Text::_('COM_OSMAP_HEADING_NUM_LINKS'); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 1%" class="nowrap"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'searchtools.sort', | ||||
|                             'COM_OSMAP_HEADING_ID', | ||||
|                             'sitemap.id', | ||||
|                             $listDir, | ||||
|                             $listOrder | ||||
|                         ); ?> | ||||
|                     </th> | ||||
|                 </tr> | ||||
|                 </thead> | ||||
|  | ||||
|                 <tbody> | ||||
|                 <?php | ||||
|                 foreach ($this->items as $i => $this->item) : | ||||
|                     $editLink = Route::_('index.php?option=com_osmap&view=sitemap&layout=edit&id=' . $this->item->id); | ||||
|                     ?> | ||||
|                     <tr class="<?php echo 'row' . ($i % 2); ?>"> | ||||
|                         <td class="center"> | ||||
|                             <?php echo HTMLHelper::_('grid.id', $i, $this->item->id); ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <div class="btn-group"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'jgrid.published', | ||||
|                                     $this->item->published, | ||||
|                                     $i, | ||||
|                                     'sitemaps.' | ||||
|                                 ); | ||||
|  | ||||
|                                 $defaultAttribs = [ | ||||
|                                     [ | ||||
|                                         'onclick'             => $this->item->is_default | ||||
|                                             ? 'javascript:void(0);' | ||||
|                                             : "return listItemTask('cb{$i}','sitemap.setAsDefault')", | ||||
|                                         'class'               => 'btn btn-micro hasTooltip', | ||||
|                                         'data-original-title' => Text::_('COM_OSMAP_SITEMAP_IS_DEFAULT_DESC') | ||||
|                                     ] | ||||
|                                 ]; | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'link', | ||||
|                                     '#', | ||||
|                                     sprintf( | ||||
|                                         '<span class="icon-%s"></span>', | ||||
|                                         $this->item->is_default ? 'featured' : 'unfeatured' | ||||
|                                     ), | ||||
|                                     $defaultAttribs | ||||
|                                 ); | ||||
|                                 ?> | ||||
|                             </div> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="nowrap"> | ||||
|                             <?php echo HTMLHelper::_('link', $editLink, $this->escape($this->item->name)); ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="nowrap <?php echo $editLinksClass; ?>"> | ||||
|                             <?php echo $this->loadTemplate('editlinks'); ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="nowrap center osmap-links"> | ||||
|                             <?php echo $this->loadTemplate('previews'); ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <?php echo number_format($this->item->links_count); ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <?php echo (int)$this->item->id; ?> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 <?php endforeach; ?> | ||||
|                 </tbody> | ||||
|             </table> | ||||
|         <?php endif; ?> | ||||
|     </div> | ||||
|  | ||||
|     <input type="hidden" name="task" value=""/> | ||||
|     <input type="hidden" name="boxchecked" value="0"/> | ||||
|     <?php echo HTMLHelper::_('form.token'); ?> | ||||
| </form> | ||||
| @ -0,0 +1,98 @@ | ||||
| <?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\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| $languages = $this->languages ?: ['']; | ||||
| foreach ($languages as $language) : | ||||
|     $langCode = empty($language->sef) ? null : $language->sef; | ||||
|     ?> | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'xml', $langCode), | ||||
|             Text::_('COM_OSMAP_XML_LINK'), | ||||
|             [ | ||||
|                 'target' => '_blank', | ||||
|                 'title'  => Text::_('COM_OSMAP_XML_LINK_TOOLTIP', true), | ||||
|                 'class'  => 'hasTooltip' | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <span class="icon-new-tab"></span> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'html', $langCode), | ||||
|             Text::_('COM_OSMAP_HTML_LINK'), | ||||
|             [ | ||||
|                 'target' => '_blank', | ||||
|                 'title'  => Text::_('COM_OSMAP_HTML_LINK_TOOLTIP', true), | ||||
|                 'class'  => 'hasTooltip' | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <span class="icon-new-tab"></span> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'news', $langCode), | ||||
|             Text::_('COM_OSMAP_NEWS_LINK'), | ||||
|             [ | ||||
|                 'target' => '_blank', | ||||
|                 'title'  => Text::_('COM_OSMAP_NEWS_LINK_TOOLTIP', true), | ||||
|                 'class'  => 'hasTooltip' | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <span class="icon-new-tab"></span> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'images', $langCode), | ||||
|             Text::_('COM_OSMAP_IMAGES_LINK'), | ||||
|             [ | ||||
|                 'target' => '_blank', | ||||
|                 'title'  => Text::_('COM_OSMAP_IMAGES_LINK_TOOLTIP', true), | ||||
|                 'class'  => 'hasTooltip' | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <span class="icon-new-tab"></span> | ||||
|     </span> | ||||
|     <br> | ||||
| <?php endforeach; | ||||
| @ -0,0 +1,187 @@ | ||||
| <?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\Button\DefaultButton; | ||||
| use Joomla\CMS\Button\PublishedButton; | ||||
| use Joomla\CMS\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Layout\LayoutHelper; | ||||
| use Joomla\CMS\Router\Route; | ||||
|  | ||||
| HTMLHelper::_('bootstrap.tooltip'); | ||||
|  | ||||
| $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_osmap&view=sitemaps'); ?>" | ||||
|       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]); | ||||
|  | ||||
|                 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 itemList"> | ||||
|                         <caption class="visually-hidden"> | ||||
|                             <?php echo Text::_('COM_OSMAP_SITEMAP_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 class="w-1 text-center"> | ||||
|                                 <?php echo HTMLHelper::_('grid.checkall'); ?> | ||||
|                             </th> | ||||
|                             <th scope="col" class="w-1 text-center"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'JSTATUS', | ||||
|                                     'sitemap.published', | ||||
|                                     $listDirn, | ||||
|                                     $listOrder | ||||
|                                 ); | ||||
|                                 ?> | ||||
|                             </th> | ||||
|                             <th scope="col" class="w-1 text-center"> | ||||
|                                 <?php echo Text::_('COM_OSMAP_HEADING_DEFAULT'); ?> | ||||
|                             </th> | ||||
|                             <th scope="col"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'COM_OSMAP_HEADING_NAME', | ||||
|                                     'sitemap.name', | ||||
|                                     $listDirn, | ||||
|                                     $listOrder | ||||
|                                 ); ?> | ||||
|                             </th> | ||||
|                             <?php | ||||
|                             $editLinksWidth = empty($this->languages) ? '63' : '130'; | ||||
|                             $editLinksClass = empty($this->languages) ? 'text-center' : ''; | ||||
|                             ?> | ||||
|                             <th scope="col" | ||||
|                                 class="m-8 <?php echo $editLinksClass; ?>" | ||||
|                                 style="min-width: <?php echo $editLinksWidth . 'px'; ?>"> | ||||
|                                 <?php echo Text::_('COM_OSMAP_HEADING_SITEMAP_EDIT_LINKS'); ?> | ||||
|                             </th> | ||||
|                             <th scope="col" class="m-260 text-center"> | ||||
|                                 <?php echo Text::_('COM_OSMAP_HEADING_SITEMAP_LINKS'); ?> | ||||
|                             </th> | ||||
|  | ||||
|                             <th scope="col" class="m-8 text-nowrap text-center"> | ||||
|                                 <?php echo Text::_('COM_OSMAP_HEADING_NUM_LINKS'); ?> | ||||
|                             </th> | ||||
|                             <th scope="col" class="w-5 d-none d-md-table-cell"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'COM_OSMAP_HEADING_ID', | ||||
|                                     'sitemap.id', | ||||
|                                     $listDirn, | ||||
|                                     $listOrder | ||||
|                                 ); | ||||
|                                 ?> | ||||
|                             </th> | ||||
|                         </tr> | ||||
|                         </thead> | ||||
|  | ||||
|                         <tbody> | ||||
|                         <?php | ||||
|                         foreach ($this->items as $i => $this->item) : | ||||
|                             $editLink = Route::_('index.php?option=com_osmap&view=sitemap&layout=edit&id=' . $this->item->id); | ||||
|                             ?> | ||||
|                             <tr class="<?php echo 'row' . ($i % 2); ?>"> | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php echo HTMLHelper::_('grid.id', $i, $this->item->id); ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                         <?php | ||||
|                                         echo (new PublishedButton())->render( | ||||
|                                             (int)$this->item->published, | ||||
|                                             $i, | ||||
|                                             [ | ||||
|                                                 'task_prefix' => 'sitemaps.', | ||||
|                                                 'id'          => 'state-' . $this->item->id | ||||
|                                             ] | ||||
|                                         ); | ||||
|                                         ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php | ||||
|                                     echo (new DefaultButton())->render( | ||||
|                                         (int)$this->item->is_default, | ||||
|                                         $i, | ||||
|                                         [ | ||||
|                                             'id' => 'state-' . $this->item->id | ||||
|                                         ] | ||||
|                                     ); | ||||
|                                     ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-nowrap"> | ||||
|                                     <?php echo HTMLHelper::_('link', $editLink, $this->escape($this->item->name)); ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-nowrap <?php echo $editLinksClass; ?>"> | ||||
|                                     <?php echo $this->loadTemplate('editlinks'); ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-nowrap text-center osmap-links"> | ||||
|                                     <?php echo $this->loadTemplate('previews'); ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php echo (int)$this->item->links_count; ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php echo (int)$this->item->id; ?> | ||||
|                                 </td> | ||||
|                             </tr> | ||||
|                         <?php endforeach; ?> | ||||
|                         </tbody> | ||||
|                     </table> | ||||
|                 <?php endif; ?> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
|     <input type="hidden" name="task" value=""/> | ||||
|     <input type="hidden" name="boxchecked" value="0"/> | ||||
|     <?php echo HTMLHelper::_('form.token'); ?> | ||||
| </form> | ||||
| @ -0,0 +1,60 @@ | ||||
| <?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\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Router\Route; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| $languages = $this->languages ?: ['']; | ||||
|  | ||||
| foreach ($languages as $language) : | ||||
|     $linkQuery = [ | ||||
|         'option' => 'com_osmap', | ||||
|         'view'   => 'sitemapitems', | ||||
|         'id'     => $this->item->id | ||||
|     ]; | ||||
|  | ||||
|     if ($language) { | ||||
|         $linkQuery['lang'] = $language->sef; | ||||
|  | ||||
|         $flag = HTMLHelper::_( | ||||
|             'image', | ||||
|             'mod_languages/' . $language->image . '.gif', | ||||
|             $language->title, | ||||
|             null, | ||||
|             true | ||||
|         ); | ||||
|         $flag .= ' ' . $language->title; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     echo HTMLHelper::_( | ||||
|         'link', | ||||
|         Route::_('index.php?' . http_build_query($linkQuery)), | ||||
|         '<span class="icon-edit"></span>' . ($language ? $flag : '') | ||||
|     ); | ||||
|     ?> | ||||
|     <br> | ||||
| <?php endforeach; | ||||
| @ -0,0 +1,103 @@ | ||||
| <?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\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| $languages = $this->languages ?: ['']; | ||||
| foreach ($languages as $idx => $language) : | ||||
|     $langCode = empty($language->sef) ? null : $language->sef; | ||||
|     ?> | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'xml', $langCode), | ||||
|             Text::_('COM_OSMAP_XML_LINK'), | ||||
|             [ | ||||
|                 'target'           => '_blank', | ||||
|                 'aria-describedby' => 'tip-xml-' . $idx | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <div role="tooltip" id="<?php echo 'tip-xml-' . $idx; ?>"> | ||||
|             <?php echo Text::_('COM_OSMAP_XML_LINK_TOOLTIP'); ?> | ||||
|         </div> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'html', $langCode), | ||||
|             Text::_('COM_OSMAP_HTML_LINK'), | ||||
|             [ | ||||
|                 'target'           => '_blank', | ||||
|                 'aria-describedby' => 'tip-html-' . $idx | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <div role="tooltip" id="<?php echo 'tip-html-' . $idx; ?>"> | ||||
|             <?php echo Text::_('COM_OSMAP_HTML_LINK_TOOLTIP'); ?> | ||||
|         </div> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'news', $langCode), | ||||
|             Text::_('COM_OSMAP_NEWS_LINK'), | ||||
|             [ | ||||
|                 'target'           => '_blank', | ||||
|                 'aria-describedby' => 'tip-news-' . $idx | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <div role="tooltip" id="<?php echo 'tip-news-' . $idx; ?>"> | ||||
|             <?php echo Text::_('COM_OSMAP_NEWS_LINK_TOOLTIP'); ?> | ||||
|         </div> | ||||
|     </span> | ||||
|  | ||||
|     <span class="osmap-link"> | ||||
|         <?php | ||||
|         echo HTMLHelper::_( | ||||
|             'link', | ||||
|             $this->getLink($this->item, 'images', $langCode), | ||||
|             Text::_('COM_OSMAP_IMAGES_LINK'), | ||||
|             [ | ||||
|                 'target' => '_blank', | ||||
|                 'aria-describedby'=>'tip-images-' . $idx | ||||
|             ] | ||||
|         ); | ||||
|         ?> | ||||
|         <div role="tooltip" id="<?php echo 'tip-images-' . $idx; ?>"> | ||||
|             <?php echo Text::_('COM_OSMAP_IMAGES_LINK_TOOLTIP'); ?> | ||||
|         </div> | ||||
|     </span> | ||||
|     <br> | ||||
| <?php | ||||
| endforeach; | ||||
| @ -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 Alledia\OSMap\Factory; | ||||
| use Joomla\CMS\Layout\LayoutHelper; | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| $displayData = [ | ||||
|     'textPrefix' => 'COM_OSMAPS', | ||||
|     'formURL'    => 'index.php?option=com_osmaps&view=sitemaps', | ||||
|     'helpURL'    => 'https://www.joomlashack.com/docs/osmaps/start/', | ||||
|     'icon'       => 'icon-copy article', | ||||
| ]; | ||||
|  | ||||
| $user = Factory::getApplication()->getIdentity(); | ||||
|  | ||||
| if ( | ||||
|     $user->authorise('core.create', 'com_osmaps') | ||||
|     || count($user->getAuthorisedCategories('com_osmaps', 'core.create')) > 0 | ||||
| ) { | ||||
|     $displayData['createURL'] = 'index.php?option=com_osmaps&task=sitemap.add'; | ||||
| } | ||||
|  | ||||
| echo LayoutHelper::render('joomla.content.emptystate', $displayData); | ||||
| @ -0,0 +1,157 @@ | ||||
| <?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\Factory; | ||||
| use Joomla\CMS\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Router\Route; | ||||
| use Joomla\CMS\Uri\Uri; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| HTMLHelper::_('behavior.core'); | ||||
| HTMLHelper::_('bootstrap.tooltip', '.hasTooltip', ['placement' => 'bottom']); | ||||
| HTMLHelper::_('bootstrap.popover', '.hasPopover', ['placement' => 'bottom']); | ||||
|  | ||||
| $function  = Factory::getApplication()->input->getString('function', 'jSelectSitemap'); | ||||
| $baseUrl   = Uri::root(); | ||||
| $ordering  = $this->escape($this->state->get('list.ordering')); | ||||
| $direction = $this->escape($this->state->get('list.direction')); | ||||
|  | ||||
| $formAction = [ | ||||
|     'option'   => 'com_osmap', | ||||
|     'view'     => 'sitemaps', | ||||
|     'layout'   => 'modal', | ||||
|     'tmpl'     => 'component', | ||||
|     'function' => $function | ||||
| ]; | ||||
| ?> | ||||
| <form action="<?php echo Route::_('index.php?' . http_build_query($formAction)); ?>" | ||||
|       method="post" | ||||
|       name="adminForm" | ||||
|       id="adminForm"> | ||||
|  | ||||
|     <?php if (empty($this->items)) : ?> | ||||
|         <div class="alert alert-no-items"> | ||||
|             <?php echo Text::_('COM_OSMAP_NO_MATCHING_RESULTS'); ?> | ||||
|         </div> | ||||
|     <?php else : ?> | ||||
|         <div id="j-main-container"> | ||||
|             <table class="adminlist table table-striped" id="sitemapList"> | ||||
|                 <thead> | ||||
|                 <tr> | ||||
|                     <th class="title"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'grid.sort', | ||||
|                             'COM_OSMAP_HEADING_NAME', | ||||
|                             'sitemap.name', | ||||
|                             $direction, | ||||
|                             $ordering | ||||
|                         ); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 1%; min-width:55px" class="nowrap center"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'grid.sort', | ||||
|                             'COM_OSMAP_HEADING_STATUS', | ||||
|                             'sitemap.published', | ||||
|                             $direction, | ||||
|                             $ordering | ||||
|                         ); | ||||
|                         ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 8%" class="nowrap center"> | ||||
|                         <?php echo Text::_('COM_OSMAP_HEADING_NUM_LINKS'); ?> | ||||
|                     </th> | ||||
|  | ||||
|                     <th style="width: 1%" class="nowrap"> | ||||
|                         <?php | ||||
|                         echo HTMLHelper::_( | ||||
|                             'grid.sort', | ||||
|                             'COM_OSMAP_HEADING_ID', | ||||
|                             'sitemap.id', | ||||
|                             $direction, | ||||
|                             $ordering | ||||
|                         ); ?> | ||||
|                     </th> | ||||
|                 </tr> | ||||
|                 </thead> | ||||
|  | ||||
|                 <tbody> | ||||
|                 <?php foreach ($this->items as $i => $item) : | ||||
|                     ?> | ||||
|                     <tr class="<?php echo 'row' . ($i % 2); ?>"> | ||||
|                         <td> | ||||
|                             <?php | ||||
|                             echo HTMLHelper::_( | ||||
|                                 'link', | ||||
|                                 'javascript:void(0);', | ||||
|                                 $this->escape($item->name), | ||||
|                                 [ | ||||
|                                     'style'   => 'cursor: pointer;', | ||||
|                                     'onclick' => sprintf( | ||||
|                                         "if (window.parent) window.parent.%s('%s', '%s');", | ||||
|                                         $function, | ||||
|                                         $item->id, | ||||
|                                         $this->escape($item->name) | ||||
|                                     ) | ||||
|                                 ] | ||||
|                             ); | ||||
|                             ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <?php if ($item->published) : ?> | ||||
|                                 <span class="icon-publish"></span> | ||||
|                             <?php else : ?> | ||||
|                                 <span class="icon-unpublish"></span> | ||||
|                             <?php endif; ?> | ||||
|  | ||||
|                             <?php if ($item->is_default) : ?> | ||||
|                                 <span class="icon-featured"></span> | ||||
|                             <?php endif; ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <?php echo (int)$item->links_count; ?> | ||||
|                         </td> | ||||
|  | ||||
|                         <td class="center"> | ||||
|                             <?php echo (int)$item->id; ?> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 <?php endforeach; ?> | ||||
|                 </tbody> | ||||
|             </table> | ||||
|         </div> | ||||
|     <?php endif; ?> | ||||
|  | ||||
|     <input type="hidden" name="task" value=""/> | ||||
|     <input type="hidden" name="filter_order" value="<?php echo $ordering; ?>"/> | ||||
|     <input type="hidden" name="filter_order_Dir" value="<?php echo $direction; ?>"/> | ||||
|     <?php echo HTMLHelper::_('form.token'); ?> | ||||
| </form> | ||||
							
								
								
									
										165
									
								
								administrator/components/com_osmap/views/sitemaps/tmpl/modal.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								administrator/components/com_osmap/views/sitemaps/tmpl/modal.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,165 @@ | ||||
| <?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\Factory; | ||||
| use Joomla\CMS\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Layout\LayoutHelper; | ||||
| use Joomla\CMS\Router\Route; | ||||
| use Joomla\CMS\Uri\Uri; | ||||
|  | ||||
| defined('_JEXEC') or die(); | ||||
|  | ||||
| HTMLHelper::_('behavior.core'); | ||||
| HTMLHelper::_('bootstrap.tooltip', '.hasTooltip', ['placement' => 'bottom']); | ||||
| HTMLHelper::_('bootstrap.popover', '.hasPopover', ['placement' => 'bottom']); | ||||
|  | ||||
| $function  = Factory::getApplication()->input->getString('function', 'osmapSelectSitemap'); | ||||
| $baseUrl   = Uri::root(); | ||||
| $ordering  = $this->escape($this->state->get('list.ordering')); | ||||
| $direction = $this->escape($this->state->get('list.direction')); | ||||
|  | ||||
| $formAction = [ | ||||
|     'option'   => 'com_osmap', | ||||
|     'view'     => 'sitemaps', | ||||
|     'layout'   => 'modal', | ||||
|     'tmpl'     => 'component', | ||||
|     'function' => $function | ||||
| ]; | ||||
| ?> | ||||
| <form action="<?php echo Route::_('index.php?' . http_build_query($formAction)); ?>" | ||||
|       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"> | ||||
|                         <?php echo Text::_('COM_OSMAP_NO_MATCHING_RESULTS'); ?> | ||||
|                     </div> | ||||
|  | ||||
|                 <?php else : ?> | ||||
|                     <table class="adminlist table table-sm"> | ||||
|                         <thead> | ||||
|                         <tr> | ||||
|                             <th scope="col"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'COM_OSMAP_HEADING_NAME', | ||||
|                                     'sitemap.name', | ||||
|                                     $direction, | ||||
|                                     $ordering | ||||
|                                 ); ?> | ||||
|                             </th> | ||||
|  | ||||
|                             <th scope="col" class="w-1 text-nowrap text-center"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'COM_OSMAP_HEADING_STATUS', | ||||
|                                     'sitemap.published', | ||||
|                                     $direction, | ||||
|                                     $ordering | ||||
|                                 ); | ||||
|                                 ?> | ||||
|                             </th> | ||||
|  | ||||
|                             <th style="width: 8%" class="w-8 text-center text-nowrap "> | ||||
|                                 <?php echo Text::_('COM_OSMAP_HEADING_NUM_LINKS'); ?> | ||||
|                             </th> | ||||
|  | ||||
|                             <th class="w-1 text-nowrap"> | ||||
|                                 <?php | ||||
|                                 echo HTMLHelper::_( | ||||
|                                     'searchtools.sort', | ||||
|                                     'COM_OSMAP_HEADING_ID', | ||||
|                                     'sitemap.id', | ||||
|                                     $direction, | ||||
|                                     $ordering | ||||
|                                 ); ?> | ||||
|                             </th> | ||||
|                         </tr> | ||||
|                         </thead> | ||||
|  | ||||
|                         <tbody> | ||||
|                         <?php foreach ($this->items as $i => $item) : | ||||
|                             ?> | ||||
|                             <tr class="<?php echo 'row' . ($i % 2); ?>"> | ||||
|                                 <td> | ||||
|                                     <?php | ||||
|                                     echo HTMLHelper::_( | ||||
|                                         'link', | ||||
|                                         null, | ||||
|                                         $this->escape($item->name), | ||||
|                                         [ | ||||
|                                             'style'   => 'cursor: pointer;', | ||||
|                                             'onclick' => sprintf( | ||||
|                                                 "if (window.parent) window.parent.%s('%s', '%s');", | ||||
|                                                 $function, | ||||
|                                                 $item->id, | ||||
|                                                 $this->escape($item->name) | ||||
|                                             ) | ||||
|                                         ] | ||||
|                                     ); | ||||
|                                     ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <div class="btn-group osmap-modal-status"> | ||||
|                                         <?php if ($item->published) : ?> | ||||
|                                             <i class="icon-save"></i> | ||||
|                                         <?php else : ?> | ||||
|                                             <i class="icon-remove"></i> | ||||
|                                         <?php endif; ?> | ||||
|  | ||||
|                                         <?php if ($item->is_default) : ?> | ||||
|                                             <i class="icon-star"></i> | ||||
|                                         <?php endif; ?> | ||||
|                                     </div> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php echo (int)$item->links_count; ?> | ||||
|                                 </td> | ||||
|  | ||||
|                                 <td class="text-center"> | ||||
|                                     <?php echo (int)$item->id; ?> | ||||
|                                 </td> | ||||
|                             </tr> | ||||
|                         <?php endforeach; ?> | ||||
|                         </tbody> | ||||
|                     </table> | ||||
|                 <?php endif; ?> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
|     <input type="hidden" name="task" value=""/> | ||||
|     <?php echo HTMLHelper::_('form.token'); ?> | ||||
| </form> | ||||
		Reference in New Issue
	
	Block a user