Merge pull request #3672 from kurund/CRM-14937
[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')}
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 <li><a title="{ts}Info and Settings{/ts}"
47 href="{crmURL p='civicrm/event/manage/settings' q="reset=1&action=update&id=`$event.id`"}">{ts}Info and Settings{/ts}</a>
48 </li>
49 <li><a title="{ts}Location{/ts}"
50 href="{crmURL p='civicrm/event/manage/location' q="reset=1&action=update&id=`$event.id`"}">{ts}Location{/ts}</a>
51 </li>
52 <li><a title="{ts}Fees{/ts}"
53 href="{crmURL p='civicrm/event/manage/fee' q="reset=1&action=update&id=`$event.id`"}">{ts}Fees{/ts}</a>
54 </li>
55 <li><a title="{ts}Online Registration{/ts}"
56 href="{crmURL p='civicrm/event/manage/registration' q="reset=1&action=update&id=`$event.id`"}">{ts}Online Registration{/ts}</a>
57 </li>
58 {if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') }
59 <li><a title="{ts}11Schedule Reminders{/ts}"
60 href="{crmURL p='civicrm/event/manage/reminder' q="reset=1&action=update&id=`$event.id`"}">{ts}Schedule Reminders{/ts}</a>
61 </li>
62 {/if}
63 {if $eventCartEnabled}
64 <li><a title="{ts}Conference Slots{/ts}"
65 href="{crmURL p='civicrm/event/manage/conference' q="reset=1&action=update&id=`$event.id`"}">{ts}Conference Slots{/ts}</a>
66 </li>
67 {/if}
68 <li><a title="{ts}Tell a Friend{/ts}"
69 href="{crmURL p='civicrm/event/manage/friend' q="reset=1&action=update&id=`$event.id`"}">{ts}Tell a Friend{/ts}</a>
70 </li>
71 <li><a title="{ts}Personal Campaign Pages{/ts}"
72 href="{crmURL p='civicrm/event/manage/pcp' q="reset=1&action=update&id=`$event.id`"}">{ts}Personal Campaign Pages{/ts}</a>
73 </li>
74 </ul>
75 </div>
76 </div>
77 </div>
78 </li>
79 {/if}
80 <li><div id="crm-participant-wrapper">
81 <div id="crm-participant-links"><span title="{ts}Participant listing links.{/ts}"><div class="icon search-icon"></div></div>
82 <div class="ac_results" id="crm-participant-list" style="margin-left: -25px;">
83 <div class="crm-participant-list-inner">
84 <ul>
85 {if $findParticipants.statusCounted}
86 <li><a class="crm-participant-counted" href="{crmURL p='civicrm/event/search' q="reset=1&force=1&event=`$event.id`&status=true"}"><b>{ts}List counted participants{/ts}</b> ({$findParticipants.statusCounted|replace:'/':', '})</a></li>
87 {/if}
88
89 {if $findParticipants.statusNotCounted}
90 <li><a class="crm-participant-not-counted" href="{crmURL p='civicrm/event/search' q="reset=1&force=1&event=`$event.id`&status=false"}"><b>{ts}List uncounted participants{/ts}</b> ({$findParticipants.statusNotCounted|replace:'/':', '})</a>
91 </li>
92 {/if}
93 {if $participantListingURL}
94 <li><a class="crm-participant-listing" href="{$participantListingURL}">{ts}Public Participant Listing{/ts}</a></li>
95 {/if}
96 </ul>
97 </div>
98 </div>
99 </div></li>
100 </ul>
101 <div class="clear"></div>
102 </div>
103 {/if}
104 <div class="vevent crm-event-id-{$event.id} crm-block crm-event-info-form-block">
105 <div class="event-info">
106 {* Display top buttons only if the page is long enough to merit duplicate buttons *}
107 {if $event.summary or $event.description}
108 <div class="crm-actionlinks-top">
109 {crmRegion name="event-page-eventinfo-actionlinks-top"}
110 {if $allowRegistration}
111 <div class="action-link section register_link-section register_link-top">
112 <a href="{$registerURL}" title="{$registerText}" class="button crm-register-button"><span>{$registerText}</span></a>
113 </div>
114 {/if}
115 {/crmRegion}
116 </div>
117 {/if}
118
119 {if $event.summary}
120 <div class="crm-section event_summary-section">
121 {$event.summary}
122 </div>
123 {/if}
124 {if $event.description}
125 <div class="crm-section event_description-section summary">
126 {$event.description}
127 </div>
128 {/if}
129 <div class="clear"></div>
130 <div class="crm-section event_date_time-section">
131 <div class="label"><label>{ts}When{/ts}</label></div>
132 <div class="content">
133 <abbr class="dtstart" title="{$event.event_start_date|crmDate}">
134 {$event.event_start_date|crmDate}</abbr>
135 {if $event.event_end_date}
136 &nbsp; {ts}through{/ts} &nbsp;
137 {* Only show end time if end date = start date *}
138 {if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}
139 <abbr class="dtend" title="{$event.event_end_date|crmDate:0:1}">
140 {$event.event_end_date|crmDate:0:1}
141 </abbr>
142 {else}
143 <abbr class="dtend" title="{$event.event_end_date|crmDate}">
144 {$event.event_end_date|crmDate}
145 </abbr>
146 {/if}
147 {/if}
148 </div>
149 <div class="clear"></div>
150 </div>
151
152 {if $isShowLocation}
153
154 {if $location.address.1}
155 <div class="crm-section event_address-section">
156 <div class="label"><label>{ts}Location{/ts}</label></div>
157 <div class="content">{$location.address.1.display|nl2br}</div>
158 <div class="clear"></div>
159 </div>
160 {/if}
161
162 {if ( $event.is_map && $config->mapProvider &&
163 ( is_numeric($location.address.1.geo_code_1) ||
164 ( $config->mapGeoCoding && $location.address.1.city AND $location.address.1.state_province ) ) ) }
165 <div class="crm-section event_map-section">
166 <div class="content">
167 {assign var=showDirectly value="1"}
168 {include file="CRM/Contact/Form/Task/Map/`$config->mapProvider`.tpl" fields=$showDirectly}
169 <br /><a href="{$mapURL}" title="{ts}Show large map{/ts}">{ts}Show large map{/ts}</a>
170 </div>
171 <div class="clear"></div>
172 </div>
173 {/if}
174
175 {/if}{*End of isShowLocation condition*}
176
177
178 {if $location.phone.1.phone || $location.email.1.email}
179 <div class="crm-section event_contact-section">
180 <div class="label"><label>{ts}Contact{/ts}</label></div>
181 <div class="content">
182 {* loop on any phones and emails for this event *}
183 {foreach from=$location.phone item=phone}
184 {if $phone.phone}
185 {if $phone.phone_type_id}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}:
186 <span class="tel">{$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if} </span> <br />
187 {/if}
188 {/foreach}
189
190 {foreach from=$location.email item=email}
191 {if $email.email}
192 {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
193 {/if}
194 {/foreach}
195 </div>
196 <div class="clear"></div>
197 </div>
198 {/if}
199
200 {if $event.is_monetary eq 1 && $feeBlock.value}
201 <div class="crm-section event_fees-section">
202 <div class="label"><label>{$event.fee_label}</label></div>
203 <div class="content">
204 <table class="form-layout-compressed fee_block-table">
205 {foreach from=$feeBlock.value name=fees item=value}
206 {assign var=idx value=$smarty.foreach.fees.iteration}
207 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
208 {if $feeBlock.lClass.$idx}
209 {assign var="lClass" value=$feeBlock.lClass.$idx}
210 {else}
211 {assign var="lClass" value="fee_level-label"}
212 {/if}
213 {if $isQuickConfig && $lClass EQ "price_set_option_group-label"}
214 {* Skip price field label for quick_config price sets since it duplicates $event.fee_label *}
215 {else}
216 <tr>
217 <td class="{$lClass} crm-event-label">{$feeBlock.label.$idx}</td>
218 {if $isPriceSet & $feeBlock.isDisplayAmount.$idx}
219 <td class="fee_amount-value right">{$feeBlock.value.$idx|crmMoney}</td>
220 {/if}
221 </tr>
222 {/if}
223 {/foreach}
224 </table>
225 </div>
226 <div class="clear"></div>
227 </div>
228 {/if}
229
230
231 {include file="CRM/Custom/Page/CustomDataView.tpl"}
232
233 <div class="crm-actionlinks-bottom">
234 {crmRegion name="event-page-eventinfo-actionlinks-bottom"}
235 {if $allowRegistration}
236 <div class="action-link section register_link-section register_link-bottom">
237 <a href="{$registerURL}" title="{$registerText}" class="button crm-register-button"><span>{$registerText}</span></a>
238 </div>
239 {/if}
240 {/crmRegion}
241 </div>
242 { if $event.is_public }
243 <br />{include file="CRM/Event/Page/iCalLinks.tpl"}
244 {/if}
245
246 {if $event.is_share }
247 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&amp;reset=1" a=1 fe=1 h=1}{/capture}
248 {include file="CRM/common/SocialNetwork.tpl" url=$eventUrl title=$event.title pageURL=$eventUrl}
249 {/if}
250 </div>
251 </div>
252 {literal}
253 <script type="text/javascript">
254
255 cj('body').click(function() {
256 cj('#crm-event-links-list').hide();
257 cj('#crm-participant-list').hide();
258 });
259
260 cj('#crm-event-configure-link').click(function(event) {
261 cj('#crm-event-links-list').toggle();
262 cj('#crm-participant-list').hide();
263 event.stopPropagation();
264 });
265
266 cj('#crm-participant-links').click(function(event) {
267 cj('#crm-participant-list').toggle();
268 cj('#crm-event-links-list').hide();
269 event.stopPropagation();
270 });
271
272 </script>
273 {/literal}