* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Button\FeaturedButton; use Joomla\CMS\Button\PublishedButton; use Joomla\CMS\Button\TransitionButton; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; use Joomla\Component\Content\Administrator\Helper\ContentHelper; use Joomla\Utilities\ArrayHelper; /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('table.columns') ->useScript('multiselect'); $app = Factory::getApplication(); $user = Factory::getUser(); $userId = $user->get('id'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'fp.ordering'; if (strpos($listOrder, 'publish_up') !== false) { $orderingColumn = 'publish_up'; } elseif (strpos($listOrder, 'publish_down') !== false) { $orderingColumn = 'publish_down'; } elseif (strpos($listOrder, 'modified') !== false) { $orderingColumn = 'modified'; } else { $orderingColumn = 'created'; } if ($saveOrder && !empty($this->items)) { $saveOrderingUrl = 'index.php?option=com_content&task=featured.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; HTMLHelper::_('draggablelist.draggable'); } $workflow_enabled = ComponentHelper::getParams('com_content')->get('workflow_enabled'); $workflow_state = false; $workflow_featured = false; if ($workflow_enabled) : $wa->getRegistry()->addExtensionRegistryFile('com_workflow'); $wa->useScript('com_workflow.admin-items-workflow-buttons') ->useScript('com_content.articles-status'); $workflow_state = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.state', 'com_content.article'); $workflow_featured = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.featured', 'com_content.article'); endif; $assoc = Associations::isEnabled(); ?>
$this)); ?> items)) : ?>
hits) : ?> vote) : ?> class="js-draggable" data-url="" data-direction=""> items); ?> items as $i => $item) : $item->max_ordering = 0; $ordering = ($listOrder == 'fp.ordering'); $assetId = 'com_content.article.' . $item->id; $canCreate = $user->authorise('core.create', 'com_content.category.' . $item->catid); $canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out); $canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin; $canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid); $canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId; $canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id); $canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId; $transitions = ContentHelper::filterTransitions($this->transitions, (int) $item->stage_id, (int) $item->workflow_id); $transition_ids = ArrayHelper::getColumn($transitions, 'value'); $transition_ids = ArrayHelper::toInteger($transition_ids); ?> hits) : ?> vote) : ?>
, ,
id, false, 'cid', 'cb', $item->title); ?> $transitions, 'title' => Text::_($item->stage_title), 'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)), 'id' => 'workflow-' . $item->id, 'task' => 'articles.runTransitions' ]; echo (new TransitionButton($options)) ->render(0, $i); ?>
stage_title); ?>
'articles.', 'disabled' => $workflow_featured || !$canChange, 'id' => 'featured-' . $item->id ]; echo (new FeaturedButton()) ->render((int) $item->featured, $i, $options, $item->featured_up, $item->featured_down); ?> 'articles.', 'disabled' => $workflow_state || !$canChange, 'id' => 'state-' . $item->id, 'category_published' => $item->category_published ]; echo (new PublishedButton())->render((int) $item->state, $i, $options, $item->publish_up, $item->publish_down); ?>
checked_out) : ?> editor, $item->checked_out_time, 'articles.', $canCheckin); ?> escape($item->title); ?> escape($item->title); ?>
note)) : ?> escape($item->alias)); ?> escape($item->alias), $this->escape($item->note)); ?>
parent_category_id . '&extension=com_content'); $CurrentCatUrl = Route::_('index.php?option=com_categories&task=category.edit&id=' . $item->catid . '&extension=com_content'); $EditCatTxt = Text::_('COM_CONTENT_EDIT_CATEGORY'); echo Text::_('JCATEGORY') . ': '; if ($item->category_level != '1') : if ($item->parent_category_level != '1') : echo ' » '; endif; endif; if (Factory::getLanguage()->isRtl()) { if ($canEditCat || $canEditOwnCat) : echo ''; endif; echo $this->escape($item->category_title); if ($canEditCat || $canEditOwnCat) : echo ''; endif; if ($item->category_level != '1') : echo ' « '; if ($canEditParCat || $canEditOwnParCat) : echo ''; endif; echo $this->escape($item->parent_category_title); if ($canEditParCat || $canEditOwnParCat) : echo ''; endif; endif; } else { if ($item->category_level != '1') : if ($canEditParCat || $canEditOwnParCat) : echo ''; endif; echo $this->escape($item->parent_category_title); if ($canEditParCat || $canEditOwnParCat) : echo ''; endif; echo ' » '; endif; if ($canEditCat || $canEditOwnCat) : echo ''; endif; echo $this->escape($item->category_title); if ($canEditCat || $canEditOwnCat) : echo ''; endif; } if ($item->category_published < '1') : echo $item->category_published == '0' ? ' (' . Text::_('JUNPUBLISHED') . ')' : ' (' . Text::_('JTRASHED') . ')'; endif; ?>
escape($item->access_level); ?> created_by != 0) : ?> escape($item->author_name); ?> created_by_alias) : ?>
escape($item->created_by_alias)); ?>
association) : ?> id); ?> {$orderingColumn}; echo $date > 0 ? HTMLHelper::_('date', $date, Text::_('DATE_FORMAT_LC4')) : '-'; ?> hits; ?> rating_count; ?> rating; ?> id; ?>
pagination->getListFooter(); ?> Text::_('JTOOLBAR_CHANGE_STATUS'), 'footer' => $this->loadTemplate('stage_footer'), ), $this->loadTemplate('stage_body') ); ?>