[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_categories/views/categories/tmpl/ -> default.php (source)

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


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1