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