Merge remote-tracking branch 'upstream/4.5' into 4.5-4.6-2015-03-16-17-24-33
[civicrm-core.git] / templates / CRM / Profile / Page / MultipleRecordFieldsListing.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 {if $showListing}
27 {if $dontShowTitle neq 1}<h1>{ts}{$customGroupTitle}{/ts}</h1>{/if}
28 {if $pageViewType eq 'customDataView'}
29 {assign var='dialogId' value='custom-record-dialog'}
30 {else}
31 {assign var='dialogId' value='profile-dialog'}
32 {/if}
33 {if $records and $headers}
34 {include file="CRM/common/jsortable.tpl"}
35 <div id="custom-{$customGroupId}-table-wrapper" {if $pageViewType eq 'customDataView'}class="crm-entity" data-entity="contact" data-id="{$contactId}"{/if}>
36 <div>
37 {strip}
38 <table id="records" class="display">
39 <thead>
40 <tr>
41 {foreach from=$headers key=recId item=head}
42 <th>{ts}{$head}{/ts}</th>
43 {/foreach}
44 <th></th>
45 {foreach from=$dateFields key=fieldId item=v}
46 <th class='hiddenElement'></th>
47 {/foreach}
48 </tr>
49 </thead>
50 {foreach from=$records key=recId item=rows}
51 <tr class="{cycle values="odd-row,even-row"}">
52 {foreach from=$headers key=hrecId item=head}
53 {if $dateFieldsVals.$hrecId.$recId}
54 <td {crmAttributes a=$attributes.$hrecId.$recId}>{$rows.$hrecId|crmDate:"%b %d, %Y %l:%M %P"}</td>
55 {else}
56 <td {crmAttributes a=$attributes.$hrecId.$recId}>{$rows.$hrecId}</td>
57 {/if}
58 {/foreach}
59 <td>{$rows.action}</td>
60 {foreach from=$dateFieldsVals key=fid item=rec}
61 <td class='crm-field-{$fid}_date hiddenElement'>{$rec.$recId}</td>
62 {/foreach}
63 </tr>
64 {/foreach}
65 </table>
66 {/strip}
67 </div>
68 </div>
69 <div id='{$dialogId}' class="hiddenElement"></div>
70 {elseif !$records}
71 <div class="messages status no-popup">
72 <div class="icon inform-icon"></div>
73 &nbsp;
74 {ts 1=$customGroupTitle}No records of type '%1' found.{/ts}
75 </div>
76 <div id='{$dialogId}' class="hiddenElement"></div>
77 {/if}
78
79 {if !$reachedMax}
80 {if $pageViewType eq 'customDataView'}
81 <br/><a accesskey="N" title="{ts 1=$customGroupTitle}Add %1 Record{/ts}" href="{crmURL p='civicrm/contact/view/cd/edit' q="reset=1&type=$ctype&groupID=$customGroupId&entityID=$contactId&cgcount=$cgcount&multiRecordDisplay=single&mode=add"}"
82 class="button action-item"><span><div class="icon ui-icon-circle-plus"></div>{ts 1=$customGroupTitle}Add %1 Record{/ts}</span></a>
83 {else}
84 <a accesskey="N" href="{crmURL p='civicrm/profile/edit' q="reset=1&id=`$contactId`&multiRecord=add&gid=`$gid`&context=multiProfileDialog&onPopupClose=`$onPopupClose`"}"
85 class="button action-item"><span><div class="icon ui-icon-circle-plus"></div>{ts}Add New Record{/ts}</span></a>
86 {/if}
87 {/if}
88 {/if}