/halogy/application/modules/events/views/admin/viewall.php
https://bitbucket.org/haloweb/halogy-1.0/ · PHP · 57 lines · 48 code · 9 blank · 0 comment · 6 complexity · a4a7a323d0e2b53c1c685302112f86a9 MD5 · raw file
- <h1 class="headingleft">Events</h1>
- <div class="headingright">
- <?php if (in_array('events_edit', $this->permission->permissions)): ?>
- <a href="/admin/events/add_event" class="button">Add Event</a>
- <?php endif; ?>
- </div>
- <?php if ($events): ?>
- <?php echo $this->pagination->create_links(); ?>
- <table class="default clear">
- <tr>
- <th><?php echo order_link('/admin/events/viewall','eventtitle','Event'); ?></th>
- <th><?php echo order_link('/admin/events/viewall','location','Location'); ?></th>
- <th><?php echo order_link('/admin/events/viewall','dateCreated','Date created'); ?></th>
- <th><?php echo order_link('/admin/events/viewall','eventDate','Event date'); ?></th>
- <th>Active</th>
- <th class="tiny"> </th>
- <th class="tiny"> </th>
- </tr>
- <?php foreach ($events as $event): ?>
- <tr>
- <td><?php echo (in_array('events_edit', $this->permission->permissions)) ? anchor('/admin/events/edit_event/'.$event['eventID'], $event['eventTitle']) : $event['eventTitle']; ?></td>
- <td><?php echo $event['location']; ?></td>
- <td><?php echo dateFmt($event['dateCreated']); ?></td>
- <td><?php echo dateFmt($event['eventDate'], 'd M Y'); ?></td>
- <td>
- <?php
- if (strtotime($event['eventDate']) < time()) echo 'No';
- else echo 'Yes';
- ?>
- </td>
- <td class="tiny">
- <?php if (in_array('events_edit', $this->permission->permissions)): ?>
- <?php echo anchor('/admin/events/edit_event/'.$event['eventID'], 'Edit'); ?>
- <?php endif; ?>
- </td>
- <td class="tiny">
- <?php if (in_array('events_delete', $this->permission->permissions)): ?>
- <?php echo anchor('/admin/events/delete_event/'.$event['eventID'], 'Delete', 'onclick="return confirm(\'Are you sure you want to delete this?\')"'); ?>
- <?php endif; ?>
- </td>
- </tr>
- <?php endforeach; ?>
- </table>
- <?php echo $this->pagination->create_links(); ?>
- <p style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p>
- <?php else: ?>
- <p class="clear">There are no events yet.</p>
- <?php endif; ?>