e85b8a093e876e90f5f8bd7fb2dfd749ff900c24
[civicrm-core.git] / templates / CRM / Event / Page / EventInfo.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {* this template is used for displaying event information *}
27
28 {if $registerClosed }
29 <div class="spacer"></div>
30 <div class="messages status no-popup">
31 <div class="icon inform-icon"></div>
32 &nbsp;{ts}Registration is closed for this event{/ts}
33 </div>
34 {/if}
35 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviEvent')}
36 <div class="crm-actions-ribbon crm-event-manage-tab-actions-ribbon">
37 <ul id="actions">
38 {if call_user_func(array('CRM_Core_Permission','check'), 'edit all events') && !empty($manageEventLinks)}
39 <li>
40 <div id="crm-event-links-wrapper">
41 <div id="crm-event-configure-link"><span title="{ts}Configure this event.{/ts}"><div
42 class="icon settings-icon"></div></span></div>
43 <div class="ac_results" id="crm-event-links-list" style="margin-left: -25px;">
44 <div class="crm-event-links-list-inner">
45 <ul>
46 {foreach from=$manageEventLinks item='link'}
47 <li>
48 <a href="{crmURL p=$link.url q="reset=1&action=update&id=`$event.id`" fb=1}">{$link.title}</a>
49 </li>
50 {/foreach}
51 </ul>
52 </div>
53 </div>
54 </div>
55 </li>
56 {/if}
57 <li><div id="crm-participant-wrapper">
58 <div id="crm-participant-links"><span title="{ts}Participant listing links.{/ts}"><div class="icon search-icon"></div></div>
59 <div class="ac_results" id="crm-participant-list" style="margin-left: -25px;">
60 <div class="crm-participant-list-inner">
61 <ul>
62 {if $findParticipants.statusCounted}
63 <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>
64 {/if}
65
66 {if $findParticipants.statusNotCounted}
67 <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>
68 </li>
69 {/if}
70 {if $participantListingURL}
71 <li><a class="crm-participant-listing" href="{$participantListingURL}">{ts}Public Participant Listing{/ts}</a></li>
72 {/if}
73 </ul>
74 </div>
75 </div>
76 </div></li>
77 </ul>
78 <div class="clear"></div>
79 </div>
80 {/if}
81 <div class="vevent crm-event-id-{$event.id} crm-block crm-event-info-form-block">
82 <div class="event-info">
83 {* Display top buttons only if the page is long enough to merit duplicate buttons *}
84 {if $event.summary or $event.description}
85 <div class="crm-actionlinks-top">
86 {crmRegion name="event-page-eventinfo-actionlinks-top"}
87 {if $allowRegistration}
88 <div class="action-link section register_link-section register_link-top">
89 <a href="{$registerURL}" title="{$registerText}" class="button crm-register-button"><span>{$registerText}</span></a>
90 </div>
91 {/if}
92 {/crmRegion}
93 </div>
94 {/if}
95
96 {if $event.summary}
97 <div class="crm-section event_summary-section">
98 {$event.summary}
99 </div>
100 {/if}
101 {if $event.description}
102 <div class="crm-section event_description-section summary">
103 {$event.description}
104 </div>
105 {/if}
106 <div class="clear"></div>
107 <div class="crm-section event_date_time-section">
108 <div class="label"><label>{ts}When{/ts}</label></div>
109 <div class="content">
110 <abbr class="dtstart" title="{$event.event_start_date|crmDate}">
111 {$event.event_start_date|crmDate}</abbr>
112 {if $event.event_end_date}
113 &nbsp; {ts}through{/ts} &nbsp;
114 {* Only show end time if end date = start date *}
115 {if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}
116 <abbr class="dtend" title="{$event.event_end_date|crmDate:0:1}">
117 {$event.event_end_date|crmDate:0:1}
118 </abbr>
119 {else}
120 <abbr class="dtend" title="{$event.event_end_date|crmDate}">
121 {$event.event_end_date|crmDate}
122 </abbr>
123 {/if}
124 {/if}
125 </div>
126 <div class="clear"></div>
127 </div>
128
129 {if $isShowLocation}
130
131 {if $location.address.1}
132 <div class="crm-section event_address-section">
133 <div class="label"><label>{ts}Location{/ts}</label></div>
134 <div class="content">{$location.address.1.display|nl2br}</div>
135 <div class="clear"></div>
136 </div>
137 {/if}
138
139 {if ( $event.is_map && $config->mapProvider &&
140 ( is_numeric($location.address.1.geo_code_1) ||
141 ( $config->mapGeoCoding && $location.address.1.city AND $location.address.1.state_province ) ) ) }
142 <div class="crm-section event_map-section">
143 <div class="content">
144 {assign var=showDirectly value="1"}
145 {include file="CRM/Contact/Form/Task/Map/`$config->mapProvider`.tpl" fields=$showDirectly}
146 <br /><a href="{$mapURL}" title="{ts}Show large map{/ts}">{ts}Show large map{/ts}</a>
147 </div>
148 <div class="clear"></div>
149 </div>
150 {/if}
151
152 {/if}{*End of isShowLocation condition*}
153
154
155 {if $location.phone.1.phone || $location.email.1.email}
156 <div class="crm-section event_contact-section">
157 <div class="label"><label>{ts}Contact{/ts}</label></div>
158 <div class="content">
159 {* loop on any phones and emails for this event *}
160 {foreach from=$location.phone item=phone}
161 {if $phone.phone}
162 {if $phone.phone_type_id}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}:
163 <span class="tel">{$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if} </span> <br />
164 {/if}
165 {/foreach}
166
167 {foreach from=$location.email item=email}
168 {if $email.email}
169 {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
170 {/if}
171 {/foreach}
172 </div>
173 <div class="clear"></div>
174 </div>
175 {/if}
176
177 {if $event.is_monetary eq 1 && $feeBlock.value}
178 <div class="crm-section event_fees-section">
179 <div class="label"><label>{$event.fee_label}</label></div>
180 <div class="content">
181 <table class="form-layout-compressed fee_block-table">
182 {foreach from=$feeBlock.value name=fees item=value}
183 {assign var=idx value=$smarty.foreach.fees.iteration}
184 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
185 {if $feeBlock.lClass.$idx}
186 {assign var="lClass" value=$feeBlock.lClass.$idx}
187 {else}
188 {assign var="lClass" value="fee_level-label"}
189 {/if}
190 {if $isQuickConfig && $lClass EQ "price_set_option_group-label"}
191 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
192 {else}
193 <tr>
194 <td class="{$lClass} crm-event-label">{$feeBlock.label.$idx}</td>
195 {if $isPriceSet & $feeBlock.isDisplayAmount.$idx}
196 <td class="fee_amount-value right">{$feeBlock.value.$idx|crmMoney}</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}" 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}