Merge pull request #22188 from totten/master-uninstall
[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" aria-hidden="true"></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" aria-hidden="true"></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" aria-hidden="true"></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|purify}
93 </div>
94 {/if}
95 {if $event.description}
96 <div class="crm-section event_description-section summary">
97 {$event.description|purify}
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 {strip}
105 {$event.event_start_date|crmDate}
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 {$event.event_end_date|crmDate:0:1}
111 {else}
112 {$event.event_end_date|crmDate}
113 {/if}
114 {/if}
115 {/strip}
116 </div>
117 <div class="clear"></div>
118 </div>
119
120 {if $isShowLocation}
121
122 {if $location.address.1}
123 <div class="crm-section event_address-section">
124 <div class="label">{ts}Location{/ts}</div>
125 <div class="content">{$location.address.1.display|nl2br}</div>
126 <div class="clear"></div>
127 </div>
128 {/if}
129
130 {if ( $event.is_map && $config->mapProvider &&
131 ( is_numeric($location.address.1.geo_code_1) ||
132 ( $location.address.1.city AND $location.address.1.state_province ) ) ) }
133 <div class="crm-section event_map-section">
134 <div class="content">
135 {assign var=showDirectly value="1"}
136 {include file="CRM/Contact/Form/Task/Map/`$config->mapProvider`.tpl" fields=$showDirectly}
137 <a href="{$mapURL}" title="{ts}Show large map{/ts}">{ts}Show large map{/ts}</a>
138 </div>
139 <div class="clear"></div>
140 </div>
141 {/if}
142
143 {/if}{*End of isShowLocation condition*}
144
145
146 {if $location.phone.1.phone || $location.email.1.email}
147 <div class="crm-section event_contact-section">
148 <div class="label">{ts}Contact{/ts}</div>
149 <div class="content">
150 {foreach from=$location.phone item=phone}
151 {if $phone.phone}
152 <div class="crm-eventinfo-contact-phone">
153 {* @todo This should use "{ts 1=$phone.phone_type_display 2=$phone}%1: %2{/ts}" because some language have nbsp before column *}
154 {if $phone.phone_type_id}{$phone.phone_type_display}:{else}{ts}Phone:{/ts}{/if}
155 <span class="tel">{$phone.phone}{if $phone.phone_ext}&nbsp;{ts}ext.{/ts}&nbsp;{$phone.phone_ext}{/if}</span>
156 </div>
157 {/if}
158 {/foreach}
159 {foreach from=$location.email item=email}
160 {if $email.email}
161 <div class="crm-eventinfo-contact-email">
162 {ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
163 </div>
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 <div class="action-link section iCal_links-section">
221 {include file="CRM/Event/Page/iCalLinks.tpl"}
222 </div>
223 {/if}
224
225 {if $event.is_share }
226 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&amp;reset=1" a=1 fe=1 h=1}{/capture}
227 {include file="CRM/common/SocialNetwork.tpl" url=$eventUrl title=$event.title pageURL=$eventUrl}
228 {/if}
229 </div>
230 </div>
231 {literal}
232 <script type="text/javascript">
233
234 cj('body').click(function() {
235 cj('#crm-event-links-list').hide();
236 cj('#crm-participant-list').hide();
237 });
238
239 cj('#crm-event-configure-link').click(function(event) {
240 cj('#crm-event-links-list').toggle();
241 cj('#crm-participant-list').hide();
242 event.stopPropagation();
243 });
244
245 cj('#crm-participant-links').click(function(event) {
246 cj('#crm-participant-list').toggle();
247 cj('#crm-event-links-list').hide();
248 event.stopPropagation();
249 });
250
251 </script>
252 {/literal}