530476eb8de2c94456a4aabac52788dcbb93bd4e
[civicrm-core.git] / templates / CRM / Event / Page / EventInfo.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* this template is used for displaying event information *}
11
12 {if $registerClosed }
13 <div class="spacer"></div>
14 <div class="messages status no-popup">
15 <i class="crm-i fa-info-circle"></i>
16 &nbsp;{ts}Registration is closed for this event{/ts}
17 </div>
18 {/if}
19 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviEvent')}
20 <div class="crm-actions-ribbon crm-event-manage-tab-actions-ribbon">
21 <ul id="actions">
22 {if call_user_func(array('CRM_Core_Permission','check'), 'edit all events') && !empty($manageEventLinks)}
23 <li>
24 <div id="crm-event-links-wrapper">
25 <span id="crm-event-configure-link" class="crm-hover-button">
26 <span title="{ts}Configure this event.{/ts}" class="crm-i fa-wrench"></span>
27 </span>
28 <div class="ac_results" id="crm-event-links-list" style="margin-left: -25px;">
29 <div class="crm-event-links-list-inner">
30 <ul>
31 {foreach from=$manageEventLinks item='link'}
32 <li>
33 {* Schedule Reminders requires a different query string. *}
34 {if $link.url EQ 'civicrm/event/manage/reminder'}
35 <a href="{crmURL p=$link.url q="reset=1&action=browse&setTab=1&id=`$event.id`" fb=1}">{$link.title}</a>
36 {else}
37 <a href="{crmURL p=$link.url q="reset=1&action=update&id=`$event.id`" fb=1}">{$link.title}</a>
38 {/if}
39 </li>
40 {/foreach}
41 </ul>
42 </div>
43 </div>
44 </div>
45 </li>
46 {/if}
47 <li>
48 <div id="crm-participant-wrapper">
49 <span id="crm-participant-links" class="crm-hover-button">
50 <span title="{ts}Participant listing links.{/ts}" class="crm-i fa-search"></span>
51 </span>
52 <div class="ac_results" id="crm-participant-list" style="margin-left: -25px;">
53 <div class="crm-participant-list-inner">
54 <ul>
55 {if $findParticipants.statusCounted}
56 <li><a class="crm-participant-counted" href="{crmURL p='civicrm/event/search' q="reset=1&force=1&event=`$event.id`&status=true" fb=1}"><b>{ts}List counted participants{/ts}</b> ({$findParticipants.statusCounted|replace:'/':', '})</a></li>
57 {/if}
58
59 {if $findParticipants.statusNotCounted}
60 <li><a class="crm-participant-not-counted" href="{crmURL p='civicrm/event/search' q="reset=1&force=1&event=`$event.id`&status=false" fb=1}"><b>{ts}List uncounted participants{/ts}</b> ({$findParticipants.statusNotCounted|replace:'/':', '})</a>
61 </li>
62 {/if}
63 {if $participantListingURL}
64 <li><a class="crm-participant-listing" href="{$participantListingURL}">{ts}Public Participant Listing{/ts}</a></li>
65 {/if}
66 </ul>
67 </div>
68 </div>
69 </div>
70 </li>
71 </ul>
72 <div class="clear"></div>
73 </div>
74 {/if}
75 <div class="vevent crm-event-id-{$event.id} crm-block crm-event-info-form-block">
76 <div class="event-info">
77 {* Display top buttons only if the page is long enough to merit duplicate buttons *}
78 {if $event.summary or $event.description}
79 <div class="crm-actionlinks-top">
80 {crmRegion name="event-page-eventinfo-actionlinks-top"}
81 {if $allowRegistration}
82 <div class="action-link section register_link-section register_link-top">
83 <a href="{$registerURL}" title="{$registerText|escape:'html'}" class="button crm-register-button"><span>{$registerText}</span></a>
84 </div>
85 {/if}
86 {/crmRegion}
87 </div>
88 {/if}
89
90 {if $event.summary}
91 <div class="crm-section event_summary-section">
92 {$event.summary}
93 </div>
94 {/if}
95 {if $event.description}
96 <div class="crm-section event_description-section summary">
97 {$event.description}
98 </div>
99 {/if}
100 <div class="clear"></div>
101 <div class="crm-section event_date_time-section">
102 <div class="label">{ts}When{/ts}</div>
103 <div class="content">
104 <abbr class="dtstart" title="{$event.event_start_date|crmDate}">
105 {$event.event_start_date|crmDate}</abbr>
106 {if $event.event_end_date}
107 &nbsp; {ts}through{/ts} &nbsp;
108 {* Only show end time if end date = start date *}
109 {if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}
110 <abbr class="dtend" title="{$event.event_end_date|crmDate:0:1}">
111 {$event.event_end_date|crmDate:0:1}
112 </abbr>
113 {else}
114 <abbr class="dtend" title="{$event.event_end_date|crmDate}">
115 {$event.event_end_date|crmDate}
116 </abbr>
117 {/if}
118 {/if}
119 </div>
120 <div class="clear"></div>
121 </div>
122
123 {if $isShowLocation}
124
125 {if $location.address.1}
126 <div class="crm-section event_address-section">
127 <div class="label">{ts}Location{/ts}</div>
128 <div class="content">{$location.address.1.display|nl2br}</div>
129 <div class="clear"></div>
130 </div>
131 {/if}
132
133 {if ( $event.is_map && $config->mapProvider &&
134 ( is_numeric($location.address.1.geo_code_1) ||
135 ( $location.address.1.city AND $location.address.1.state_province ) ) ) }
136 <div class="crm-section event_map-section">
137 <div class="content">
138 {assign var=showDirectly value="1"}
139 {include file="CRM/Contact/Form/Task/Map/`$config->mapProvider`.tpl" fields=$showDirectly}
140 <br /><a href="{$mapURL}" title="{ts}Show large map{/ts}">{ts}Show large map{/ts}</a>
141 </div>
142 <div class="clear"></div>
143 </div>
144 {/if}
145
146 {/if}{*End of isShowLocation condition*}
147
148
149 {if $location.phone.1.phone || $location.email.1.email}
150 <div class="crm-section event_contact-section">
151 <div class="label">{ts}Contact{/ts}</div>
152 <div class="content">
153 {* loop on any phones and emails for this event *}
154 {foreach from=$location.phone item=phone}
155 {if $phone.phone}
156 {if $phone.phone_type_id}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}:
157 <span class="tel">{$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if} </span> <br />
158 {/if}
159 {/foreach}
160
161 {foreach from=$location.email item=email}
162 {if $email.email}
163 {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
164 {/if}
165 {/foreach}
166 </div>
167 <div class="clear"></div>
168 </div>
169 {/if}
170
171 {if $event.is_monetary eq 1 && $feeBlock.value}
172 <div class="crm-section event_fees-section">
173 <div class="label">{$event.fee_label}</div>
174 <div class="content">
175 <table class="form-layout-compressed fee_block-table">
176 {foreach from=$feeBlock.value name=fees item=value}
177 {assign var=idx value=$smarty.foreach.fees.iteration}
178 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
179 {if $feeBlock.lClass.$idx}
180 {assign var="lClass" value=$feeBlock.lClass.$idx}
181 {else}
182 {assign var="lClass" value="fee_level-label"}
183 {/if}
184 {if $isQuickConfig && $lClass EQ "price_set_option_group-label"}
185 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
186 {else}
187 <tr>
188 <td class="{$lClass} crm-event-label">{$feeBlock.label.$idx}</td>
189 {if $isPriceSet & $feeBlock.isDisplayAmount.$idx}
190 <td class="fee_amount-value right">
191 {if isset($feeBlock.tax_amount.$idx)}
192 {$feeBlock.value.$idx}
193 {else}
194 {$feeBlock.value.$idx|crmMoney}
195 {/if}
196 </td>
197 {/if}
198 </tr>
199 {/if}
200 {/foreach}
201 </table>
202 </div>
203 <div class="clear"></div>
204 </div>
205 {/if}
206
207
208 {include file="CRM/Custom/Page/CustomDataView.tpl"}
209
210 <div class="crm-actionlinks-bottom">
211 {crmRegion name="event-page-eventinfo-actionlinks-bottom"}
212 {if $allowRegistration}
213 <div class="action-link section register_link-section register_link-bottom">
214 <a href="{$registerURL}" title="{$registerText|escape:'html'}" class="button crm-register-button"><span>{$registerText}</span></a>
215 </div>
216 {/if}
217 {/crmRegion}
218 </div>
219 {if $event.is_public }
220 <br />{include file="CRM/Event/Page/iCalLinks.tpl"}
221 {/if}
222
223 {if $event.is_share }
224 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&amp;reset=1" a=1 fe=1 h=1}{/capture}
225 {include file="CRM/common/SocialNetwork.tpl" url=$eventUrl title=$event.title pageURL=$eventUrl}
226 {/if}
227 </div>
228 </div>
229 {literal}
230 <script type="text/javascript">
231
232 cj('body').click(function() {
233 cj('#crm-event-links-list').hide();
234 cj('#crm-participant-list').hide();
235 });
236
237 cj('#crm-event-configure-link').click(function(event) {
238 cj('#crm-event-links-list').toggle();
239 cj('#crm-participant-list').hide();
240 event.stopPropagation();
241 });
242
243 cj('#crm-participant-links').click(function(event) {
244 cj('#crm-participant-list').toggle();
245 cj('#crm-event-links-list').hide();
246 event.stopPropagation();
247 });
248
249 </script>
250 {/literal}