/administrator/components/com_menus/views/list/tmpl/default.php

https://github.com/raeldc/nooku-server · PHP · 122 lines · 118 code · 4 blank · 0 comment · 13 complexity · b36553914be49c4ff40e71365e48456f MD5 · raw file

  1. <?php defined('_JEXEC') or die('Restricted access'); ?>
  2. <div id="sidebar">
  3. <h3><?= JText::_( 'Menus' ); ?></h3>
  4. <?php echo $this->loadTemplate('menus'); ?>
  5. </div>
  6. <div class="-koowa-box-flex">
  7. <form action="index.php?option=com_menus&amp;menutype=<?php echo htmlspecialchars($this->menutype); ?>" method="post" name="adminForm">
  8. <table class="adminlist">
  9. <thead>
  10. <tr>
  11. <th width="20">
  12. </th>
  13. <th class="title">
  14. <?php echo JHTML::_('grid.sort', 'Menu Item', 'm.name', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
  15. </th>
  16. <th width="5%">
  17. <?php echo JText::_( 'Default' ); ?>
  18. </th>
  19. <th width="5%" nowrap="nowrap">
  20. <?php echo JHTML::_('grid.sort', 'Published', 'm.published', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
  21. </th>
  22. <th width="8%" nowrap="nowrap">
  23. <?php echo JHTML::_('grid.sort', 'Order by', 'm.ordering', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
  24. <?php if ($this->ordering) echo JHTML::_('grid.order', $this->items ); ?>
  25. </th>
  26. <th width="10%">
  27. <?php echo JHTML::_('grid.sort', 'Access', 'groupname', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
  28. </th>
  29. <th width="20%" class="title">
  30. <?php echo JHTML::_('grid.sort', 'Type', 'm.type', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
  31. </th>
  32. </tr>
  33. <tr>
  34. <td align="center">
  35. <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
  36. </td>
  37. <td>
  38. <?php echo JText::_( 'Filter' ); ?>:
  39. <input type="text" name="search" id="search" value="<?php echo htmlspecialchars($this->lists['search']);?>" class="text_area" onchange="document.adminForm.submit();" />
  40. <button onclick="this.form.submit();"><?php echo JText::_( 'Go' ); ?></button>
  41. <button onclick="document.getElementById('search').value='';this.form.getElementById('filter_state').value='';this.form.submit();"><?php echo JText::_( 'Reset' ); ?></button>
  42. </td>
  43. <td></td>
  44. <td>
  45. <?php echo $this->lists['state']; ?>
  46. </td>
  47. <td></td>
  48. <td></td>
  49. <td></td>
  50. </tr>
  51. </thead>
  52. <tfoot>
  53. <tr>
  54. <td colspan="12">
  55. <?php echo $this->pagination->getListFooter(); ?>
  56. </td>
  57. </tr>
  58. </tfoot>
  59. <tbody>
  60. <?php
  61. $i = 0;
  62. $n = count( $this->items );
  63. $rows = &$this->items;
  64. foreach ($rows as $row) :
  65. $access = JHTML::_('grid.access', $row, $i );
  66. $checked = JHTML::_('grid.checkedout', $row, $i );
  67. $published = JHTML::_('grid.published', $row, $i );
  68. ?>
  69. <tr>
  70. <td align="center">
  71. <?php echo $checked; ?>
  72. </td>
  73. <td nowrap="nowrap">
  74. <?php if ( JTable::isCheckedOut($this->user->get('id'), $row->checked_out ) ) : ?>
  75. <?php echo $row->treename; ?>
  76. <?php else : ?>
  77. <span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Menu' );?>::<?php echo $row->treename; ?>">
  78. <a href="<?php echo JRoute::_('index.php?option=com_menus&menutype=' . htmlspecialchars($row->menutype) . '&task=edit&cid[]=' . $row->id); ?>"><?php echo $row->treename; ?></a></span>
  79. <?php endif; ?>
  80. </td>
  81. <td align="center">
  82. <?php if ( $row->home == 1 ) : ?>
  83. <img src="templates/default/images/menu/icon-16-default.png" alt="<?php echo JText::_( 'Default' ); ?>" />
  84. <?php else : ?>
  85. &nbsp;
  86. <?php endif; ?>
  87. </td>
  88. <td align="center">
  89. <?php echo $published;?>
  90. </td>
  91. <td class="order" nowrap="nowrap">
  92. <span><?php echo $this->pagination->orderUpIcon( $i, $row->parent == 0 || $row->parent == @$rows[$i-1]->parent, 'orderup', 'Move Up', $this->ordering); ?></span>
  93. <span><?php echo $this->pagination->orderDownIcon( $i, $n, $row->parent == 0 || $row->parent == @$rows[$i+1]->parent, 'orderdown', 'Move Down', $this->ordering ); ?></span>
  94. <?php $disabled = $this->ordering ? '' : 'disabled="disabled"'; ?>
  95. <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" <?php echo $disabled ?> class="text_area" style="text-align: center" />
  96. </td>
  97. <td align="center">
  98. <?php echo $access;?>
  99. </td>
  100. <td>
  101. <span class="editlinktip" style="text-transform:capitalize"><?php echo ($row->type == 'component') ? $row->view : $row->type; ?></span>
  102. </td>
  103. </tr>
  104. <?php
  105. $i++;
  106. ?>
  107. <?php endforeach; ?>
  108. </tbody>
  109. </table>
  110. <input type="hidden" name="option" value="com_menus" />
  111. <input type="hidden" name="menutype" value="<?php echo htmlspecialchars($this->menutype); ?>" />
  112. <input type="hidden" name="task" value="view" />
  113. <input type="hidden" name="boxchecked" value="0" />
  114. <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  115. <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
  116. <?php echo JHTML::_( 'form.token' ); ?>
  117. </form>
  118. </div>