Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
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 | {include file="CRM/common/pager.tpl" location="top"} | |
27 | ||
28 | {include file="CRM/common/pagerAToZ.tpl"} | |
52604b19 | 29 | <a href="#" class="crm-selection-reset crm-hover-button"><span class="icon ui-icon-close"></span> {ts}Reset all selections{/ts}</a> |
6a488035 TO |
30 | |
31 | <table summary="{ts}Search results listings.{/ts}" class="selector row-highlight"> | |
32 | <thead class="sticky"> | |
33 | <tr> | |
34 | <th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th> | |
35 | {if $context eq 'smog'} | |
36 | <th scope="col"> | |
37 | {ts}Status{/ts} | |
38 | </th> | |
39 | {/if} | |
40 | {foreach from=$columnHeaders item=header} | |
41 | <th scope="col"> | |
42 | {if $header.sort} | |
43 | {assign var='key' value=$header.sort} | |
44 | {$sort->_response.$key.link} | |
45 | {else} | |
46 | {$header.name} | |
47 | {/if} | |
48 | </th> | |
49 | {/foreach} | |
50 | </tr> | |
51 | </thead> | |
52 | ||
53 | {counter start=0 skip=1 print=false} | |
54 | ||
55 | { if $id } | |
56 | {foreach from=$rows item=row} | |
57 | <tr id='rowid{$row.contact_id}' class="{cycle values='odd-row,even-row'}"> | |
58 | {assign var=cbName value=$row.checkbox} | |
59 | <td>{$form.$cbName.html}</td> | |
60 | {if $context eq 'smog'} | |
61 | {if $row.status eq 'Pending'}<td class="status-pending"}> | |
62 | {elseif $row.status eq 'Removed'}<td class="status-removed"> | |
63 | {else}<td>{/if} | |
64 | {$row.status}</td> | |
65 | {/if} | |
66 | <td>{$row.contact_type}</td> | |
67 | <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{$row.sort_name}</a></td> | |
68 | {foreach from=$row item=value key=key} | |
69 | {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")and ($key neq "contact_sub_type")} | |
70 | <td> | |
71 | {if $key EQ "household_income_total" } | |
72 | {$value|crmMoney} | |
73 | {elseif strpos( $key, '_date' ) !== false } | |
74 | {$value|crmDate} | |
75 | {else} | |
76 | {$value} | |
77 | {/if} | |
78 | | |
79 | </td> | |
80 | {/if} | |
81 | {/foreach} | |
82 | <td>{$row.action|replace:'xx':$row.contact_id}</td> | |
83 | </tr> | |
84 | {/foreach} | |
85 | {else} | |
86 | {foreach from=$rows item=row} | |
87 | <tr id="rowid{$row.contact_id}" class="{cycle values='odd-row,even-row'}"> | |
88 | {assign var=cbName value=$row.checkbox} | |
89 | <td>{$form.$cbName.html}</td> | |
90 | {if $context eq 'smog'} | |
91 | {if $row.status eq 'Pending'}<td class="status-pending"}> | |
92 | {elseif $row.status eq 'Removed'}<td class="status-removed"> | |
93 | {else}<td>{/if} | |
94 | {$row.status}</td> | |
95 | {/if} | |
96 | <td>{$row.contact_type}</td> | |
97 | <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> | |
98 | {if $action eq 512 or $action eq 256} | |
99 | {if !empty($columnHeaders.street_address)} | |
100 | <td><span title="{$row.street_address}">{$row.street_address|mb_truncate:22:"...":true}{if $row.do_not_mail} <span class="icon privacy-flag do-not-mail"></span>{/if}</span></td> | |
101 | {/if} | |
102 | {if !empty($columnHeaders.city)} | |
103 | <td>{$row.city}</td> | |
104 | {/if} | |
105 | {if !empty($columnHeaders.state_province)} | |
106 | <td>{$row.state_province}</td> | |
107 | {/if} | |
108 | {if !empty($columnHeaders.postal_code)} | |
109 | <td>{$row.postal_code}</td> | |
110 | {/if} | |
111 | {if !empty($columnHeaders.country)} | |
112 | <td>{$row.country}</td> | |
113 | {/if} | |
114 | <td> | |
115 | {if $row.email} | |
116 | <span title="{$row.email}"> | |
117 | {$row.email|mb_truncate:17:"...":true} | |
118 | {if $row.on_hold} | |
119 | (On Hold)<span class="status-hold" title="{ts}This email is on hold (probably due to bouncing).{/ts}"></span> | |
120 | {elseif $row.do_not_email} | |
121 | <span class="icon privacy-flag do-not-email" title="{ts}Do Not Email{/ts}"></span> | |
122 | {/if} | |
123 | </span> | |
124 | {/if} | |
125 | </td> | |
126 | <td> | |
127 | {if $row.phone} | |
128 | {$row.phone} | |
129 | {if $row.do_not_phone} | |
130 | <span class="icon privacy-flag do-not-phone" title="{ts}Do Not Phone{/ts}" ></span> | |
131 | {/if} | |
132 | {/if} | |
133 | </td> | |
134 | {else} | |
135 | {foreach from=$row item=value key=key} | |
47e85575 | 136 | {if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "contact_sub_type") and ($key neq "status") and ($key neq "sort_name") and ($key neq "contact_id") and ($key neq "contact_type_orig")} |
6a488035 TO |
137 | <td>{$value} </td> |
138 | {/if} | |
139 | {/foreach} | |
140 | {/if} | |
141 | <td style='width:125px;'>{$row.action|replace:'xx':$row.contact_id}</td> | |
142 | </tr> | |
143 | {/foreach} | |
144 | {/if} | |
145 | </table> | |
146 | ||
147 | <script type="text/javascript"> | |
148 | {literal} | |
3cc60a06 | 149 | CRM.$(function($) { |
1cb61235 | 150 | // Clear any old selection that may be lingering in quickform |
a6e1e9b7 | 151 | $("input.select-row, input.select-rows", 'form.crm-search-form').prop('checked', false).closest('tr').removeClass('crm-row-selected'); |
1cb61235 | 152 | // Retrieve stored checkboxes |
6e8d1c11 | 153 | var cids = {/literal}{$selectedContactIds|@json_encode}{literal}; |
6a488035 | 154 | if (cids.length > 0) { |
1cb61235 | 155 | $('#mark_x_' + cids.join(',#mark_x_') + ',input[name=radio_ts][value=ts_sel]').prop('checked', true); |
6a488035 | 156 | } |
6a488035 | 157 | }); |
6a488035 TO |
158 | {/literal} |
159 | </script> | |
160 | {include file="CRM/common/pager.tpl" location="bottom"} |