forked from odensecentralbibliotek/ddbasic
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplace2book_ticketsinfo.tpl.php
More file actions
40 lines (38 loc) · 1.24 KB
/
place2book_ticketsinfo.tpl.php
File metadata and controls
40 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* @file
* theme implementation for displaying place2book ticket info
* (support for ding_place2book module)
*
* Variables:
* $place2book_id: the ID for the event at place2book.com (if it exists for the ding event)
* $url: the full URL to the event at place2book.com (if it exists for the ding event)
* $type: the type of information to display. 4 kinds exists:
* - event-over
* - closed-admission
* - no-tickets-left
* - order-link
*
* Only the 'order-link' type should be and action - the rest is to be
* displayed as information to the user
*/
switch ($type) {
case 'event-over':
print '<div class="ticket-info">' . t('The event has already taken place') . '</div>';
break;
case 'closed-admission':
print '<div class="ticket-info">' . t('Not open for ticket sale') . '</div>';
break;
case 'sale-not-started':
print '<div class="ticket-info">' . t('Ticket sale has not yet started for this event') . '</div>';
break;
case 'no-tickets-left':
print '<div class="ticket-info">' . t('Sold out') . '</div>';
break;
case 'order-link':
print l(t('Book a ticket'), $url, array('attributes' => array('class' => array('ticket-available'))));
break;
default:
print '-nothing-';
break;
}