PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/administrator/components/com_kunena/views/trash/tmpl/default.php

https://github.com/draganz/Kunena-2.0
PHP | 150 lines | 139 code | 2 blank | 9 comment | 11 complexity | 272d6de4204775353af2a38bcd1779de MD5 | raw file
  1. <?php
  2. /**
  3. * Kunena Component
  4. * @package Kunena.Administrator.Template
  5. * @subpackage Trash
  6. *
  7. * @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
  8. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  9. * @link http://www.kunena.org
  10. **/
  11. defined ( '_JEXEC' ) or die ();
  12. $document = JFactory::getDocument();
  13. $document->addStyleSheet ( JURI::base(true).'/components/com_kunena/media/css/admin.css' );
  14. if (JFactory::getLanguage()->isRTL()) $document->addStyleSheet ( JURI::base().'components/com_kunena/media/css/admin.rtl.css' );
  15. ?>
  16. <div id="kadmin">
  17. <div class="kadmin-left"><?php include KPATH_ADMIN.'/views/common/tmpl/menu.php'; ?></div>
  18. <div class="kadmin-right">
  19. <div class="kadmin-functitle icon-trash">
  20. <?php echo $this->state->get( 'list.view_selected') ? JText::_('COM_KUNENA_TRASH_VIEW').' '.JText::_( 'COM_KUNENA_TRASH_TOPICS' ) : JText::_('COM_KUNENA_TRASH_VIEW').' '.JText::_( 'COM_KUNENA_TRASH_MESSAGES') ?>
  21. </div>
  22. <form action="<?php echo KunenaRoute::_('administrator/index.php?option=com_kunena&view=trash') ?>" method="post" id="adminForm" name="adminForm">
  23. <table class="kadmin-sort">
  24. <tr>
  25. <td class="left" width="90%">
  26. <?php echo JText::_( 'COM_KUNENA_FILTER' ); ?>:
  27. <input type="text" name="search" id="search" value="<?php echo $this->escape($this->state->get('list.search'));?>" class="text_area" onchange="document.adminForm.submit();" />
  28. <button onclick="this.form.submit();"><?php echo JText::_( 'COM_KUNENA_GO' ); ?></button>
  29. <button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo JText::_( 'COM_KUNENA_RESET' ); ?></button>
  30. </td>
  31. <td>
  32. <?php echo $this->view_options_list;?>
  33. </td>
  34. </tr>
  35. </table>
  36. <table class="adminlist">
  37. <thead>
  38. <tr>
  39. <th width="5" align="left"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count ( $this->trash_items ); ?>);" /></th>
  40. <th width="5" align="left"><?php
  41. echo $this->state->get( 'list.view_selected') ? JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_ID', 'tt.id', $this->state->get('list.direction'), $this->state->get('list.ordering')) : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_ID', 'm.id', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  42. ?></th>
  43. <th align="left" ><?php
  44. echo $this->state->get( 'list.view_selected') ? JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_TITLE', 'tt.subject', $this->state->get('list.direction'), $this->state->get('list.ordering')) : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_TITLE', 'm.subject', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  45. ?></th>
  46. <th align="left" ><?php
  47. echo JText::_('COM_KUNENA_TRASH_CATEGORY');
  48. ?></th>
  49. <th align="left" ><?php
  50. echo $this->state->get( 'list.view_selected') ? JText::_('COM_KUNENA_TRASH_IP') : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_IP', 'm.ip', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  51. ?></th>
  52. <th align="left" ><?php
  53. echo $this->state->get( 'list.view_selected') ? JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_AUTHOR_USERID', 'tt.first_post_userid', $this->state->get('list.direction'), $this->state->get('list.ordering')) : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_AUTHOR_USERID', 'm.userid', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  54. ?></th>
  55. <th align="left" ><?php
  56. echo $this->state->get( 'list.view_selected') ? JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_AUTHOR', 'tt.first_post_guest_name', $this->state->get('list.direction'), $this->state->get('list.ordering')) : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_AUTHOR', 'm.name', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  57. ?></th>
  58. <th align="left" ><?php
  59. echo $this->state->get( 'list.view_selected') ? JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_DATE', 'tt.first_post_time', $this->state->get('list.direction'), $this->state->get('list.ordering')) : JHTML::_( 'grid.sort', 'COM_KUNENA_TRASH_DATE', 'm.time', $this->state->get('list.direction'), $this->state->get('list.ordering'));
  60. ?></th>
  61. </tr>
  62. </thead>
  63. <tfoot>
  64. <tr>
  65. <td colspan="9">
  66. <div class="pagination">
  67. <div class="limit"><?php echo JText::_('COM_KUNENA_A_DISPLAY'). $this->navigation->getLimitBox (); ?></div>
  68. <?php echo $this->navigation->getPagesLinks (); ?>
  69. <div class="limit"><?php echo $this->navigation->getResultsCounter (); ?></div>
  70. </div>
  71. </td>
  72. </tr>
  73. </tfoot>
  74. <?php
  75. $k = 0;
  76. $i = 0;
  77. foreach ( $this->trash_items as $id => $row ) {
  78. $k = 1 - $k;
  79. ?>
  80. <tr class="row<?php
  81. echo $k;
  82. ?>">
  83. <td align="center"><?php echo JHTML::_('grid.id', $i++, intval($row->id)) ?></td>
  84. <td >
  85. <?php
  86. echo intval($row->id);
  87. ?>
  88. </td>
  89. <td ><?php
  90. echo isset($row->subject) ? $this->escape($row->subject) : $this->escape($row->title);
  91. ?></td>
  92. <td ><?php if ($this->state->get( 'list.view_selected')) {
  93. $cat = KunenaForumCategoryHelper::get($row->category_id);
  94. echo $this->escape($cat->name);
  95. } else {
  96. $cat = KunenaForumCategoryHelper::get($row->catid);
  97. echo $this->escape($cat->name);
  98. }
  99. ?></td>
  100. <td ><?php
  101. if ($this->state->get( 'list.view_selected')) {
  102. $message = KunenaForumMessageHelper::get($row->id);
  103. echo $message->ip;
  104. } else {
  105. echo $this->escape($row->ip);
  106. }
  107. ?></td>
  108. <td ><?php
  109. if ($this->state->get( 'list.view_selected')) {
  110. echo intval($row->first_post_userid);
  111. } else {
  112. echo intval($row->userid);
  113. }
  114. ?></td>
  115. <td ><?php
  116. echo $this->escape($row->getAuthor()->getName());
  117. ?></td>
  118. <td ><?php
  119. if ($this->state->get( 'list.view_selected') ) {
  120. echo strftime('%Y-%m-%d %H:%M:%S',$row->last_post_time);
  121. } else {
  122. echo strftime('%Y-%m-%d %H:%M:%S',$row->time);
  123. }
  124. ?></td>
  125. </tr>
  126. <?php
  127. }
  128. ?>
  129. </table>
  130. <?php
  131. if ( $this->state->get( 'list.view_selected') ) { ?>
  132. <input type="hidden" name="topics" value="1" />
  133. <?php } else { ?>
  134. <input type="hidden" name="messages" value="1" />
  135. <?php } ?>
  136. <input type="hidden" name="filter_order" value="<?php echo intval ( $this->state->get('list.ordering') ) ?>" />
  137. <input type="hidden" name="filter_order_Dir" value="<?php echo $this->escape ($this->state->get('list.direction')) ?>" />
  138. <input type="hidden" name="limitstart" value="<?php echo intval ( $this->navigation->limitstart ) ?>" />
  139. <input type="hidden" name="view" value="trash" />
  140. <input type="hidden" name="task" value="" />
  141. <input type="hidden" name="boxchecked" value="0" />
  142. <?php echo JHTML::_( 'form.token' ); ?>
  143. </form>
  144. </div>
  145. <div class="kadmin-footer">
  146. <?php echo KunenaVersion::getLongVersionHTML (); ?>
  147. </div>
  148. </div>