Merge pull request #6493 from eileenmcnaughton/CRM-17023
[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 {capture assign=erURL}{crmURL p='civicrm/acl/entityrole' q='reset=1'}{/capture}
27 {capture assign=rolesURL}{crmURL p='civicrm/admin/options/acl_role' q='reset=1'}{/capture}
28 {capture assign=docLink}{docURL page='user/current/initial-set-up/permissions-and-access-control/' text='Access Control Documentation'}{/capture}
29
30
31 {if $action eq 1 or $action eq 2 or $action eq 8}
32 {include file="CRM/ACL/Form/ACL.tpl"}
33
34 {else}
35 <div class="crm-block crm-content-block">
36 <div id="help">
37 <p>{ts 1=$docLink}ACLs allow you control access to CiviCRM data. An ACL consists of an <strong>Operation</strong> (e.g. 'View' or 'Edit'), a <strong>set of data</strong> that the operation can be performed on (e.g. a group of contacts, a profile or a set of custom fields), and a <strong>Role</strong> that has permission to do this operation. Refer to the %1 for more info.{/ts}</p>
38 <p>{ts 1=$erURL 2=$rolesURL}You can add or modify your ACLs below. You can create additional ACL Roles <a href='%2'>here</a>... and you can assign Roles to CiviCRM contacts who are users of your site <a href='%1'>here</a>.{/ts}</p>
39 </div>
40
41 {if $rows}
42 <div id="ltype">
43 {strip}
44 {* handle enable/disable actions*}
45 {include file="CRM/common/enableDisableApi.tpl"}
46 {include file="CRM/common/jsortable.tpl"}
47 <table id="options" class="display">
48 <thead>
49 <tr class="columnheader">
50 <th id="sortable">{ts}Role{/ts}</th>
51 <th>{ts}Operation{/ts}</th>
52 <th>{ts}Type of Data{/ts}</th>
53 <th>{ts}Which Data{/ts}</th>
54 <th>{ts}Description{/ts}</th>
55 <th>{ts}Enabled?{/ts}</th>
56 <th></th>
57 </tr>
58 </thead>
59 <tbody>
60 {foreach from=$rows item=row key=aclID}
61 <tr id="acl-{$aclID}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl crm-entity {if NOT $row.is_active} disabled{/if}">
62 <td class="crm-acl-entity">{$row.entity}</td>
63 <td class="crm-acl-operation" >{$row.operation}</td>
64 <td class="crm-acl-object_name">{$row.object_name}</td>
65 <td class="crm-acl-object" >{$row.object}</td>
66 <td class="crm-acl-name crm-editable" data-field="name">{$row.name}</td>
67 <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>
68 <td>{$row.action|replace:'xx':$aclID}</td>
69 </tr>
70 {/foreach}
71 </tbody>
72 </table>
73 {/strip}
74
75 {if $action ne 1 and $action ne 2}
76 <div class="action-link">
77 {crmButton q="action=add&reset=1" id="newACL" icon="circle-plus"}{ts}Add ACL{/ts}{/crmButton}
78 </div>
79 {/if}
80 </div>
81 {else}
82 <div class="messages status no-popup">
83 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
84 {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
85 {ts 1=$crmURL}There are no ACLs entered. You can <a href='%1'>add one</a>.{/ts}
86 </div>
87 {/if}
88 </div>
89 {/if}