Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Contact / Form / Task.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 {ts 1=$totalSelectedContacts}Number of selected contacts: %1{/ts}
27
28 {if $searchtype eq 'ts_sel'}
29 <div id="popupContainer">
30 <table id="selectedRecords-{$group.id}" class="display crm-copy-fields crm-sortable">
31 <thead>
32 <tr class="columnheader">
33 <th class="contact_details">{ts}Name{/ts}</th>
34 </tr>
35 </thead>
36
37 <tbody>
38 {foreach from=$value item='row'}
39 <tr class="{cycle values="odd-row,even-row"}">
40 <td class="name">{$row}</td>
41 </tr>
42 {/foreach}
43 </tbody>
44 </table>
45
46 </div><br />
47 <a href="#" id="popup-button" title="{ts}View Selected Contacts{/ts}">{ts}View Selected Contacts{/ts}</a>
48 {/if}
49
50 {if $searchtype eq 'ts_sel'}
51 {literal}
52 <script type="text/javascript">
53 CRM.$(function($) {
54 $("#popupContainer").css({
55 "background-color":"#E0E0E0",
56 'display':'none'
57 });
58
59 $("#popup-button").click(function() {
60 $("#popupContainer").dialog({
61 title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal},
62 width:700,
63 height:500,
64 modal: true,
65 overlay: {
66 opacity: 0.5,
67 background: "black"
68 }
69 });
70 return false;
71 });
72
73 var count = 0; var columns = ''; var sortColumn = '';
74 $('#selectedRecords-{/literal}{$group.id}{literal} th').each(function() {
75 if ($(this).attr('class') == 'contact_details') {
76 sortColumn += '[' + count + ', "asc" ],';
77 columns += '{"sClass": "contact_details"},';
78 }
79 else {
80 columns += '{ "bSortable": false },';
81 }
82 count++;
83 });
84
85 });
86
87 </script>
88 {/literal}
89 {/if}
90
91 {if $rows}
92 <div class="form-item">
93 <table width="30%">
94 <tr class="columnheader">
95 <th>{ts}Name{/ts}</th>
96 </tr>
97 {foreach from=$rows item=row}
98 <tr class="{cycle values="odd-row,even-row"}">
99 <td>{$row.displayName}</td>
100 </tr>
101 {/foreach}
102 </table>
103 </div>
104 {/if}