Merge pull request #14878 from civicrm/5.16
[civicrm-core.git] / templates / CRM / Event / Page / UserDashboard.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 {crmRegion name="crm-event-userdashboard-pre"}
27 {/crmRegion}
28 <div class="view-content">
29 {if $event_rows}
30 {strip}
31 <div class="description">
32 {ts}Click on the event name for more information.{/ts}
33 </div>
34 <table class="selector">
35 <tr class="columnheader">
36 <th>{ts}Event{/ts}</th>
37 <th>{ts}Event Date(s){/ts}</th>
38 <th>{ts}Status{/ts}</th>
39 <th></th>
40 </tr>
41 {counter start=0 skip=1 print=false}
42 {foreach from=$event_rows item=row}
43 <tr id='rowid{$row.participant_id}' class=" crm-event-participant-id_{$row.participant_id} {cycle values="odd-row,even-row"}{if $row.status eq 'Cancelled'} disabled{/if}">
44 <td class="crm-participant-event-id_{$row.event_id}"><a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$row.event_id`&context=dashboard"}">{$row.event_title}</a></td>
45 <td class="crm-participant-event_start_date">
46 {$row.event_start_date|crmDate}
47 {if $row.event_end_date}
48 &nbsp; - &nbsp;
49 {* Only show end time if end date = start date *}
50 {if $row.event_end_date|date_format:"%Y%m%d" == $row.event_start_date|date_format:"%Y%m%d"}
51 {$row.event_end_date|crmDate:0:1}
52 {else}
53 {$row.event_end_date|crmDate}
54 {/if}
55 {/if}
56 </td>
57 <td class="crm-participant-participant_status">{$row.participant_status}</td>
58 <td class="crm-participant-showConfirmUrl">
59 {if $row.showConfirmUrl}
60 <a href="{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$row.participant_id`"}">{ts}Confirm Registration{/ts}</a>
61 {/if}
62 </td>
63 </tr>
64 {/foreach}
65 </table>
66 {/strip}
67 {else}
68 <div class="messages status no-popup">
69 <div class="icon inform-icon"></div>&nbsp;
70 {ts}You are not registered for any current or upcoming Events.{/ts}
71
72 </div>
73 {/if}
74 </div>
75 {crmRegion name="crm-event-userdashboard-post"}
76 {/crmRegion}