From dd3845313d4dc8a893afd3984302402de3c775e2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 20 Dec 2013 16:20:02 -0800 Subject: [PATCH] CRM-14015 - Cleanup ACL template --- CRM/ACL/Page/ACL.php | 6 ++- templates/CRM/ACL/Page/ACL.tpl | 97 +++++++++++++++++----------------- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/CRM/ACL/Page/ACL.php b/CRM/ACL/Page/ACL.php index 9ac0c75ac7..1806602679 100644 --- a/CRM/ACL/Page/ACL.php +++ b/CRM/ACL/Page/ACL.php @@ -139,9 +139,11 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic { } } - // finally browse the acl's - $this->browse(); + if ($action & CRM_Core_Action::BROWSE) { + CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); + $this->browse(); + } // parent run return parent::run(); diff --git a/templates/CRM/ACL/Page/ACL.tpl b/templates/CRM/ACL/Page/ACL.tpl index bb74767aec..18cfbc587e 100644 --- a/templates/CRM/ACL/Page/ACL.tpl +++ b/templates/CRM/ACL/Page/ACL.tpl @@ -29,61 +29,62 @@ {if $action eq 1 or $action eq 2 or $action eq 8} - {include file="CRM/ACL/Form/ACL.tpl"} -{/if} + {include file="CRM/ACL/Form/ACL.tpl"} -
-
-

{ts 1=$docLink}ACLs allow you control access to CiviCRM data. An ACL consists of an Operation (e.g. 'View' or 'Edit'), a set of data that the operation can be performed on (e.g. a group of contacts, a profile or a set of custom fields), and a Role that has permission to do this operation. Refer to the %1 for more info.{/ts}

-

{ts 1=$erURL 2=$rolesURL}You can add or modify your ACLs below. You can create additional ACL Roles here... and you can assign Roles to CiviCRM contacts who are users of your site here.{/ts}

-
+{else} +
+
+

{ts 1=$docLink}ACLs allow you control access to CiviCRM data. An ACL consists of an Operation (e.g. 'View' or 'Edit'), a set of data that the operation can be performed on (e.g. a group of contacts, a profile or a set of custom fields), and a Role that has permission to do this operation. Refer to the %1 for more info.{/ts}

+

{ts 1=$erURL 2=$rolesURL}You can add or modify your ACLs below. You can create additional ACL Roles here... and you can assign Roles to CiviCRM contacts who are users of your site here.{/ts}

+
-{if $rows} -
- {strip} - {* handle enable/disable actions*} - {include file="CRM/common/enableDisableApi.tpl"} - {include file="CRM/common/jsortable.tpl"} - - - - - - - - - - - - - - {foreach from=$rows item=row key=aclID} - - - - - - - - - - {/foreach} - -
{ts}Role{/ts}{ts}Operation{/ts}{ts}Type of Data{/ts}{ts}Which Data{/ts}{ts}Description{/ts}{ts}Enabled?{/ts}
{$row.entity}{$row.operation}{$row.object_name}{$row.object}{$row.name}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.action|replace:'xx':$aclID}
+ {if $rows} +
+ {strip} + {* handle enable/disable actions*} + {include file="CRM/common/enableDisableApi.tpl"} + {include file="CRM/common/jsortable.tpl"} + + + + + + + + + + + + + + {foreach from=$rows item=row key=aclID} + + + + + + + + + + {/foreach} + +
{ts}Role{/ts}{ts}Operation{/ts}{ts}Type of Data{/ts}{ts}Which Data{/ts}{ts}Description{/ts}{ts}Enabled?{/ts}
{$row.entity}{$row.operation}{$row.object_name}{$row.object}{$row.name}{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}{$row.action|replace:'xx':$aclID}
{/strip} {if $action ne 1 and $action ne 2} - + {/if} -
-{include file="CRM/common/crmeditable.tpl"} -{elseif $action ne 1 and $action ne 2 and $action ne 8} -
+
+ {include file="CRM/common/crmeditable.tpl"} + {else} +
{ts}status{/ts} {capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture} {ts 1=$crmURL}There are no ACLs entered. You can add one.{/ts} -
+
+ {/if} +
{/if} -
-- 2.25.1