PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/components/com_newsfeeds/views/category/tmpl/default_items.php

https://github.com/joebushi/joomla
PHP | 90 lines | 66 code | 16 blank | 8 comment | 4 complexity | 503f0b7736cc665ff3982cca94b68525 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. <?php
  2. /**
  3. * @version $Id$
  4. * @package Joomla.Site
  5. * @subpackage com_newsfeeds
  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. ?>
  12. <script language="javascript" type="text/javascript">
  13. function tableOrdering(order, dir, task) {
  14. var form = document.adminForm;
  15. form.filter_order.value = order;
  16. form.filter_order_Dir.value = dir;
  17. document.adminForm.submit(task);
  18. }
  19. </script>
  20. <form action="<?php echo JFilterOutput::ampReplace(JFactory::getURI()->toString()); ?>" method="post" name="adminForm">
  21. <div class="limit-box">
  22. <?php echo JText::_('DISPLAY_NUM') .'&nbsp;'; ?>
  23. <?php echo $this->pagination->getLimitBox(); ?>
  24. </div>
  25. <input type="hidden" name="filter_order" value="<?php echo $this->state->get('list.ordering'); ?>" />
  26. <input type="hidden" name="filter_order_Dir" value="<?php echo $this->state->get('list.direction'); ?>" />
  27. </form>
  28. <table class="jlist-table">
  29. <?php if ($this->params->def('show_headings', 1)) : ?>
  30. <thead>
  31. <tr>
  32. <th class="item-num">
  33. <?php echo JText::_('Num'); ?>
  34. </th>
  35. <th class="item-title">
  36. <?php echo JHtml::_('grid.sort', 'News Feed', 'title', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
  37. </th>
  38. </tr>
  39. </thead>
  40. <?php endif; ?>
  41. <tbody>
  42. <?php foreach ($this->items as $i => $item) : ?>
  43. <tr class="<?php echo $i % 2 ? 'odd' : 'even';?>">
  44. <?php if ($this->params->get('show_name')) : ?>
  45. <td class="item-title">
  46. <?php echo JText::_('Feed Name'); ?>
  47. </td>
  48. <?php endif; ?>
  49. <?php if ($this->params->get('show_articles')) : ?>
  50. <td class="item-num-art">
  51. <?php echo JText::_('Num Articles'); ?>
  52. </td>
  53. <?php endif; ?>
  54. </tr>
  55. <tr>
  56. <td class="item-title">
  57. <a href="<?php echo $item->link; ?>">
  58. <?php echo $item->name; ?></a>
  59. </td>
  60. <?php if ($this->params->get('show_articles')) : ?>
  61. <td class="item-num-art">
  62. <?php echo $item->numarticles; ?>
  63. </td>
  64. <?php endif; ?>
  65. </tr>
  66. <?php endforeach; ?>
  67. </tbody>
  68. </table>
  69. <div class="jpagination">
  70. <?php echo $this->pagination->getPagesLinks(); ?>
  71. <div class="jpag-results">
  72. <?php echo $this->pagination->getPagesCounter(); ?>
  73. </div>
  74. </div>