Merge pull request #17981 from eileenmcnaughton/merge_form
[civicrm-core.git] / templates / CRM / Event / Page / ManageEvent.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 {capture assign=newEventURL}{crmURL p='civicrm/event/add' q="action=add&reset=1"}{/capture}
11
12 <div class="crm-block crm-content-block">
13 <div class="float-right">
14 {include file="CRM/Event/Page/iCalLinks.tpl"}
15 </div>
16
17 <div class="action-link">
18 <a accesskey="N" href="{$newEventURL}" id="newManageEvent" class="button crm-popup">
19 <span><i class="crm-i fa-calendar-plus-o" aria-hidden="true"></i> {ts}Add Event{/ts}</span>
20 </a>
21 <div class="clear"></div>
22 </div>
23
24 {include file="CRM/Event/Form/SearchEvent.tpl"}
25
26 {if $rows}
27 <div id="event_status_id" class="crm-block crm-manage-events">
28 {strip}
29 {include file="CRM/common/pager.tpl" location="top"}
30 {include file="CRM/common/pagerAToZ.tpl"}
31 {* handle enable/disable actions*}
32 {include file="CRM/common/enableDisableApi.tpl"}
33 {include file="CRM/common/jsortable.tpl"}
34 <table id="options" class="display">
35 <thead>
36 <tr>
37 <th>{ts}Event{/ts}</th>
38 <th>{ts}City{/ts}</th>
39 <th>{ts}State/Province{/ts}</th>
40 <th>{ts}Type{/ts}</th>
41 <th>{ts}Public?{/ts}</th>
42 <th>{ts}Starts{/ts}</th>
43 <th>{ts}Ends{/ts}</th>
44 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
45 <th>{ts}Campaign{/ts}</th>
46 {/if}
47 <th>{ts}Active?{/ts}</th>
48 <th></th>
49 <th class="hiddenElement"></th>
50 <th class="hiddenElement"></th>
51 </tr>
52 </thead>
53 {foreach from=$rows key=keys item=row}
54 {if $keys neq 'tab'}
55 <tr id="event-{$row.id}" class="crm-entity {if NOT $row.is_active} disabled{/if}">
56 <td class="crm-event_{$row.id}">
57 <a href="{crmURL p='civicrm/event/info' q="id=`$row.id`&reset=1"}"
58 title="{ts}View event info page{/ts}" class="bold">{$row.title}</a>&nbsp;&nbsp;({ts}ID:{/ts} {$row.id})<br/>
59 <span><b>{$row.repeat}</b></span>
60 </td>
61 <td class="crm-event-city">{$row.city}</td>
62 <td class="crm-event-state_province">{$row.state_province}</td>
63 <td class="crm-event-event_type">{$row.event_type}</td>
64 <td class="crm-event-is_public">{if $row.is_public eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
65 <td class="crm-event-start_date" data-order="{$row.start_date|crmDate:'%Y-%m-%d'}">{$row.start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
66 <td class="crm-event-end_date" data-order="{$row.end_date|crmDate:'%Y-%m-%d'}">{$row.end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
67 {if call_user_func(array('CRM_Campaign_BAO_Campaign','isCampaignEnable'))}
68 <td class="crm-event-campaign">{$row.campaign}</td>
69 {/if}
70 <td class="crm-event_status" id="row_{$row.id}_status">
71 {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}
72 </td>
73 <td class="crm-event-actions right nowrap">
74 <div class="crm-configure-actions">
75 <span id="event-configure-{$row.id}" class="btn-slide crm-hover-button">{ts}Configure{/ts}
76 <ul class="panel" id="panel_info_{$row.id}">
77 {foreach from=$rows.tab key=k item=v}
78 {assign var="fld" value=$v.field}
79 {if NOT $row.$fld}{assign var="status" value="disabled"}{else}{assign var="status" value="enabled"}{/if}
80 {if $k eq 'reminder'}
81 <li><a title="{$v.title|escape:'html'}" class="action-item crm-hover-button {$status}"
82 href="{crmURL p="`$v.url`" q="reset=1&action=browse&setTab=1&id=`$row.id`"}">{$v.title}</a>
83 {else}
84 <li><a title="{$v.title|escape:'html'}" class="action-item crm-hover-button {$status}"
85 href="{crmURL p="`$v.url`" q="reset=1&action=update&id=`$row.id`"}">{$v.title}</a></li>
86 {/if}
87 {/foreach}
88 </ul>
89 </span>
90 </div>
91
92 <div class=crm-event-participants>
93 <span id="event-participants-{$row.id}" class="btn-slide crm-hover-button">{ts}Participants{/ts}
94 <ul class="panel" id="panel_participants_{$row.id}">
95 {if $findParticipants.statusCounted}
96 <li>
97 <a title="Counted" class="action-item crm-hover-button" href="{crmURL p='civicrm/event/search'
98 q="reset=1&force=1&status=true&event=`$row.id`"}">{$findParticipants.statusCounted}
99 </a>
100 </li>
101 {/if}
102 {if $findParticipants.statusNotCounted}
103 <li>
104 <a title="Not Counted" class="action-item crm-hover-button"
105 href="{crmURL p='civicrm/event/search'
106 q="reset=1&force=1&status=false&event=`$row.id`"}">{$findParticipants.statusNotCounted}
107 </a>
108 </li>
109 {/if}
110 {if $row.participant_listing_id}
111 <li>
112 <a title="Public Participant Listing" class="action-item crm-hover-button"
113 href="{crmURL p='civicrm/event/participant' q="reset=1&id=`$row.id`"
114 fe='true'}">{ts}Public Participant Listing{/ts}
115 </a>
116 </li>
117 {/if}
118 </ul>
119 </span>
120 </div>
121 <div class="crm-event-links">
122 {$row.eventlinks|replace:'xx':$row.id}
123 </div>
124 <div class="crm-event-more">
125 {$row.action|replace:'xx':$row.id}
126 </div>
127 </td>
128 <td class="crm-event-start_date hiddenElement">{$row.start_date|crmDate}</td>
129 <td class="crm-event-end_date hiddenElement">{$row.end_date|crmDate}</td>
130 </tr>
131 {/if}
132 {/foreach}
133 </table>
134 {include file="CRM/common/pager.tpl" location="bottom"}
135 {/strip}
136 </div>
137 {else}
138 {if $isSearch eq 1}
139 <div class="status messages">
140 {icon icon="fa-info-circle"}{/icon}
141 {capture assign=browseURL}{crmURL p='civicrm/event/manage' q="reset=1"}{/capture}
142 {ts}No available Events match your search criteria. Suggestions:{/ts}
143 <div class="spacer"></div>
144 <ul>
145 <li>{ts}Check your spelling.{/ts}</li>
146 <li>{ts}Try "Search All or by Date Range".{/ts}</li>
147 <li>{ts}Try a different spelling or use fewer letters.{/ts}</li>
148 <li>{ts}Make sure you have enough privileges in the access control system.{/ts}</li>
149 </ul>
150 {ts 1=$browseURL}Or you can <a href='%1'>browse all available Current Events</a>.{/ts}
151 </div>
152 {else}
153 <div class="messages status no-popup">
154 {icon icon="fa-info-circle"}{/icon}
155 {ts 1=$newEventURL}There are no events scheduled for the date range. You can <a href='%1'>add one</a>.{/ts}
156 </div>
157 {/if}
158 {/if}
159 </div>