Add aria-hidden to extant icons
[civicrm-core.git] / templates / CRM / Contact / Form / Selector.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
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 |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
10{include file="CRM/common/pager.tpl" location="top"}
11
12{include file="CRM/common/pagerAToZ.tpl"}
13a3d214 13<a href="#" class="crm-selection-reset crm-hover-button"><i class="crm-i fa-times-circle-o" aria-hidden="true"></i> {ts}Reset all selections{/ts}</a>
6a488035
TO
14
15<table summary="{ts}Search results listings.{/ts}" class="selector row-highlight">
16 <thead class="sticky">
17 <tr>
18 <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
19 {if $context eq 'smog'}
20 <th scope="col">
21 {ts}Status{/ts}
22 </th>
23 {/if}
24 {foreach from=$columnHeaders item=header}
25 <th scope="col">
26 {if $header.sort}
27 {assign var='key' value=$header.sort}
28 {$sort->_response.$key.link}
29 {else}
30 {$header.name}
31 {/if}
32 </th>
33 {/foreach}
34 </tr>
35 </thead>
36
37 {counter start=0 skip=1 print=false}
38
39 { if $id }
40 {foreach from=$rows item=row}
41 <tr id='rowid{$row.contact_id}' class="{cycle values='odd-row,even-row'}">
42 {assign var=cbName value=$row.checkbox}
43 <td>{$form.$cbName.html}</td>
44 {if $context eq 'smog'}
45 {if $row.status eq 'Pending'}<td class="status-pending"}>
46 {elseif $row.status eq 'Removed'}<td class="status-removed">
47 {else}<td>{/if}
48 {$row.status}</td>
49 {/if}
50 <td>{$row.contact_type}</td>
51 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{$row.sort_name}</a></td>
52 {foreach from=$row item=value key=key}
e84be4df 53 {if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "contact_type_orig") and ($key neq "status") and ($key neq "sort_name") and ($key neq "contact_id")}
6a488035
TO
54 <td>
55 {if $key EQ "household_income_total" }
56 {$value|crmMoney}
57 {elseif strpos( $key, '_date' ) !== false }
58 {$value|crmDate}
59 {else}
60 {$value}
61 {/if}
62 &nbsp;
63 </td>
64 {/if}
65 {/foreach}
66 <td>{$row.action|replace:'xx':$row.contact_id}</td>
67 </tr>
68 {/foreach}
69 {else}
70 {foreach from=$rows item=row}
71 <tr id="rowid{$row.contact_id}" class="{cycle values='odd-row,even-row'}">
72 {assign var=cbName value=$row.checkbox}
73 <td>{$form.$cbName.html}</td>
74 {if $context eq 'smog'}
75 {if $row.status eq 'Pending'}<td class="status-pending"}>
76 {elseif $row.status eq 'Removed'}<td class="status-removed">
77 {else}<td>{/if}
78 {$row.status}</td>
79 {/if}
80 <td>{$row.contact_type}</td>
81 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{if $row.is_deleted}<del>{/if}{$row.sort_name}{if $row.is_deleted}</del>{/if}</a></td>
82 {if $action eq 512 or $action eq 256}
83 {if !empty($columnHeaders.street_address)}
560641fb 84 <td><span title="{$row.street_address|escape}">{$row.street_address|mb_truncate:22:"...":true}{privacyFlag field=do_not_mail condition=$row.do_not_mail}</span></td>
6a488035
TO
85 {/if}
86 {if !empty($columnHeaders.city)}
87 <td>{$row.city}</td>
88 {/if}
89 {if !empty($columnHeaders.state_province)}
90 <td>{$row.state_province}</td>
91 {/if}
92 {if !empty($columnHeaders.postal_code)}
93 <td>{$row.postal_code}</td>
94 {/if}
95 {if !empty($columnHeaders.country)}
96 <td>{$row.country}</td>
97 {/if}
98 <td>
99 {if $row.email}
6b7f7344 100 <span title="{$row.email|escape}">
6a488035 101 {$row.email|mb_truncate:17:"...":true}
560641fb
AH
102 {privacyFlag field=do_not_email condition=$row.do_not_email}
103 {privacyFlag field=on_hold condition=$row.on_hold}
6a488035
TO
104 </span>
105 {/if}
106 </td>
107 <td>
108 {if $row.phone}
109 {$row.phone}
560641fb
AH
110 {privacyFlag field=do_not_phone condition=$row.do_not_phone}
111 {privacyFlag field=do_not_sms condition=$row.do_not_sms}
6a488035
TO
112 {/if}
113 </td>
114 {else}
115 {foreach from=$row item=value key=key}
e84be4df 116 {if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "status") and ($key neq "sort_name") and ($key neq "contact_id") and ($key neq "contact_type_orig")}
6a488035
TO
117 <td>{$value}&nbsp;</td>
118 {/if}
119 {/foreach}
120 {/if}
121 <td style='width:125px;'>{$row.action|replace:'xx':$row.contact_id}</td>
122 </tr>
123 {/foreach}
124 {/if}
125</table>
126
127<script type="text/javascript">
128 {literal}
3cc60a06 129 CRM.$(function($) {
1cb61235 130 // Clear any old selection that may be lingering in quickform
a6e1e9b7 131 $("input.select-row, input.select-rows", 'form.crm-search-form').prop('checked', false).closest('tr').removeClass('crm-row-selected');
1cb61235 132 // Retrieve stored checkboxes
6e8d1c11 133 var cids = {/literal}{$selectedContactIds|@json_encode}{literal};
6a488035 134 if (cids.length > 0) {
1cb61235 135 $('#mark_x_' + cids.join(',#mark_x_') + ',input[name=radio_ts][value=ts_sel]').prop('checked', true);
6a488035 136 }
6a488035 137 });
6a488035
TO
138{/literal}
139</script>
140{include file="CRM/common/pager.tpl" location="bottom"}