CRM-16415 smarty crmButton uses and many instances of close
[civicrm-core.git] / templates / CRM / ACL / Page / ACL.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
27 {if $action eq 1 or $action eq 2 or $action eq 8}
28 {include file="CRM/ACL/Form/ACL.tpl"}
29
30 {else}
31 <div class="crm-block crm-content-block">
32 {include file="CRM/ACL/Header.tpl" step=3}
33
34 {if $rows}
35 <div id="ltype">
36 {strip}
37 {* handle enable/disable actions*}
38 {include file="CRM/common/enableDisableApi.tpl"}
39 {include file="CRM/common/jsortable.tpl"}
40 <table id="options" class="display">
41 <thead>
42 <tr class="columnheader">
43 <th id="sortable">{ts}Role{/ts}</th>
44 <th>{ts}Operation{/ts}</th>
45 <th>{ts}Type of Data{/ts}</th>
46 <th>{ts}Which Data{/ts}</th>
47 <th>{ts}Description{/ts}</th>
48 <th>{ts}Enabled?{/ts}</th>
49 <th></th>
50 </tr>
51 </thead>
52 <tbody>
53 {foreach from=$rows item=row key=aclID}
54 <tr id="acl-{$aclID}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl crm-entity {if NOT $row.is_active} disabled{/if}">
55 <td class="crm-acl-entity">{$row.entity}</td>
56 <td class="crm-acl-operation" >{$row.operation}</td>
57 <td class="crm-acl-object_name">{$row.object_name}</td>
58 <td class="crm-acl-object" >{$row.object}</td>
59 <td class="crm-acl-name crm-editable" data-field="name">{$row.name}</td>
60 <td class="crm-acl-is_active" id="row_{$aclID}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
61 <td>{$row.action|replace:'xx':$aclID}</td>
62 </tr>
63 {/foreach}
64 </tbody>
65 </table>
66 {/strip}
67
68 {if $action ne 1 and $action ne 2}
69 <div class="action-link">
70 {crmButton q="action=add&reset=1" id="newACL" icon="plus-circle"}{ts}Add ACL{/ts}{/crmButton}
71 </div>
72 {/if}
73 </div>
74 {else}
75 <div class="messages status no-popup">
76 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
77 {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
78 {ts 1=$crmURL}There are no ACLs entered. You can <a href='%1'>add one</a>.{/ts}
79 </div>
80 {/if}
81 </div>
82 {/if}