/administrator/templates/hathor/html/com_content/featured/default.php
PHP | 186 lines | 167 code | 11 blank | 8 comment | 19 complexity | 7e8b431b27dc4374c4b17664f8e1f67b MD5 | raw file
Possible License(s): LGPL-2.1
1<?php 2/** 3 * @package Joomla.Administrator 4 * @subpackage Template.hathor 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9/* add accessibility, labels on input forms */ 10 11defined('_JEXEC') or die; 12 13JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); 14JHtml::_('behavior.tooltip'); 15JHtml::_('behavior.multiselect'); 16 17$user = JFactory::getUser(); 18$listOrder = $this->escape($this->state->get('list.ordering')); 19$listDirn = $this->escape($this->state->get('list.direction')); 20$canOrder = $user->authorise('core.edit.state', 'com_content.article'); 21$saveOrder = $listOrder == 'fp.ordering'; 22$n = count($this->items); 23?> 24<form action="<?php echo JRoute::_('index.php?option=com_content&view=featured');?>" method="post" name="adminForm" id="adminForm"> 25 <fieldset id="filter-bar"> 26 <legend class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></legend> 27 <div class="filter-search"> 28 <label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label> 29 <input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?>" /> 30 <button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button> 31 <button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button> 32 </div> 33 34 <div class="filter-select"> 35 <label class="selectlabel" for="filter_published"><?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?></label> 36 <select name="filter_published" class="inputbox" id="filter_published"> 37 <option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option> 38 <?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?> 39 </select> 40 41 <label class="selectlabel" for="filter_access"><?php echo JText::_('JOPTION_SELECT_ACCESS'); ?></label> 42 <select name="filter_access" class="inputbox" id="filter_access"> 43 <option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option> 44 <?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?> 45 </select> 46 47 <label class="selectlabel" for="filter_language"><?php echo JText::_('JOPTION_SELECT_LANGUAGE'); ?></label> 48 <select name="filter_language" class="inputbox" id="filter_language"> 49 <option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE');?></option> 50 <?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'));?> 51 </select> 52 53 <button type="submit" id="filter-go"> 54 <?php echo JText::_('JSUBMIT'); ?></button> 55 </div> 56 </fieldset> 57 <div class="clr"> </div> 58 59 <table class="adminlist"> 60 <thead> 61 <tr> 62 <th class="checkmark-col"> 63 <input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /> 64 </th> 65 <th class="title"> 66 <?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> 67 </th> 68 <th class="nowrap state-col"> 69 <?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> 70 </th> 71 <th class="title category-col"> 72 <?php echo JHtml::_('grid.sort', 'JCATEGORY', 'a.catid', $listDirn, $listOrder); ?> 73 </th> 74 <th class="nowrap ordering-col"> 75 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'fp.ordering', $listDirn, $listOrder); ?> 76 <?php if ($canOrder && $saveOrder) :?> 77 <?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'featured.saveorder'); ?> 78 <?php endif; ?> 79 </th> 80 <th class="title access-col"> 81 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> 82 </th> 83 <th class="title created-by-col"> 84 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_CREATED_BY', 'a.created_by', $listDirn, $listOrder); ?> 85 </th> 86 <th class="title date-col"> 87 <?php echo JHtml::_('grid.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?> 88 </th> 89 <th class="hits-col"> 90 <?php echo JHtml::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?> 91 </th> 92 <th class="language-col"> 93 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?> 94 </th> 95 <th class="nowrap id-col"> 96 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 97 </th> 98 </tr> 99 </thead> 100 101 <tbody> 102 <?php 103 foreach ($this->items as $i => $item) : 104 $item->max_ordering = 0; //?? 105 $ordering = ($listOrder == 'fp.ordering'); 106 $assetId = 'com_content.article.' . $item->id; 107 $canCreate = $user->authorise('core.create', 'com_content.category.' . $item->catid); 108 $canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id); 109 $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id')|| $item->checked_out == 0; 110 $canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin; 111 ?> 112 <tr class="row<?php echo $i % 2; ?>"> 113 <th class="center"> 114 <?php echo JHtml::_('grid.id', $i, $item->id); ?> 115 </th> 116 <td> 117 <?php if ($item->checked_out) : ?> 118 <?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'featured.', $canCheckin); ?> 119 <?php endif; ?> 120 <?php if ($canEdit) : ?> 121 <a href="<?php echo JRoute::_('index.php?option=com_content&task=article.edit&return=featured&id='.$item->id);?>"> 122 <?php echo $this->escape($item->title); ?></a> 123 <?php else : ?> 124 <?php echo $this->escape($item->title); ?> 125 <?php endif; ?> 126 <p class="smallsub"> 127 <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?></p> 128 </td> 129 <td class="center"> 130 <?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> 131 </td> 132 <td class="center"> 133 <?php echo $this->escape($item->category_title); ?> 134 </td> 135 <td class="order"> 136 <?php if ($canChange) : ?> 137 <?php if ($saveOrder) :?> 138 <?php if ($listDirn == 'asc') : ?> 139 <span><?php echo $this->pagination->orderUpIcon($i, true, 'featured.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span> 140 <span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'featured.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span> 141 <?php elseif ($listDirn == 'desc') : ?> 142 <span><?php echo $this->pagination->orderUpIcon($i, true, 'featured.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?></span> 143 <span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'featured.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span> 144 <?php endif; ?> 145 <?php endif; ?> 146 <?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?> 147 <input type="text" name="order[]" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="text-area-order" title="<?php echo $item->title; ?> order" /> 148 <?php else : ?> 149 <?php echo $item->ordering; ?> 150 <?php endif; ?> 151 </td> 152 <td class="center"> 153 <?php echo $this->escape($item->access_level); ?> 154 </td> 155 <td class="center"> 156 <?php echo $this->escape($item->author_name); ?> 157 </td> 158 <td class="center nowrap"> 159 <?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?> 160 </td> 161 <td class="center"> 162 <?php echo (int) $item->hits; ?> 163 </td> 164 <td class="center"> 165 <?php if ($item->language == '*'):?> 166 <?php echo JText::alt('JALL', 'language'); ?> 167 <?php else:?> 168 <?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> 169 <?php endif;?> 170 </td> 171 <td class="center"> 172 <?php echo (int) $item->id; ?> 173 </td> 174 </tr> 175 <?php endforeach; ?> 176 </tbody> 177 </table> 178 179<?php echo $this->pagination->getListFooter(); ?> 180 181 <input type="hidden" name="task" value="" /> 182 <input type="hidden" name="boxchecked" value="0" /> 183 <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" /> 184 <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" /> 185 <?php echo JHtml::_('form.token'); ?> 186</form>