PageRenderTime 57ms CodeModel.GetById 35ms RepoModel.GetById 0ms app.codeStats 0ms

/administrator/templates/minima/html/com_categories/categories/default.php

https://github.com/iikozen/minima
PHP | 185 lines | 167 code | 9 blank | 9 comment | 19 complexity | ea0e80d6b8607a21ff57739643d15b80 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: default.php 18347 2010-08-07 02:04:55Z ian $
  4. * @package Joomla.Administrator
  5. * @subpackage com_categories
  6. * @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
  7. * @license GNU General Public License version 2 or later; see LICENSE.txt
  8. */
  9. // no direct access
  10. defined('_JEXEC') or die;
  11. // Include the component HTML helpers.
  12. JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
  13. JHtml::_('behavior.tooltip');
  14. $user = JFactory::getUser();
  15. $userId = $user->get('id');
  16. $extension = $this->escape($this->state->get('filter.extension'));
  17. $listOrder = $this->state->get('list.ordering');
  18. $listDirn = $this->state->get('list.direction');
  19. $ordering = ($listOrder == 'a.lft');
  20. $canOrder = $user->authorise('core.edit.state', 'com_categories');
  21. $saveOrder = ($listOrder == 'a.lft' && $listDirn == 'asc');
  22. ?>
  23. <form action="<?php echo JRoute::_('index.php?option=com_categories&view=categories');?>" method="post" name="adminForm">
  24. <fieldset id="filter-bar">
  25. <div class="filter-search fltlft">
  26. <label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
  27. <input type="text" name="filter_search" id="filter_search" value="<?php echo $this->state->get('filter.search'); ?>" title="<?php echo JText::_('COM_CATEGORIES_ITEMS_SEARCH_FILTER'); ?>" />
  28. <button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
  29. <button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
  30. </div>
  31. <div class="filter-select fltrt">
  32. <select name="filter_published" class="inputbox" onchange="this.form.submit()">
  33. <option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
  34. <?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
  35. </select>
  36. <select name="filter_access" class="inputbox" onchange="this.form.submit()">
  37. <option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option>
  38. <?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
  39. </select>
  40. <select name="filter_language" class="inputbox" onchange="this.form.submit()">
  41. <option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE');?></option>
  42. <?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'));?>
  43. </select>
  44. </div>
  45. </fieldset>
  46. <?php if( $this->pagination->total > 0 ): ?><div id="pagination-top"><?php echo $this->pagination->getListFooter(); ?></div><?php endif; ?>
  47. <div class="clr"> </div>
  48. <table class="adminlist">
  49. <thead>
  50. <tr>
  51. <th width="1%">
  52. <input type="checkbox" name="checkall-toggle" value="" onclick="checkAll(this)" />
  53. </th>
  54. <th width="1%" class="nowrap">
  55. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
  56. </th>
  57. <th>
  58. <?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
  59. </th>
  60. <th width="5%">
  61. <?php echo JHtml::_('grid.sort', 'JPUBLISHED', 'a.published', $listDirn, $listOrder); ?>
  62. </th>
  63. <th width="10%">
  64. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'a.lft', $listDirn, $listOrder); ?>
  65. <?php if ($canOrder && $saveOrder) :?>
  66. <?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'categories.saveorder'); ?>
  67. <?php endif; ?>
  68. </th>
  69. <th width="10%">
  70. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
  71. </th>
  72. <th width="5%" class="nowrap">
  73. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
  74. </th>
  75. </tr>
  76. </thead>
  77. <?php if( $this->pagination->total >= 10 ): ?>
  78. <tfoot>
  79. <tr>
  80. <th width="1%">
  81. <input type="checkbox" name="checkall-toggle" value="" onclick="checkAll(this)" />
  82. </th>
  83. <th width="1%" class="nowrap">
  84. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
  85. </th>
  86. <th>
  87. <?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
  88. </th>
  89. <th width="5%">
  90. <?php echo JHtml::_('grid.sort', 'JPUBLISHED', 'a.published', $listDirn, $listOrder); ?>
  91. </th>
  92. <th width="10%">
  93. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'a.lft', $listDirn, $listOrder); ?>
  94. <?php if ($canOrder && $saveOrder) :?>
  95. <?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'categories.saveorder'); ?>
  96. <?php endif; ?>
  97. </th>
  98. <th width="10%">
  99. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
  100. </th>
  101. <th width="5%" class="nowrap">
  102. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
  103. </th>
  104. </tr>
  105. </tfoot>
  106. <?php endif; ?>
  107. <tbody>
  108. <?php
  109. $originalOrders = array();
  110. foreach ($this->items as $i => $item) :
  111. $orderkey = array_search($item->id, $this->ordering[$item->parent_id]);
  112. $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id');
  113. $canChange = $canCheckin;
  114. ?>
  115. <tr class="row<?php echo $i % 2; ?>">
  116. <td class="center">
  117. <?php echo JHtml::_('grid.id', $i, $item->id); ?>
  118. </td>
  119. <td class="center table-id">
  120. <span title="<?php echo sprintf('%d-%d', $item->lft, $item->rgt);?>">
  121. <?php echo (int) $item->id; ?></span>
  122. </td>
  123. <td class="indent-<?php echo intval(($item->level-1)*15)+4; ?>">
  124. <?php if ($item->checked_out) : ?>
  125. <?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'categories.', $canCheckin); ?>
  126. <?php endif; ?>
  127. <a class="table-title" href="<?php echo JRoute::_('index.php?option=com_categories&task=category.edit&cid[]='.$item->id.'&extension='.$extension);?>">
  128. <?php echo $this->escape($item->title); ?></a>
  129. <p class="smallsub" title="<?php echo $this->escape($item->path);?>">
  130. <?php if (empty($item->note)) : ?>
  131. <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?>
  132. <?php else : ?>
  133. <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note));?>
  134. <?php endif; ?></p>
  135. </td>
  136. <td class="center">
  137. <?php echo JHtml::_('jgrid.published', $item->published, $i, 'categories.', $canChange);?>
  138. </td>
  139. <td class="order">
  140. <?php if ($canChange) : ?>
  141. <?php if ($saveOrder) : ?>
  142. <span><?php echo $this->pagination->orderUpIcon($i, isset($this->ordering[$item->parent_id][$orderkey - 1]), 'categories.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span>
  143. <span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, isset($this->ordering[$item->parent_id][$orderkey + 1]), 'categories.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
  144. <?php endif; ?>
  145. <?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?>
  146. <input type="text" name="order[]" size="5" value="<?php echo $orderkey + 1;?>" <?php echo $disabled ?> class="text-area-order" />
  147. <?php $originalOrders[] = $orderkey + 1; ?>
  148. <?php else : ?>
  149. <?php echo $orderkey + 1;?>
  150. <?php endif; ?>
  151. </td>
  152. <td class="center">
  153. <?php echo $this->escape($item->access_level); ?>
  154. </td>
  155. <td class="center nowrap">
  156. <?php if ($item->language=='*'):?>
  157. <?php echo JText::_('JALL'); ?>
  158. <?php else:?>
  159. <?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
  160. <?php endif;?>
  161. </td>
  162. </tr>
  163. <?php endforeach; ?>
  164. </tbody>
  165. </table>
  166. <?php if( $this->pagination->total > 0 ): ?><div id="pagination-bottom"><?php echo $this->pagination->getListFooter(); ?></div><?php endif; ?>
  167. <div>
  168. <input type="hidden" name="extension" value="<?php echo $extension;?>" />
  169. <input type="hidden" name="task" value="" />
  170. <input type="hidden" name="boxchecked" value="0" />
  171. <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
  172. <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
  173. <input type="hidden" name="original_order_values" value="<?php echo implode($originalOrders, ','); ?>" />
  174. <?php echo JHtml::_('form.token'); ?>
  175. </div>
  176. </form>