/administrator/templates/hathor/html/com_redirect/links/default.php

https://bitbucket.org/eternaware/joomus · PHP · 131 lines · 112 code · 11 blank · 8 comment · 5 complexity · bb9dbd823bb2e66dc71f4668f38b113f MD5 · raw file

  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. defined('_JEXEC') or die;
  10. // Include the component HTML helpers.
  11. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
  12. JHtml::_('behavior.tooltip');
  13. JHtml::_('behavior.multiselect');
  14. $user = JFactory::getUser();
  15. $listOrder = $this->escape($this->state->get('list.ordering'));
  16. $listDirn = $this->escape($this->state->get('list.direction'));
  17. ?>
  18. <form action="<?php echo JRoute::_('index.php?option=com_redirect&view=links'); ?>" method="post" name="adminForm" id="adminForm">
  19. <fieldset id="filter-bar">
  20. <legend class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></legend>
  21. <div class="filter-search">
  22. <label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
  23. <input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_REDIRECT_SEARCH_LINKS'); ?>" />
  24. <button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
  25. <button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
  26. </div>
  27. <div class="filter-select">
  28. <label class="selectlabel" for="filter_published">
  29. <?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?>
  30. </label>
  31. <select name="filter_state" class="inputbox" id="filter_published">
  32. <option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
  33. <?php echo JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true);?>
  34. </select>
  35. <button type="submit" id="filter-go">
  36. <?php echo JText::_('JSUBMIT'); ?></button>
  37. </div>
  38. </fieldset>
  39. <div class="clr"> </div>
  40. <table class="adminlist">
  41. <thead>
  42. <tr>
  43. <th class="checkmark-col">
  44. <input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" />
  45. </th>
  46. <th class="title">
  47. <?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_OLD_URL', 'a.old_url', $listDirn, $listOrder); ?>
  48. </th>
  49. <th class="width-30">
  50. <?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_NEW_URL', 'a.new_url', $listDirn, $listOrder); ?>
  51. </th>
  52. <th class="width-30">
  53. <?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_REFERRER', 'a.referer', $listDirn, $listOrder); ?>
  54. </th>
  55. <th class="width-10">
  56. <?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_CREATED_DATE', 'a.created_date', $listDirn, $listOrder); ?>
  57. </th>
  58. <th class="nowrap state-col">
  59. <?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
  60. </th>
  61. <th class="nowrap id-col">
  62. <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
  63. </th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <?php foreach ($this->items as $i => $item) :
  68. $canCreate = $user->authorise('core.create', 'com_redirect');
  69. $canEdit = $user->authorise('core.edit', 'com_redirect');
  70. $canChange = $user->authorise('core.edit.state', 'com_redirect');
  71. ?>
  72. <tr class="row<?php echo $i % 2; ?>">
  73. <td class="center">
  74. <?php echo JHtml::_('grid.id', $i, $item->id); ?>
  75. </td>
  76. <td>
  77. <?php if ($canEdit) : ?>
  78. <a href="<?php echo JRoute::_('index.php?option=com_redirect&task=link.edit&id='.$item->id);?>" title="<?php echo $this->escape($item->old_url); ?>">
  79. <?php echo $this->escape(str_replace(JURI::root(), '', $item->old_url)); ?></a>
  80. <?php else : ?>
  81. <?php echo $this->escape(str_replace(JURI::root(), '', $item->old_url)); ?>
  82. <?php endif; ?>
  83. </td>
  84. <td>
  85. <?php echo $this->escape($item->new_url); ?>
  86. </td>
  87. <td>
  88. <?php echo $this->escape($item->referer); ?>
  89. </td>
  90. <td class="center">
  91. <?php echo JHtml::_('date', $item->created_date, JText::_('DATE_FORMAT_LC4')); ?>
  92. </td>
  93. <td class="center">
  94. <?php echo JHtml::_('redirect.published', $item->published, $i); ?>
  95. </td>
  96. <td class="center">
  97. <?php echo (int) $item->id; ?>
  98. </td>
  99. </tr>
  100. <?php endforeach; ?>
  101. </tbody>
  102. </table>
  103. <?php echo $this->pagination->getListFooter(); ?>
  104. <p class="footer-tip">
  105. <?php if ($this->enabled) : ?>
  106. <span class="enabled"><?php echo JText::_('COM_REDIRECT_PLUGIN_ENABLED'); ?></span>
  107. <?php else : ?>
  108. <span class="disabled"><?php echo JText::_('COM_REDIRECT_PLUGIN_DISABLED'); ?></span>
  109. <?php endif; ?>
  110. </p>
  111. <div class="clr"></div>
  112. <?php if (!empty($this->items)) : ?>
  113. <?php echo $this->loadTemplate('addform'); ?>
  114. <?php endif; ?>
  115. <input type="hidden" name="task" value="" />
  116. <input type="hidden" name="boxchecked" value="0" />
  117. <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
  118. <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
  119. <?php echo JHtml::_('form.token'); ?>
  120. </form>