CRM-12595 fix formatting in templates files (P)
[civicrm-core.git] / templates / CRM / Profile / Page / MultipleRecordFieldsListing.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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<h1>{ts}{$customGroupTitle}{/ts}</h1>
28
29 {if $records and $headers}
30 {include file="CRM/common/jsortable.tpl"}
152ff8b9 31
6a488035
TO
32 <div id="browseValues">
33 <div>
34 {strip}
35 <table id="records" class="display">
152ff8b9 36 <thead>
6a488035
TO
37 <tr>
38 {foreach from=$headers key=recId item=head}
39 <th>{ts}{$head}{/ts}</th>
40 {/foreach}
41 <th></th>
42 </tr>
43 </thead>
152ff8b9 44 {foreach from=$records key=recId item=rows}
45 <tr class="{cycle values="odd-row,even-row"}">
6a488035
TO
46 {foreach from=$rows item=row}
47 {foreach from=$row item=val key=ids}
48 <td>{$val}</td>
49 {/foreach}
50 {/foreach}
51 </tr>
52 {/foreach}
53 </table>
54 {/strip}
55 </div>
56 </div>
57<div id='profile-dialog' class="hiddenElement"></div>
58{literal}
59<script type='text/javascript'>
60cj(function() {
61
62function formDialog(dataURL, dialogTitle){
63 cj.ajax({
64 url: dataURL,
65 success: function( content ) {
152ff8b9 66 cj('#profile-dialog').show( ).html( content ).dialog({
6a488035
TO
67 title: dialogTitle,
68 modal: true,
69 width: 680,
70 overlay: {
71 opacity: 0.5,
72 background: "black"
73 },
152ff8b9 74
6a488035 75 close: function(event, ui) {
152ff8b9 76 cj('#profile-dialog').html('');
6a488035
TO
77 }
78 });
152ff8b9 79 cj('.action-link').hide();
6a488035 80 cj('#profile-dialog #crm-profile-block .edit-value label').css('display', 'inline');
152ff8b9 81 }});
6a488035
TO
82}
83
84cj('.action-item').each(function(){
85 cj(this).attr('jshref', cj(this).attr('href'));
86 cj(this).attr('href', '#browseValues');
87});
88
89 cj(".action-item").click(function(){
90 dataURL = cj(this).attr('jshref');
152ff8b9 91 dialogTitle = cj(this).attr('title');
6a488035
TO
92 formDialog(dataURL, dialogTitle);
93 });
94});
95</script>
96{/literal}
97{elseif !$records}
98<div class="messages status no-popup">
99 <div class="icon inform-icon"></div>&nbsp;
100 {ts}No multi-record entries found. Note: check is Include in multi-record listing property of the fields you want to display in listings{/ts}
101 </div>
102{/if}
103
104{if !$reachedMax}
105<a accesskey="N" href="{crmURL p='civicrm/profile/edit' q="id=`$contactId`&multiRecord=add&gid=`$gid`"}" class="button"><span><div class="icon add-icon"></div>{ts}Add New Record{/ts}</span></a>
106{/if}
107{/if}