[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_workflow 6 * 7 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 * @since 4.0.0 10 */ 11 12 defined('_JEXEC') or die; 13 14 use Joomla\CMS\Factory; 15 use Joomla\CMS\HTML\HTMLHelper; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 use Joomla\CMS\Session\Session; 20 21 /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ 22 $wa = $this->document->getWebAssetManager(); 23 $wa->useScript('table.columns') 24 ->useScript('multiselect'); 25 26 $user = Factory::getUser(); 27 28 $listOrder = $this->escape($this->state->get('list.ordering')); 29 $listDirn = $this->escape($this->state->get('list.direction')); 30 $saveOrderingUrl = ''; 31 32 $saveOrder = ($listOrder == 't.ordering'); 33 34 if ($saveOrder) { 35 $saveOrderingUrl = 'index.php?option=com_workflow&task=transitions.saveOrderAjax&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->escape($this->workflow->extension) . '&' . Session::getFormToken() . '=1'; 36 HTMLHelper::_('draggablelist.draggable'); 37 } 38 ?> 39 <form action="<?php echo Route::_('index.php?option=com_workflow&view=transitions&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->escape($this->workflow->extension)); ?>" method="post" name="adminForm" id="adminForm"> 40 <div class="row"> 41 <?php if (!empty($this->sidebar)) : ?> 42 <div id="j-sidebar-container" class="col-md-2"> 43 <?php echo $this->sidebar; ?> 44 </div> 45 <?php endif; ?> 46 <div class="<?php if (!empty($this->sidebar)) { 47 echo 'col-md-10'; 48 } else { 49 echo 'col-md-12'; 50 } ?>"> 51 <div id="j-main-container" class="j-main-container"> 52 <?php 53 // Search tools bar 54 echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); 55 ?> 56 <?php if (empty($this->transitions)) : ?> 57 <div class="alert alert-info"> 58 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 59 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 60 </div> 61 <?php else : ?> 62 <table class="table"> 63 <caption class="visually-hidden"> 64 <?php echo Text::_('COM_WORKFLOW_TRANSITIONS_TABLE_CAPTION'); ?>, 65 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 66 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 67 </caption> 68 <thead> 69 <tr> 70 <td class="w-1 text-center d-none d-md-table-cell"> 71 <?php echo HTMLHelper::_('grid.checkall'); ?> 72 </td> 73 <th scope="col" class="w-1 text-center d-none d-md-table-cell"> 74 <?php echo HTMLHelper::_('searchtools.sort', '', 't.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> 75 </th> 76 <th scope="col" class="w-1 text-center"> 77 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 't.published', $listDirn, $listOrder); ?> 78 </th> 79 <th scope="col" class="w-20"> 80 <?php echo HTMLHelper::_('searchtools.sort', 'COM_WORKFLOW_NAME', 't.title', $listDirn, $listOrder); ?> 81 </th> 82 <th scope="col" class="w-20"> 83 <?php echo HTMLHelper::_('searchtools.sort', 'COM_WORKFLOW_FROM_STAGE', 'from_stage', $listDirn, $listOrder); ?> 84 </th> 85 <th scope="col" class="w-20"> 86 <?php echo HTMLHelper::_('searchtools.sort', 'COM_WORKFLOW_TO_STAGE', 'to_stage', $listDirn, $listOrder); ?> 87 </th> 88 <th scope="col" class="w-3 d-none d-md-table-cell"> 89 <?php echo HTMLHelper::_('searchtools.sort', 'COM_WORKFLOW_ID', 't.id', $listDirn, $listOrder); ?> 90 </th> 91 </tr> 92 </thead> 93 <tbody class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>"> 94 <?php foreach ($this->transitions as $i => $item) : 95 $edit = Route::_('index.php?option=com_workflow&task=transition.edit&id=' . $item->id . '&workflow_id=' . (int) $this->workflowID . '&extension=' . $this->escape($this->workflow->extension)); 96 97 $canEdit = $user->authorise('core.edit', $this->extension . '.transition.' . $item->id); 98 $canCheckin = $user->authorise('core.admin', 'com_workflow') || $item->checked_out == $user->id || is_null($item->checked_out); 99 $canChange = $user->authorise('core.edit.state', $this->extension . '.transition.' . $item->id) && $canCheckin; 100 ?> 101 <tr class="row<?php echo $i % 2; ?>"> 102 <td class="text-center d-none d-md-table-cell"> 103 <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', Text::_($item->title)); ?> 104 </td> 105 <td class="text-center d-none d-md-table-cell"> 106 <?php 107 $iconClass = ''; 108 if (!$canChange) { 109 $iconClass = ' inactive'; 110 } elseif (!$saveOrder) { 111 $iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED'); 112 } 113 ?> 114 <span class="sortable-handler<?php echo $iconClass ?>"> 115 <span class="icon-ellipsis-v" aria-hidden="true"></span> 116 </span> 117 <?php if ($canChange && $saveOrder) : ?> 118 <input type="text" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order hidden"> 119 <?php endif; ?> 120 </td> 121 <td class="text-center"> 122 <?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'transitions.', $canChange); ?> 123 </td> 124 <th scope="row"> 125 <?php if ($item->checked_out) : ?> 126 <?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'transitions.', $canCheckin); ?> 127 <?php endif; ?> 128 <?php if ($canEdit) : ?> 129 <a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(Text::_($item->title)); ?>"> 130 <?php echo $this->escape(Text::_($item->title)); ?> 131 </a> 132 <div class="small"><?php echo $this->escape(Text::_($item->description)); ?></div> 133 <?php else : ?> 134 <?php echo $this->escape(Text::_($item->title)); ?> 135 <div class="small"><?php echo $this->escape(Text::_($item->description)); ?></div> 136 <?php endif; ?> 137 </th> 138 <td class="nowrap"> 139 <?php if ($item->from_stage_id < 0) : ?> 140 <?php echo Text::_('JALL'); ?> 141 <?php else : ?> 142 <?php echo ' ' . $this->escape(Text::_($item->from_stage)); ?> 143 <?php endif; ?> 144 </td> 145 <td class="nowrap"> 146 <?php echo ' ' . $this->escape(Text::_($item->to_stage)); ?> 147 </td> 148 <td class="d-none d-md-table-cell"> 149 <?php echo (int) $item->id; ?> 150 </td> 151 </tr> 152 <?php endforeach ?> 153 </tbody> 154 </table> 155 <?php // load the pagination. ?> 156 <?php echo $this->pagination->getListFooter(); ?> 157 <?php endif; ?> 158 <input type="hidden" name="task" value=""> 159 <input type="hidden" name="boxchecked" value="0"> 160 <input type="hidden" name="workflow_id" value="<?php echo (int) $this->workflowID ?>"> 161 <input type="hidden" name="extension" value="<?php echo $this->escape($this->workflow->extension); ?>"> 162 <?php echo HTMLHelper::_('form.token'); ?> 163 </div> 164 </div> 165 </div> 166 </form>
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 |