Merge pull request #21744 from civicrm/5.42
[civicrm-core.git] / templates / CRM / Event / Form / Selector.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 {if $context EQ 'Search'}
11 {include file="CRM/common/pager.tpl" location="top"}
12 {/if}
13
14 {strip}
15 <table class="selector row-highlight">
16 <thead class="sticky">
17 <tr>
18 {if ! $single and $context eq 'Search' }
19 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
20 {/if}
21 {foreach from=$columnHeaders item=header}
22 <th scope="col">
23 {if $header.sort}
24 {assign var='key' value=$header.sort}
25 {$sort->_response.$key.link}
26 {else}
27 {$header.name}
28 {/if}
29 </th>
30 {/foreach}
31 </tr>
32 </thead>
33
34 {counter start=0 skip=1 print=false}
35 {foreach from=$rows item=row}
36 <tr id='rowid{$row.participant_id}' class="{cycle values="odd-row,even-row"} crm-event crm-event_{$row.event_id}">
37 {if ! $single }
38 {if $context eq 'Search' }
39 {assign var=cbName value=$row.checkbox}
40 <td>{$form.$cbName.html}</td>
41 {/if}
42 <td class="crm-participant-contact_type">{$row.contact_type}</td>
43 <td class="crm-participant-sort_name"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View contact record{/ts}">{$row.sort_name}</a></td>
44 {/if}
45
46 <td class="crm-participant-event_title"><a href="{crmURL p='civicrm/event/info' q="id=`$row.event_id`&reset=1"}" title="{ts}View event info page{/ts}">{$row.event_title}</a>
47 {if !empty($contactId)}<br /><a href="{crmURL p='civicrm/event/search' q="reset=1&force=1&event=`$row.event_id`"}" title="{ts}List participants for this event (all statuses){/ts}">({ts}participants{/ts})</a>{/if}
48 </td>
49 {assign var="participant_id" value=$row.participant_id}
50 {if $lineItems.$participant_id}
51 <td>
52 {foreach from=$lineItems.$participant_id item=line name=lineItemsIter}
53 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if}: {$line.qty}
54 {if ! $smarty.foreach.lineItemsIter.last}<br />{/if}
55 {/foreach}
56 </td>
57 {else}
58 <td class="crm-participant-participant_fee_level">{if !$row.paid && !$row.participant_fee_level} {ts}(no fee){/ts}{else} {$row.participant_fee_level}{/if}</td>
59 {/if}
60 <td class="right nowrap crm-participant-participant_fee_amount">{$row.participant_fee_amount|crmMoney:$row.participant_fee_currency}</td>
61 <td class="crm-participant-participant_register_date">{$row.participant_register_date|truncate:10:''|crmDate}</td>
62 <td class="crm-participant-event_start_date">{$row.event_start_date|truncate:10:''|crmDate}
63 {if $row.event_end_date && $row.event_end_date|date_format:"%Y%m%d" NEQ $row.event_start_date|date_format:"%Y%m%d"}
64 <br/>- {$row.event_end_date|truncate:10:''|crmDate}
65 {/if}
66 </td>
67 <td class="crm-participant-participant_status crm-participant_status_{$row.participant_status_id}">{$row.participant_status}</td>
68 <td class="crm-participant-participant_role">{$row.participant_role_id}</td>
69 <td>{$row.action|replace:'xx':$participant_id}</td>
70 </tr>
71 {/foreach}
72 {* Link to "View all participants" for Dashboard and Contact Summary *}
73 {if $limit and $pager->_totalItems GT $limit }
74 {if $context EQ 'event_dashboard' }
75 <tr class="even-row">
76 <td colspan="10"><a href="{crmURL p='civicrm/event/search' q='reset=1'}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}Find more event participants{/ts}...</a></td></tr>
77 </tr>
78 {elseif $context eq 'participant' }
79 <tr class="even-row">
80 <td colspan="7"><a href="{crmURL p='civicrm/contact/view' q="reset=1&force=1&selectedChild=participant&cid=$contactId"}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all events for this contact{/ts}...</a></td></tr>
81 </tr>
82 {/if}
83 {/if}
84 </table>
85 {/strip}
86
87
88
89 {if $context EQ 'Search'}
90 {include file="CRM/common/pager.tpl" location="bottom"}
91 {/if}