PageRenderTime 49ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://github.com/joebushi/joomla
PHP | 137 lines | 106 code | 23 blank | 8 comment | 12 complexity | 70ae88d88a55dffb7601e8dc4aadcf93 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_content
  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 $this->action; ?>" method="post" name="adminForm">
  21. <?php if ($this->params->get('show_limit')) : ?>
  22. <div class="limit-box">
  23. <?php echo JText::_('DISPLAY_NUM') .'&nbsp;'; ?>
  24. <?php echo $this->pagination->getLimitBox(); ?>
  25. </div>
  26. <?php endif; ?>
  27. <input type="hidden" name="option" value="com_contact" />
  28. <input type="hidden" name="catid" value="<?php echo $this->category->id;?>" />
  29. <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  30. <input type="hidden" name="filter_order_Dir" value="" />
  31. </form>
  32. <table class="jlist-table">
  33. <?php if ($this->params->get('show_headings')) : ?>
  34. <thead>
  35. <tr>
  36. <th class="item-num">
  37. <?php echo JText::_('Num'); ?>
  38. </th>
  39. <th class="item-title">
  40. <?php echo JHtml::_('grid.sort', 'Name', 'cd.name', $this->lists['order_Dir'], $this->lists['order']); ?>
  41. </th>
  42. <?php if ($this->params->get('show_position')) : ?>
  43. <th class="item-position">
  44. <?php echo JHtml::_('grid.sort', 'Position', 'cd.con_position', $this->lists['order_Dir'], $this->lists['order']); ?>
  45. </th>
  46. <?php endif; ?>
  47. <?php if ($this->params->get('show_email')) : ?>
  48. <th class="item-email">
  49. <?php echo JText::_('Email'); ?>
  50. </th>
  51. <?php endif; ?>
  52. <?php if ($this->params->get('show_telephone')) : ?>
  53. <th class="item-phone">
  54. <?php echo JText::_('Phone'); ?>
  55. </th>
  56. <?php endif; ?>
  57. <?php if ($this->params->get('show_mobile')) : ?>
  58. <th class="item-phone">
  59. <?php echo JText::_('Mobile'); ?>
  60. </th>
  61. <?php endif; ?>
  62. <?php if ($this->params->get('show_fax')) : ?>
  63. <th class="item-phone">
  64. <?php echo JText::_('Fax'); ?>
  65. </th>
  66. <?php endif; ?>
  67. </tr>
  68. </thead>
  69. <?php endif; ?>
  70. <tbody>
  71. <?php foreach($this->items as $item) : ?>
  72. <tr class="<?php echo ($item->odd) ? "even" : "odd"; ?>">
  73. <td class="item-num">
  74. <?php echo $item->count +1; ?>
  75. </td>
  76. <td class="item-title">
  77. <a href="<?php echo $item->link; ?>">
  78. <?php echo $item->name; ?></a>
  79. </td>
  80. <?php if ($this->params->get('show_position')) : ?>
  81. <td class="item-position">
  82. <?php echo $item->con_position; ?>
  83. </td>
  84. <?php endif; ?>
  85. <?php if ($this->params->get('show_email')) : ?>
  86. <td class="item-email">
  87. <?php echo $item->email_to; ?>
  88. </td>
  89. <?php endif; ?>
  90. <?php if ($this->params->get('show_telephone')) : ?>
  91. <td class="item-phone">
  92. <?php echo $item->telephone; ?>
  93. </td>
  94. <?php endif; ?>
  95. <?php if ($this->params->get('show_mobile')) : ?>
  96. <td class="item-phone">
  97. <?php echo $item->mobile; ?>
  98. </td>
  99. <?php endif; ?>
  100. <?php if ($this->params->get('show_fax')) : ?>
  101. <td class="item-phone">
  102. <?php echo $item->fax; ?>
  103. </td>
  104. <?php endif; ?>
  105. </tr>
  106. <?php endforeach; ?>
  107. </tbody>
  108. </table>
  109. <div class="jpagination">
  110. <?php echo $this->pagination->getPagesLinks(); ?>
  111. <div class="jpag-results">
  112. <?php echo $this->pagination->getPagesCounter(); ?>
  113. </div>
  114. </div>