First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,161 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing ACL *}
<div class="crm-block crm-form-block crm-acl-form-block">
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>&nbsp;
{ts}WARNING: Delete will remove this permission from the specified ACL Role.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-acl-form-block-name">
<td class="label">{$form.name.label}</td>
<td>{$form.name.html}<br />
<span class="description">{ts}Enter a descriptive name for this permission (e.g. 'Edit Advisory Board Contacts').{/ts}</span>
</td>
</tr>
<tr class="crm-acl-form-block-entity_id">
<td class="label">{$form.entity_id.label}</td>
<td>{$form.entity_id.html}<br />
<span class="description">{ts}Select a Role to assign (grant) this permission to. Select the special role 'Everyone' if you want to grant this permission to ALL users. 'Everyone' includes anonymous (i.e. not logged in) users. Select the special role 'Authenticated' if you want to grant it to any logged in user.{/ts}</span>
</td>
</tr>
<tr class="crm-acl-form-block-operation">
<td class="label">{$form.operation.label}</td>
<td>{$form.operation.html}<br />
<span class="description">{ts}What type of operation (action) is being permitted?{/ts}</span>
</td>
</tr>
<tr class="crm-acl-form-block-object_type">
<td class="label">{$form.object_type.label}</td>
<td>{$form.object_type.html}</td>
</tr>
<tr class="crm-acl-form-block-description">
<td class="{$form.object_type.name}">&nbsp;</dt><td class="description">{ts}Select the type of data this ACL operates on.{/ts}<br />
{if $config->userSystem->is_drupal EQ '1'}
<div class="status description">{ts}IMPORTANT: The Drupal permissions for 'access all custom data' and 'profile listings and forms' override and disable specific ACL settings for custom field groups and profiles respectively. Do not enable those Drupal permissions for a Drupal role if you want to use CiviCRM ACL's to control access.{/ts}</div></td>
{/if}
</tr>
</table>
<div id="id-group-acl">
<table class="form-layout-compressed">
<tr class="crm-acl-form-block-group_id">
<td class="label">{$form.group_id.label}</td>
<td>{$form.group_id.html}<br />
<span class="description">{ts}Select a specific group of contacts, OR apply this permission to ALL groups.{/ts}</span>
</td>
</tr>
</table>
</div>
<div id="id-profile-acl">
<table class="form-layout-compressed" >
<tr class="crm-acl-form-block-uf_group_id">
<td class="label">{$form.uf_group_id.label}</td>
<td>{$form.uf_group_id.html}<br />
<span class="description">{ts}Select a specific profile, OR apply this permission to ALL profiles.{/ts}</span>
</td>
</tr>
</table>
<div class="status message">{ts}NOTE: Profile ACL operations affect which modes a profile can be used in (i.e. Create a new contact, Edit your own contact record, View a contact record, etc.). The Create operation is required for profiles embedded in online contribution or event registration forms. None of the operations for Profile ACLs grant access to administration of profiles.{/ts}</div>
</div>
<div id="id-custom-acl">
<table class="form-layout-compressed">
<tr class="crm-acl-form-block-custom_group_id">
<td class="label">{$form.custom_group_id.label}</td>
<td>{$form.custom_group_id.html}<br />
<span class="description">{ts}Select a specific group of custom fields, OR apply this permission to ALL custom fields.{/ts}</span>
</td>
</tr>
</table>
<div class="status message">{ts}NOTE: For Custom Data ACLs, the 'View' and 'Edit' operations currently do the same thing. Either option grants the right to view AND / OR edit custom data fields (in all groups, or in a specific custom data group). Neither option grants access to administration of custom data fields.{/ts}</div>
</div>
<div id="id-event-acl">
<table class="form-layout-compressed">
<tr class="crm-acl-form-block-event_id">
<td class="label">{$form.event_id.label}</td>
<td>{$form.event_id.html}<br />
<span class="description">{ts}Select an event, OR apply this permission to ALL events.{/ts}</span>
</td>
</tr>
</table>
<div class="status message">{ts}NOTE: For Event ACLs, the 'View' operation allows access to the event information screen. "Edit" allows users to register for the event if online registration is enabled.{/ts}<br />
{if $config->userSystem->is_drupal EQ '1'}
{ts}Please remember that Drupal's "register for events" permission overrides CiviCRM's control over event information access.{/ts}
{/if}
</div>
</div>
<table class="form-layout-compressed">
<tr class="crm-acl-form-block-is_active">
<td class="label">{$form.is_active.label}</td>
<td>{$form.is_active.html}</td>
</tr>
</table>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
{include file="CRM/common/showHide.tpl"}
{literal}
<script type="text/javascript">
showObjectSelect( );
function showObjectSelect( ) {
var ot = document.getElementsByName('object_type');
for (var i = 0; i < ot.length; i++) {
if ( ot[i].checked ) {
switch(ot[i].value) {
case "1":
cj('#id-group-acl').show();
cj('#id-profile-acl').hide();
cj('#id-custom-acl').hide();
cj('#id-event-acl').hide();
break;
case "2":
cj('#id-group-acl').hide();
cj('#id-profile-acl').show();
cj('#id-custom-acl').hide();
cj('#id-event-acl').hide();
break;
case "3":
cj('#id-group-acl').hide();
cj('#id-profile-acl').hide();
cj('#id-custom-acl').show();
cj('#id-event-acl').hide();
break;
case "4":
cj('#id-group-acl').hide();
cj('#id-profile-acl').hide();
cj('#id-custom-acl').hide();
cj('#id-event-acl').show();
break;
}
}
}
return;
}
</script>
{/literal}

View file

@ -0,0 +1,60 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing ACL *}
<div class="form-item">
<fieldset><legend>{if $action eq 1}{ts}New ACL{/ts}{elseif $action eq 2}{ts}Edit ACL{/ts}{else}{ts}Delete ACL{/ts}{/if}</legend>
{if $action eq 8}
<div class="messages status no-popup">
<dl>
<dt><div class="icon inform-icon"></div></dt>
<dd>
{ts}WARNING: Delete will remove this permission from the specified ACL Role.{/ts} {ts}Do you want to continue?{/ts}
</dd>
</dl>
</div>
{else}
<dl>
<dt>{$form.entity_id.label}</dt><dd>{$form.entity_id.html}</dd>
<dt>&nbsp;</dt><dd class="description">{ts}Select a Role to assign (grant) this permission to. Select the special role 'Everyone' if you want to grant this permission to ALL users. 'Anyone' includes anonymous (i.e. not logged in) users.{/ts}</dd>
</dl>
<dl>
<dt>{$form.object_table.label}</dt>
<dd>
<table>
<tr><td>
{$form.object_table.html}
</td></tr>
</table>
</dd>
</dl>
{/if}
<dl>
<dt></dt><dd>{$form.buttons.html}</dd>
</dl>
</fieldset>
</div>

View file

@ -0,0 +1,56 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing ACL EntityRole objects *}
<div class="crm-block crm-form-block crm-acl-entityrole-form-block">
<fieldset><legend>{if $action eq 1}{ts}Assign ACL Role{/ts}{elseif $action eq 2}{ts}Assign ACL Role{/ts}{else}{ts}Delete ACL Role Assignment{/ts}{/if}</legend>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}WARNING: Deleting this option will remove this ACL Role Assignment.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
<table class="form-layout-compressed">
<tr class="crm-acl-entityrole-form-block-acl_role_id">
<td class="label">{$form.acl_role_id.label}</td>
<td>{$form.acl_role_id.html}<br />
<span class="description">{ts}Select an ACL Role to assign.{/ts}</span>
</td>
</tr>
<tr class="crm-acl-entityrole-form-block-entity_id">
<td class="label">{$form.entity_id.label}</td>
<td>{$form.entity_id.html}<br />
<span class="description">{ts}Select a group of contacts who should have this role when logged in to your site. Groups must be assigned the 'Access Control' type (Contacts &raquo; Manage Groups &raquo; Settings) to be included in this list.{/ts}</span>
</td>
<tr class="crm-acl-entityrole-form-block-is_active">
<td class="label">{$form.is_active.label}</td>
<td>{$form.is_active.html}</td>
</tr>
</table>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="botttom"}</div>
</fieldset>
</div>

View file

@ -0,0 +1,74 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing Wordpress Access Control *}
<div class="help">
<p>{ts}Use this form to Grant access to CiviCRM components and other CiviCRM permissions to WordPress roles.{/ts}<br /><br />
{ts}<strong>NOTE: Super Admin</strong> and <strong>Administrator</strong> roles will have all permissions in CiviCRM.{/ts}
</p>
</div>
<div class="crm-block crm-form-block crm-export-form-block">
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table>
<tr>
{assign var="i" value=1}
{foreach from=$roles key=role_name item=role_value }
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="label">&nbsp;</td>
<td align="center"><b>{$role_value}</b><br /></td>
</tr>
{assign var="j" value=0}
{foreach from=$rolePerms.$role_name key=name item=value }
{if $j mod 2 eq 1}
<tr style="background-color: #E6E6DC;">
{else}
<tr style="background-color: #FFFFFF;">
{/if}
<td style="height:3em;">
{if $i eq 1}
{$form.$role_name.$name.label}
{if $permDesc.$name}
<br/><span class="description">{$permDesc.$name}</span>
{/if}
{/if}
</td>
<td align="center">{$form.$role_name.$name.html}<br /></td>
</tr>
{assign var="j" value=$j+1}
{/foreach}
</table>
</td>
{assign var="i" value=$i+1}
{/foreach}
</tr>
</table>
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
</div>

View file

@ -0,0 +1,61 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{capture assign=docLink}{docURL page='user/initial-set-up/permissions-and-access-control/' text='Access Control Documentation'}{/capture}
<div class="help">
<p>{ts 1=$docLink}ACLs allow you to 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>
</div>
{php}
$currentStep = $this->get_template_vars('step');
$wizard = array(
'style' => array(),
'currentStepNumber' => $currentStep,
'steps' => array(
array(
'title' => ts('Manage Roles'),
'link' => CRM_Utils_System::url('civicrm/admin/options/acl_role', 'reset=1'),
),
array(
'title' => ts('Assign Users'),
'link' => CRM_Utils_System::url('civicrm/acl/entityrole', 'reset=1'),
),
array(
'title' => ts('Manage ACLs'),
'link' => CRM_Utils_System::url('civicrm/acl', 'reset=1'),
),
),
);
foreach ($wizard['steps'] as $num => &$step) {
$step['step'] = $step['valid'] = $step['stepNumber'] = $num + 1;
if ($step['stepNumber'] == $currentStep) {
$step['link'] = NULL;
}
}
$this->assign('wizard', $wizard);
{/php}
{include file="CRM/common/WizardHeader.tpl"}

View file

@ -0,0 +1,82 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{if $action eq 1 or $action eq 2 or $action eq 8}
{include file="CRM/ACL/Form/ACL.tpl"}
{else}
<div class="crm-block crm-content-block">
{include file="CRM/ACL/Header.tpl" step=3}
{if $rows}
<div id="ltype">
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
{include file="CRM/common/jsortable.tpl"}
<table id="options" class="display">
<thead>
<tr class="columnheader">
<th id="sortable">{ts}Role{/ts}</th>
<th>{ts}Operation{/ts}</th>
<th>{ts}Type of Data{/ts}</th>
<th>{ts}Which Data{/ts}</th>
<th>{ts}Description{/ts}</th>
<th>{ts}Enabled?{/ts}</th>
<th></th>
</tr>
</thead>
<tbody>
{foreach from=$rows item=row key=aclID}
<tr id="acl-{$aclID}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl crm-entity {if NOT $row.is_active} disabled{/if}">
<td class="crm-acl-entity">{$row.entity}</td>
<td class="crm-acl-operation" >{$row.operation}</td>
<td class="crm-acl-object_name">{$row.object_name}</td>
<td class="crm-acl-object" >{$row.object}</td>
<td class="crm-acl-name crm-editable" data-field="name">{$row.name}</td>
<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>
<td>{$row.action|replace:'xx':$aclID}</td>
</tr>
{/foreach}
</tbody>
</table>
{/strip}
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton q="action=add&reset=1" id="newACL" icon="plus-circle"}{ts}Add ACL{/ts}{/crmButton}
</div>
{/if}
</div>
{else}
<div class="messages status no-popup">
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
{capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
{ts 1=$crmURL}There are no ACLs entered. You can <a href='%1'>add one</a>.{/ts}
</div>
{/if}
</div>
{/if}

View file

@ -0,0 +1,72 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/ACL/Header.tpl" step=3}
{if $action eq 1 or $action eq 2 or $action eq 8}
<div class="crm-block crm-form-block">
{include file="CRM/ACL/Form/ACLBasic.tpl"}
</div>
{/if}
<div class="crm-block crm-content-block">
{if $rows}
<div id="ltype">
<p></p>
<div class="form-item">
{strip}
<table>
<tr class="columnheader">
<th>{ts}Role{/ts}</th>
<th>{ts}ACL Type(s){/ts}</th>
<th></th>
</tr>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.entity}</td>
<td>{$row.object_table}</td>
<td>{$row.action}</td>
</tr>
{/foreach}
</table>
{/strip}
{if $action ne 1 and $action ne 2}
<div class="action-link">
<a href="{crmURL q="action=add&reset=1"}" id="newACL"><i class="crm-i fa-plus-circle"></i> {ts}Add ACL{/ts}</a>
</div>
{/if}
</div>
</div>
{elseif $action ne 1 and $action ne 2 and $action ne 8}
<div class="messages status no-popup">
<dl>
<dt><img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/></dt>
{capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
<dd>{ts 1=$crmURL}There are no ACLs entered. You can <a href='%1'>add one</a>.{/ts}</dd>
</dl>
</div>
{/if}
</div>

View file

@ -0,0 +1,74 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{include file="CRM/ACL/Header.tpl" step=2}
{if $action eq 1 or $action eq 2 or $action eq 8}
{include file="CRM/ACL/Form/EntityRole.tpl"}
{/if}
<div class="crm-block crm-content-block">
{if $rows}
<div id="ltype">
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
{include file="CRM/common/jsortable.tpl"}
<table id="options" class="display">
<thead>
<tr class="columnheader">
<th id="sortable">{ts}ACL Role{/ts}</th>
<th>{ts}Assigned to{/ts}</th>
<th>{ts}Enabled?{/ts}</th>
<th></th>
</tr>
</thead>
<tbody>
{foreach from=$rows item=row}
<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}">
<td class="crm-acl_entity_role-acl_role">{$row.acl_role}</td>
<td class="crm-acl_entity_role-entity">{$row.entity}</td>
<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>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
</tbody>
</table>
{/strip}
{if $action ne 1 and $action ne 2}
<div class="crm-submit-buttons">
{crmButton q="action=add&reset=1" id="newACL" icon="plus-circle"}{ts}Add Role Assignment{/ts}{/crmButton}
</div>
{/if}
</div>
{elseif $action ne 1 and $action ne 2 and $action ne 8}
<div class="messages status no-popup">
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
{capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
{ts 1=$crmURL}There are no Role Assignments. You can <a href='%1'>add one</a> now.{/ts}
</div>
{/if}
</div>