/administrator/components/com_easysocial/themes/default/events/default.php

https://gitlab.com/vnsoftdev/swc · PHP · 222 lines · 181 code · 31 blank · 10 comment · 21 complexity · 4da29740e74505117c721706a8860ccf MD5 · raw file

  1. <?php
  2. /**
  3. * @package EasySocial
  4. * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
  5. * @license GNU/GPL, see LICENSE.php
  6. * EasySocial is free software. This version may have been modified pursuant
  7. * to the GNU General Public License, and as distributed it includes or
  8. * is derivative of works licensed under the GNU General Public License or
  9. * other free or open source software licenses.
  10. * See COPYRIGHT.php for copyright notices and details.
  11. */
  12. defined('_JEXEC') or die('Unauthorized Access');
  13. ?>
  14. <form action="" method="post" name="adminForm" class="esForm" id="adminForm" data-table-grid>
  15. <div class="filter-bar form-inline">
  16. <div class="form-group">
  17. <?php echo $this->html('filter.search', $search); ?>
  18. </div>
  19. <?php if ($this->tmpl != 'component') { ?>
  20. <div class="form-group">
  21. <strong><?php echo JText::_('COM_EASYSOCIAL_FILTER_BY'); ?> :</strong>
  22. <div>
  23. <?php echo $this->html('filter.published', 'state', $state); ?>
  24. <select class="form-control input-sm" name="type" id="filterType" data-table-grid-filter>
  25. <option value="all"<?php echo $type == 'all' ? ' selected="selected"' : '';?>><?php echo JText::_('COM_EASYSOCIAL_FILTER_EVENT_TYPE'); ?></option>
  26. <option value="1"<?php echo $type == 1 ? ' selected="selected"' : '';?>><?php echo JText::_('COM_EASYSOCIAL_EVENTS_OPEN_EVENT'); ?></option>
  27. <option value="2"<?php echo $type == 2 ? ' selected="selected"' : '';?>><?php echo JText::_('COM_EASYSOCIAL_EVENTS_CLOSED_EVENT'); ?></option>
  28. <option value="3"<?php echo $type == 3 ? ' selected="selected"' : '';?>><?php echo JText::_('COM_EASYSOCIAL_EVENTS_INVITE_EVENT'); ?></option>
  29. </select>
  30. </div>
  31. </div>
  32. <?php } ?>
  33. <div class="form-group pull-right">
  34. <div><?php echo $this->html('filter.limit', $limit); ?></div>
  35. </div>
  36. </div>
  37. <table class="table table-striped table-es table-hover">
  38. <thead>
  39. <tr>
  40. <th width="1%" class="center">
  41. <input type="checkbox" name="toggle" data-table-grid-checkall />
  42. </th>
  43. <th>
  44. <?php echo $this->html('grid.sort', 'a.title', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_TITLE'), $ordering, $direction); ?>
  45. </th>
  46. <?php if ($this->tmpl != 'component') { ?>
  47. <th class="center" width="15%">
  48. <?php echo $this->html('grid.sort', 'b.title', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_CATEGORY'), $ordering, $direction); ?>
  49. </th>
  50. <th class="center" width="5%">
  51. <?php echo $this->html( 'grid.sort' , 'a.featured' , JText::_('COM_EASYSOCIAL_TABLE_COLUMN_FEATURED') , $ordering , $direction ); ?>
  52. </th>
  53. <th width="5%" class="center">
  54. <?php echo $this->html('grid.sort', 'a.state', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_STATUS'), $ordering, $direction); ?>
  55. </th>
  56. <th class="center" width="5%">
  57. <?php echo $this->html('grid.sort', 'a.created_by', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_CREATED_BY'), $ordering, $direction); ?>
  58. </th>
  59. <th width="5%" class="center">
  60. <?php echo JText::_('COM_EASYSOCIAL_TABLE_COLUMN_USERS'); ?>
  61. </th>
  62. <?php } ?>
  63. <th class="center" width="10%">
  64. <?php echo $this->html('grid.sort', 'a.created', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_CREATED'), $ordering, $direction); ?>
  65. </th>
  66. <th width="5%" class="center">
  67. <?php echo $this->html('grid.sort', 'a.id', JText::_('COM_EASYSOCIAL_TABLE_COLUMN_ID'), $ordering, $direction); ?>
  68. </th>
  69. </thead>
  70. <tbody>
  71. <?php if (!empty($events)) { ?>
  72. <?php $i = 0;?>
  73. <?php foreach ($events as $event) { ?>
  74. <tr class="row<?php echo $i; ?>" data-grid-row data-id="<?php echo $event->id; ?>">
  75. <td align="center">
  76. <?php echo $this->html('grid.id', $i, $event->id); ?>
  77. </td>
  78. <td>
  79. <div class="media">
  80. <div class="media-object pull-left">
  81. <img src="<?php echo $event->getAvatar();?>" class="es-avatar" />
  82. </div>
  83. <div class="media-body">
  84. <a href="<?php echo FRoute::url(array('view' => 'events', 'layout' => 'form', 'id' => $event->id));?>" style="font-size: 16px;font-weight:700;"
  85. data-event-insert
  86. data-id="<?php echo $event->id;?>"
  87. data-avatar="<?php echo $event->getAvatar();?>"
  88. data-title="<?php echo $this->html('string.escape', $event->getName());?>"
  89. data-alias="<?php echo $event->getAlias();?>"
  90. style="font-size: 16px;font-weight:700;"
  91. >
  92. <?php echo JText::_($event->title); ?>
  93. </a>
  94. <p class="mt-5 mb-10 fd-small">
  95. <?php if ($event->description){ ?>
  96. <?php echo $this->html('string.truncater', $event->description, 180);?>
  97. <?php } else { ?>
  98. <?php echo JText::_('COM_EASYSOCIAL_EVENTS_NO_DESCRIPTION'); ?>
  99. <?php } ?>
  100. </p>
  101. <div class="es-event-labels">
  102. <?php if ($event->isOpen()){ ?>
  103. <span class="label label-success" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_OPEN_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  104. <i class="ies-earth"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_OPEN_EVENT'); ?>
  105. </span>
  106. <?php } ?>
  107. <?php if ($event->isClosed()){ ?>
  108. <span class="label label-danger" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_CLOSED_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  109. <i class="ies-locked"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_CLOSED_EVENT'); ?>
  110. </span>
  111. <?php } ?>
  112. <?php if ($event->isInviteOnly()){ ?>
  113. <span class="label label-warning" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_INVITE_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  114. <i class="ies-locked"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_INVITE_EVENT'); ?>
  115. </span>
  116. <?php } ?>
  117. <?php if ($event->isOver()) { ?>
  118. <span class="label label-warning" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_OVER_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  119. <i class="ies-flag"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_OVER_EVENT'); ?>
  120. </span>
  121. <?php } ?>
  122. <?php if ($event->isOngoing()) { ?>
  123. <span class="label label-info" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_ONGOING_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  124. <i class="ies-flag"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_ONGOING_EVENT'); ?>
  125. </span>
  126. <?php } ?>
  127. <?php if ($event->isUpcoming()) { ?>
  128. <span class="label label-success" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_UPCOMING_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  129. <i class="ies-alarm"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_UPCOMING_EVENT'); ?>
  130. </span>
  131. <?php } ?>
  132. <?php if ($event->isRecurringEvent()) { ?>
  133. <span class="label label-warning" data-original-title="<?php echo FD::_('COM_EASYSOCIAL_EVENTS_RECURRING_EVENT_TOOLTIP', true);?>" data-es-provide="tooltip" data-placement="top">
  134. <i class="ies-refresh"></i> <?php echo JText::_('COM_EASYSOCIAL_EVENTS_RECURRING_EVENT'); ?>
  135. </span>
  136. <?php } ?>
  137. </div>
  138. </div>
  139. </div>
  140. </td>
  141. <?php if ($this->tmpl != 'component') { ?>
  142. <td class="center">
  143. <a href="<?php echo FRoute::url(array('view' => 'events', 'layout' => 'category', 'id' => $event->category_id)); ?>" target="_blank"><?php echo JText::_($event->getCategory()->title); ?></a>
  144. </td>
  145. <td class="center">
  146. <?php echo $this->html('grid.featured', $event, 'events', 'featured'); ?>
  147. </td>
  148. <td class="center">
  149. <?php echo $this->html('grid.published', $event, 'events', 'state', array(2 => 'approve'), array(2 => 'COM_EASYSOCIAL_GRID_TOOLTIP_APPROVE_ITEM'), array(2 => 'pending')); ?>
  150. </td>
  151. <td class="center">
  152. <a href="<?php echo FRoute::url(array('view' => 'users', 'layout' => 'form', 'id' => $event->getCreator()->id)); ?>" target="_blank"><?php echo $event->getCreator()->getName(); ?></a>
  153. </td>
  154. <td class="center">
  155. <?php echo $event->getTotalGuests(); ?>
  156. </td>
  157. <?php } ?>
  158. <td class="center">
  159. <?php echo $event->created; ?>
  160. </td>
  161. <td class="center">
  162. <?php echo $event->id;?>
  163. </td>
  164. </tr>
  165. <?php $i++; ?>
  166. <?php } ?>
  167. <?php } else { ?>
  168. <tr class="is-empty">
  169. <td colspan="9" class="center empty">
  170. <?php echo JText::_('COM_EASYSOCIAL_EVENTS_NO_EVENT_CREATED_YET');?>
  171. </td>
  172. </tr>
  173. <?php } ?>
  174. </tbody>
  175. <tfoot>
  176. <tr>
  177. <td colspan="9" class="center">
  178. <div class="footer-pagination"><?php echo $pagination->getListFooter(); ?></div>
  179. </td>
  180. </tr>
  181. </tfoot>
  182. </table>
  183. <?php echo JHTML::_('form.token'); ?>
  184. <input type="hidden" name="ordering" value="<?php echo $ordering;?>" data-table-grid-ordering />
  185. <input type="hidden" name="direction" value="<?php echo $direction;?>" data-table-grid-direction />
  186. <input type="hidden" name="boxchecked" value="0" data-table-grid-box-checked />
  187. <input type="hidden" name="task" value="" data-table-grid-task />
  188. <input type="hidden" name="option" value="com_easysocial" />
  189. <input type="hidden" name="view" value="events" />
  190. <input type="hidden" name="controller" value="events" />
  191. </form>