PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/redirect/code/trunk/administrator/components/com_redirect/views/links/tmpl/default.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 137 lines | 118 code | 8 blank | 11 comment | 0 complexity | 6ca04268de7d02d4cae275aeba4049ca MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: default.php 577 2011-02-25 05:04:21Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_redirect
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('_JEXEC') or die('Invalid Request');
  11. // Load the tooltip behavior.
  12. JHTML::_('behavior.tooltip');
  13. // Load the default stylesheets and behaviors.
  14. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
  15. JHTML::stylesheet('default.css', 'administrator/components/com_redirect/media/css/');
  16. JHTML::script('list.js', 'administrator/components/com_redirect/media/js/');
  17. $orderCol = $this->escape($this->state->get('list.ordering'));
  18. $orderDirn = $this->escape($this->state->get('list.direction'));
  19. // Build the toolbar.
  20. ?>
  21. <form action="index.php?option=com_redirect&amp;view=links" method="post" name="adminForm">
  22. <fieldset class="filter">
  23. <div class="left">
  24. <label for="search"><?php echo JText::_('Search'); ?>:</label>
  25. <input type="text" name="filter_search" id="search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" size="60" title="<?php echo JText::_('Search in title'); ?>" />
  26. <button type="submit"><?php echo JText::_('Go'); ?></button>
  27. <button type="button" onclick="$('search').value='';$('published').value=0;this.form.submit();"><?php echo JText::_('Clear'); ?></button>
  28. </div>
  29. <div class="right">
  30. <ol>
  31. <li>
  32. <label for="published">
  33. <?php echo JText::_('REDIRECT_SHOW_BY_STATE'); ?>
  34. </label>
  35. <select name="filter_state" id="published" class="inputbox" onchange="this.form.submit()">
  36. <?php
  37. echo JHTML::_('select.options', $this->filter_state, 'value', 'text', $this->state->get('filter.state'));
  38. ?>
  39. </select>
  40. </li>
  41. </ol>
  42. </div>
  43. </fieldset>
  44. <table class="adminlist">
  45. <thead>
  46. <tr>
  47. <th width="20">
  48. <input type="checkbox" name="toggle" value="" class="checklist-toggle" />
  49. </th>
  50. <th class="left">
  51. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_OLD_URL', 'old_url', $orderDirn, $orderCol); ?>
  52. </th>
  53. <th width="30%">
  54. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_NEW_URL', 'new_url', $orderDirn, $orderCol); ?>
  55. </th>
  56. <th width="30%">
  57. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_REFERRER', 'referer', $orderDirn, $orderCol); ?>
  58. </th>
  59. <th width="12%">
  60. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_UPDATED_DATE', 'updated_date', $orderDirn, $orderCol); ?>
  61. <br /><?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_CREATED_DATE', 'created_date', $orderDirn, $orderCol); ?>
  62. </th>
  63. <th width="5%">
  64. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_STATE', 'published', $orderDirn, $orderCol); ?>
  65. </th>
  66. <th nowrap="nowrap" width="5%">
  67. <?php echo JHTML::_('grid.sort', 'REDIRECT_LINK_HITS', 'hits', $orderDirn, $orderCol); ?>
  68. </th>
  69. </tr>
  70. </thead>
  71. <tfoot>
  72. <tr>
  73. <td colspan="7">
  74. <?php echo $this->pagination->getListFooter(); ?>
  75. </td>
  76. </tr>
  77. </tfoot>
  78. <tbody>
  79. <?php
  80. foreach ($this->items as $i => $item) :
  81. ?>
  82. <tr class="row<?php echo $i % 2; ?>">
  83. <td style="text-align:center" class="checklist">
  84. <?php echo JHTML::_('grid.id', $item->id, $item->id); ?>
  85. </td>
  86. <td>
  87. <a href="<?php echo JRoute::_('index.php?option=com_redirect&task=link.edit&l_id='.$item->id);?>">
  88. <?php echo $this->escape($item->old_url); ?></a>
  89. </td>
  90. <td>
  91. <?php echo $this->escape($item->new_url); ?>
  92. </td>
  93. <td>
  94. <?php echo $this->escape($item->referer); ?>
  95. </td>
  96. <td align="center" nowrap="nowrap">
  97. <?php echo JHTML::_('date', $item->updated_date, '%Y-%m-%d %H:%I:%S'); ?>
  98. <br /><?php echo JHTML::_('date', $item->created_date, '%Y-%m-%d %H:%I:%S'); ?>
  99. </td>
  100. <td align="center">
  101. <?php echo JHTML::_('grid.published', $item, $item->id, 'tick.png', 'publish_x.png', 'link.'); ?>
  102. </td>
  103. <td align="center">
  104. <?php echo (int) $item->hits; ?>
  105. </td>
  106. </tr>
  107. <?php endforeach; ?>
  108. </tbody>
  109. </table>
  110. <fieldset class="batch">
  111. <h4>Link Activation Values</h4>
  112. <ol>
  113. <li>
  114. <label for="new_url"><?php echo JText::_('REDIRECT_LINK_NEW_URL'); ?>:</label>
  115. <input type="text" name="new_url" id="new_url" value="" size="50" title="<?php echo JText::_('REDIRECT_LINK_NEW_URL_DESC'); ?>" />
  116. </li>
  117. <li>
  118. <label for="comment"><?php echo JText::_('REDIRECT_LINK_COMMENT'); ?>:</label>
  119. <input type="text" name="comment" id="comment" value="" size="50" title="<?php echo JText::_('REDIRECT_LINK_COMMENT_DESC'); ?>" />
  120. </li>
  121. </ol>
  122. </fieldset>
  123. <input type="hidden" name="task" value="" />
  124. <input type="hidden" name="boxchecked" value="0" />
  125. <input type="hidden" name="filter_order" value="<?php echo $orderCol; ?>" />
  126. <input type="hidden" name="filter_order_Dir" value="<?php echo $orderDirn; ?>" />
  127. <?php echo JHTML::_('form.token'); ?>
  128. </form>
  129. <?php echo JHtml::_('redirect.footer'); ?>