| 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=aclURL}{crmURL p='civicrm/acl' 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 | <div id="help" class="crm-block"> |
| 31 | <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), and a <strong>Role</strong> that has permission to do this operation. Refer to the %1 for more info.{/ts}</p> |
| 32 | <p>{ts 1=$aclURL 2=$rolesURL}An ACL Role represents a collection ACL’s (permissions). You can assign roles to groups of CiviCRM contacts who are users of your site below. You can add or modify ACLs <a href='%1'>here</a>. You can create additional ACL Roles <a href='%2'>here</a>.{/ts}</p> |
| 33 | </div> |
| 34 | |
| 35 | {if $action eq 1 or $action eq 2 or $action eq 8} |
| 36 | {include file="CRM/ACL/Form/EntityRole.tpl"} |
| 37 | {/if} |
| 38 | |
| 39 | <div class="crm-block crm-content-block"> |
| 40 | {if $rows} |
| 41 | <div id="ltype"> |
| 42 | {strip} |
| 43 | {* handle enable/disable actions*} |
| 44 | {include file="CRM/common/enableDisableApi.tpl"} |
| 45 | {include file="CRM/common/jsortable.tpl"} |
| 46 | <table id="options" class="display"> |
| 47 | <thead> |
| 48 | <tr class="columnheader"> |
| 49 | <th id="sortable">{ts}ACL Role{/ts}</th> |
| 50 | <th>{ts}Assigned to{/ts}</th> |
| 51 | <th>{ts}Enabled?{/ts}</th> |
| 52 | <th></th> |
| 53 | </tr> |
| 54 | </thead> |
| 55 | <tbody> |
| 56 | {foreach from=$rows item=row} |
| 57 | <tr id="acl_role-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl_entity_role crm-entity {if NOT $row.is_active} disabled{/if}"> |
| 58 | <td class="crm-acl_entity_role-acl_role">{$row.acl_role}</td> |
| 59 | <td class="crm-acl_entity_role-entity">{$row.entity}</td> |
| 60 | <td class="crm-acl_entity_role-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
| 61 | <td>{$row.action|replace:'xx':$row.id}</td> |
| 62 | </tr> |
| 63 | {/foreach} |
| 64 | </tbody> |
| 65 | </table> |
| 66 | {/strip} |
| 67 | |
| 68 | {if $action ne 1 and $action ne 2} |
| 69 | <div class="crm-submit-buttons"> |
| 70 | {crmButton q="action=add&reset=1" id="newACL" icon="circle-plus"}{ts}Add Role Assignment{/ts}{/crmButton} |
| 71 | </div> |
| 72 | {/if} |
| 73 | </div> |
| 74 | {elseif $action ne 1 and $action ne 2 and $action ne 8} |
| 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 Role Assignments. You can <a href='%1'>add one</a> now.{/ts} |
| 79 | </div> |
| 80 | {/if} |
| 81 | </div> |