[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_tags 6 * 7 * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Factory; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\Router\Route; 17 use Joomla\CMS\Uri\Uri; 18 use Joomla\Component\Tags\Site\Helper\RouteHelper; 19 20 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 21 $wa = $this->document->getWebAssetManager(); 22 $wa->useScript('com_tags.tag-default'); 23 24 // Get the user object. 25 $user = Factory::getUser(); 26 27 // Check if user is allowed to add/edit based on tags permissions. 28 // Do we really have to make it so people can see unpublished tags??? 29 $canEdit = $user->authorise('core.edit', 'com_tags'); 30 $canCreate = $user->authorise('core.create', 'com_tags'); 31 $canEditState = $user->authorise('core.edit.state', 'com_tags'); 32 ?> 33 <div class="com-tags__items"> 34 <form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm"> 35 <?php if ($this->params->get('filter_field') || $this->params->get('show_pagination_limit')) : ?> 36 <?php if ($this->params->get('filter_field')) : ?> 37 <div class="com-tags-tags__filter btn-group"> 38 <label class="filter-search-lbl visually-hidden" for="filter-search"> 39 <?php echo Text::_('COM_TAGS_TITLE_FILTER_LABEL'); ?> 40 </label> 41 <input 42 type="text" 43 name="filter-search" 44 id="filter-search" 45 value="<?php echo $this->escape($this->state->get('list.filter')); ?>" 46 class="inputbox" onchange="document.adminForm.submit();" 47 placeholder="<?php echo Text::_('COM_TAGS_TITLE_FILTER_LABEL'); ?>" 48 > 49 <button type="submit" name="filter_submit" class="btn btn-primary"><?php echo Text::_('JGLOBAL_FILTER_BUTTON'); ?></button> 50 <button type="reset" name="filter-clear-button" class="btn btn-secondary"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button> 51 </div> 52 <?php endif; ?> 53 <?php if ($this->params->get('show_pagination_limit')) : ?> 54 <div class="btn-group float-end"> 55 <label for="limit" class="visually-hidden"> 56 <?php echo Text::_('JGLOBAL_DISPLAY_NUM'); ?> 57 </label> 58 <?php echo $this->pagination->getLimitBox(); ?> 59 </div> 60 <?php endif; ?> 61 62 <input type="hidden" name="limitstart" value=""> 63 <input type="hidden" name="task" value=""> 64 <?php endif; ?> 65 </form> 66 67 <?php if (empty($this->items)) : ?> 68 <div class="alert alert-info"> 69 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 70 <?php echo Text::_('COM_TAGS_NO_ITEMS'); ?> 71 </div> 72 <?php else : ?> 73 <ul class="com-tags-tag__category category list-group"> 74 <?php foreach ($this->items as $i => $item) : ?> 75 <?php if ($item->core_state == 0) : ?> 76 <li class="list-group-item-danger"> 77 <?php else : ?> 78 <li class="list-group-item list-group-item-action"> 79 <?php endif; ?> 80 <?php if (($item->type_alias === 'com_users.category') || ($item->type_alias === 'com_banners.category')) : ?> 81 <h3> 82 <?php echo $this->escape($item->core_title); ?> 83 </h3> 84 <?php else : ?> 85 <h3> 86 <a href="<?php echo Route::_($item->link); ?>"> 87 <?php echo $this->escape($item->core_title); ?> 88 </a> 89 </h3> 90 <?php endif; ?> 91 <?php // Content is generated by content plugin event "onContentAfterTitle" ?> 92 <?php echo $item->event->afterDisplayTitle; ?> 93 <?php $images = json_decode($item->core_images); ?> 94 <?php if ($this->params->get('tag_list_show_item_image', 1) == 1 && !empty($images->image_intro)) : ?> 95 <a href="<?php echo Route::_(RouteHelper::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>"> 96 <?php echo HTMLHelper::_('image', $images->image_intro, $images->image_intro_alt); ?> 97 </a> 98 <?php endif; ?> 99 <?php if ($this->params->get('tag_list_show_item_description', 1)) : ?> 100 <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?> 101 <?php echo $item->event->beforeDisplayContent; ?> 102 <span class="tag-body"> 103 <?php echo HTMLHelper::_('string.truncate', $item->core_body, $this->params->get('tag_list_item_maximum_characters')); ?> 104 </span> 105 <?php // Content is generated by content plugin event "onContentAfterDisplay" ?> 106 <?php echo $item->event->afterDisplayContent; ?> 107 <?php endif; ?> 108 </li> 109 <?php endforeach; ?> 110 </ul> 111 <?php endif; ?> 112 </div>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |