Example #1
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Assignments') => array('assignment/view'), $model->getName());
?>

<div id="userAssignments">
    <?php 
$this->beginWidget('MiniForm', array('header' => Rights::t('core', 'Assignments for :username', array(':username' => $model->getName()))));
?>
	
	
	<div class="">

		<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'hideHeader' => true, 'emptyText' => Rights::t('core', 'This user has not been assigned any items.'), 'htmlOptions' => array('class' => 'grid-view user-assignment-table mini'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getNameText()'), array('name' => 'type', 'header' => Rights::t('core', 'Type'), 'type' => 'raw', 'htmlOptions' => array('class' => 'type-column'), 'value' => '$data->getTypeText()'), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getRevokeAssignmentLink()'))));
?>

	</div>

	<div class="">

		<h3><?php 
echo Rights::t('core', 'Assign item');
?>
</h3>

		<?php 
if ($formModel !== null) {
    ?>

			<div class="form">
Example #2
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Generate items'));
?>

<div id="generator">

	<h2><?php 
echo Rights::t('core', 'Generate items');
?>
</h2>

	<p><?php 
echo Rights::t('core', 'Please select which items you wish to generate.');
?>
</p>

	<div class="form">

		<?php 
$form = $this->beginWidget('CActiveForm');
?>

			<div class="row">

				<table class="items generate-item-table" style="border:0; cellpadding:0; cellspacing:0;">

					<tbody>

						<tr class="application-heading-row">
							<th colspan="3"><?php 
Example #3
0
<?php

$this->breadcrumbs = array('Phân quyền' => Rights::getBaseUrl(), Rights::t('core', 'Assignments'));
?>

<div id="assignments">

	<h2><?php 
echo Rights::t('core', 'Assignments');
?>
</h2>

	<p>
		<?php 
echo Rights::t('core', 'Here you can view which permissions has been assigned to each user.');
?>
	</p>

	<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => "{items}\n{pager}", 'emptyText' => Rights::t('core', 'No users found.'), 'htmlOptions' => array('class' => 'grid-view assignment-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getAssignmentNameLink()'), array('name' => 'assignments', 'header' => Rights::t('core', 'Roles'), 'type' => 'raw', 'htmlOptions' => array('class' => 'role-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_ROLE)'), array('name' => 'assignments', 'header' => Rights::t('core', 'Tasks'), 'type' => 'raw', 'htmlOptions' => array('class' => 'task-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_TASK)'), array('name' => 'assignments', 'header' => Rights::t('core', 'Operations'), 'type' => 'raw', 'htmlOptions' => array('class' => 'operation-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_OPERATION)'))));
?>

</div>
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Permissions'));
?>

<div id="permissions">

	<h2><?php 
echo Rights::t('core', 'Permissions');
?>
</h2>

	<p>
		<?php 
echo Rights::t('core', 'Here you can view and manage the permissions assigned to each role.');
?>
<br />
		<?php 
echo Rights::t('core', 'Authorization items can be managed under {roleLink}, {taskLink} and {operationLink}.', array('{roleLink}' => CHtml::link(Rights::t('core', 'Roles'), array('authItem/roles')), '{taskLink}' => CHtml::link(Rights::t('core', 'Tasks'), array('authItem/tasks')), '{operationLink}' => CHtml::link(Rights::t('core', 'Operations'), array('authItem/operations'))));
?>
	</p>

	<p><?php 
echo CHtml::link(Rights::t('core', 'Generate items for controller actions'), array('authItem/generate'), array('class' => 'generator-link'));
?>
</p>

	<?php 
$this->widget('bootstrap.widgets.TbExtendedGridView', array('dataProvider' => $dataProvider, 'type' => 'hover striped bordered', 'template' => '{items}', 'emptyText' => Rights::t('core', 'No authorization items found.'), 'htmlOptions' => array('class' => 'grid-view permission-table'), 'columns' => $columns));
?>
Example #5
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Create :type', array(':type' => Rights::getAuthItemTypeName($_GET['type']))));
$this->title = '<h2>' . Rights::t('core', 'Create :type', array(':type' => Rights::getAuthItemTypeName($_GET['type']))) . '</h2>';
?>

<?php 
echo $this->renderPartial('/_menu', array('list' => array()));
?>

<?php 
$this->renderPartial('/_flash');
?>

<?php 
$this->renderPartial('_form', array('model' => $formModel));
Example #6
0
<?php $this->breadcrumbs = array(
	'Rights'=>Rights::getBaseUrl(),
	Rights::t('core', 'Create :type', array(':type'=>Rights::getAuthItemTypeName($_GET['type']))),
); ?>

<div class="createAuthItem">

	<h2 style="color:#427FED;border-bottom:2px solid #ff503f;padding: 10px 1%;width: 98%;"><?php echo Rights::t('core', 'Create :type', array(
		':type'=>Rights::getAuthItemTypeName($_GET['type']),
	)); ?></h2>

	<?php $this->renderPartial('_form', array('model'=>$formModel)); ?>

</div>
Example #7
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Tasks'));
?>

<div id="tasks">

	<h2><?php 
echo Rights::t('core', 'Tasks');
?>
</h2>

	<p>
		<?php 
echo Rights::t('core', 'A task is a permission to perform multiple operations, for example accessing a group of controller action.');
?>
<br />
		<?php 
echo Rights::t('core', 'Tasks exist below roles in the authorization hierarchy and can therefore only inherit from other tasks and/or operations.');
?>
	</p>

	<p><?php 
echo CHtml::link(Rights::t('core', 'Create a new task'), array('authItem/create', 'type' => CAuthItem::TYPE_TASK), array('class' => 'add-task-link'));
?>
</p>

	<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'emptyText' => Rights::t('core', 'No tasks found.'), 'htmlOptions' => array('class' => 'grid-view task-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getNameLink(false, true, true)'), array('name' => 'description', 'header' => Rights::t('core', 'Description'), 'type' => 'raw', 'htmlOptions' => array('class' => 'description-column')), array('name' => 'bizRule', 'header' => Rights::t('core', 'Business rule'), 'type' => 'raw', 'htmlOptions' => array('class' => 'bizrule-column'), 'visible' => Rights::module()->enableBizRule === true), array('name' => 'data', 'header' => Rights::t('core', 'Data'), 'type' => 'raw', 'htmlOptions' => array('class' => 'data-column'), 'visible' => Rights::module()->enableBizRuleData === true), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getDeleteTaskLink()'))));
?>
Example #8
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::getAuthItemTypeNamePlural($model->type) => Rights::getAuthItemRoute($model->type), $model->name);
$this->renderPartial('/_menu');
?>

<div id="updatedAuthItem">

    <h2><?php 
echo Rights::t('core', 'Update :name', array(':name' => $model->name, ':type' => Rights::getAuthItemTypeName($model->type)));
?>
</h2>

    <?php 
$this->renderPartial('_form', array('model' => $formModel));
?>

    <div class="relations span-11 last">

        <h3><?php 
echo Rights::t('core', 'Relations');
?>
</h3>

        <?php 
if ($model->name !== Rights::module()->superuserName) {
    ?>

            <div class="parents">

                <h4><?php 
Example #9
0
<?php

$this->breadcrumbs = array('Phân quyền' => Rights::getBaseUrl(), Rights::t('core', 'Operations'));
?>

<div id="operations">

	<h2><?php 
echo Rights::t('core', 'Operations');
?>
</h2>

	<p>
		<?php 
echo Rights::t('core', 'An operation is a permission to perform a single operation, for example accessing a certain controller action.');
?>
<br />
		<?php 
echo Rights::t('core', 'Operations exist below tasks in the authorization hierarchy and can therefore only inherit from other operations.');
?>
	</p>

	<p><?php 
echo CHtml::link(Rights::t('core', 'Create a new operation'), array('authItem/create', 'type' => CAuthItem::TYPE_OPERATION), array('class' => 'add-operation-link'));
?>
</p>

	<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'emptyText' => Rights::t('core', 'No operations found.'), 'htmlOptions' => array('class' => 'grid-view operation-table sortable-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getGridNameLink()'), array('name' => 'description', 'header' => Rights::t('core', 'Description'), 'type' => 'raw', 'htmlOptions' => array('class' => 'description-column')), array('name' => 'bizRule', 'header' => Rights::t('core', 'Business rule'), 'type' => 'raw', 'htmlOptions' => array('class' => 'bizrule-column'), 'visible' => Rights::module()->enableBizRule === true), array('name' => 'data', 'header' => Rights::t('core', 'Data'), 'type' => 'raw', 'htmlOptions' => array('class' => 'data-column'), 'visible' => Rights::module()->enableBizRuleData === true), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getDeleteOperationLink()'))));
?>
Example #10
0
<?php

$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::t('core', 'Tasks'));
$this->pageHeader = Rights::t('core', 'Tasks');
$this->topButtons = $this->widget('application.modules.admin.widgets.SAdminTopButtons', array('template' => array('createTask'), 'elements' => array('createTask' => array('link' => array('authItem/create', 'type' => CAuthItem::TYPE_TASK), 'title' => Rights::t('core', 'Create a new task'), 'icon' => 'plus'))));
?>

<div id="tasks">

	<?php 
$this->beginClip('sidebarHelpText');
?>
		<?php 
echo Rights::t('core', 'A task is a permission to perform multiple operations, for example accessing a group of controller action.');
?>
<br />
		<?php 
echo Rights::t('core', 'Tasks exist below roles in the authorization hierarchy and can therefore only inherit from other tasks and/or operations.');
?>
	<?php 
$this->endClip();
?>

		<?php 
$this->sidebarContent = $this->renderPartial('/_menu', null, true);
?>

	<?php 
$this->widget('ext.sgridview.SGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'emptyText' => Rights::t('core', 'No tasks found.'), 'htmlOptions' => array('class' => 'grid-view task-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getGridNameLink()'), array('name' => 'description', 'header' => Rights::t('core', 'Description'), 'type' => 'raw', 'htmlOptions' => array('class' => 'description-column')), array('name' => 'bizRule', 'header' => Rights::t('core', 'Business rule'), 'type' => 'raw', 'htmlOptions' => array('class' => 'bizrule-column'), 'visible' => Rights::module()->enableBizRule === true), array('name' => 'data', 'header' => Rights::t('core', 'Data'), 'type' => 'raw', 'htmlOptions' => array('class' => 'data-column'), 'visible' => Rights::module()->enableBizRuleData === true), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getDeleteTaskLink()'))));
?>
Example #11
0
<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::t('core', 'Действия'));
?>

<div id="operations">

	<h2><?php 
echo Rights::t('core', 'Действия');
?>
</h2>

	<p>
		<?php 
echo Rights::t('core', 'An operation is a permission to perform a single operation, for example accessing a certain controller action.');
?>
<br />
		<?php 
echo Rights::t('core', 'Operations exist below tasks in the authorization hierarchy and can therefore only inherit from other operations.');
?>
	</p>

	<p><?php 
echo CHtml::link(Rights::t('core', 'Создать правило для действия'), array('authItem/create', 'type' => CAuthItem::TYPE_OPERATION), array('class' => 'add-operation-link'));
?>
</p>

	<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'emptyText' => Rights::t('core', 'No operations found.'), 'htmlOptions' => array('class' => 'grid-view operation-table sortable-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Имя'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getGridNameLink()'), array('name' => 'description', 'header' => Rights::t('core', 'Описание'), 'type' => 'raw', 'htmlOptions' => array('class' => 'description-column')), array('name' => 'bizRule', 'header' => Rights::t('core', 'Правило'), 'type' => 'raw', 'htmlOptions' => array('class' => 'bizrule-column'), 'visible' => Rights::module()->enableBizRule === true), array('name' => 'data', 'header' => Rights::t('core', 'Data'), 'type' => 'raw', 'htmlOptions' => array('class' => 'data-column'), 'visible' => Rights::module()->enableBizRuleData === true), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getDeleteOperationLink()'))));
?>
Example #12
0
<?php

$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::t('core', 'Create :type', array(':type' => Rights::getAuthItemTypeName($_GET['type']))));
$this->pageHeader = Rights::t('core', 'Create :type', array(':type' => Rights::getAuthItemTypeName($_GET['type'])));
?>

<div class="createAuthItem">
	<?php 
$this->renderPartial('_form', array('model' => $formModel));
?>
</div>
Example #13
0
<?php

$this->breadcrumbs = array('Rights' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::t('core', 'Assignments'));
$this->pageHeader = 'Привязки';
$this->sidebarContent = $this->renderPartial('/_menu', null, true);
$this->widget('ext.sgridview.SGridView', array('dataProvider' => $dataProvider, 'template' => "{items}{summary}{pager}", 'emptyText' => Rights::t('core', 'No users found.'), 'htmlOptions' => array('class' => 'grid-view assignment-table'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getAssignmentNameLink()'), array('name' => 'assignments', 'header' => Rights::t('core', 'Roles'), 'type' => 'raw', 'htmlOptions' => array('class' => 'role-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_ROLE)'), array('name' => 'assignments', 'header' => Rights::t('core', 'Tasks'), 'type' => 'raw', 'htmlOptions' => array('class' => 'task-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_TASK)'), array('name' => 'assignments', 'header' => Rights::t('core', 'Operations'), 'type' => 'raw', 'htmlOptions' => array('class' => 'operation-column'), 'value' => '$data->getAssignmentsText(CAuthItem::TYPE_OPERATION)'))));
Example #14
0
<?php

$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::getAuthItemTypeNamePlural($model->type) => Rights::getAuthItemRoute($model->type), $model->name);
$this->pageHeader = Rights::t('core', 'Update :name', array(':name' => $model->name, ':type' => Rights::getAuthItemTypeName($model->type)));
$this->sidebarContent = $this->renderPartial('/_menu', null, true);
?>

<div id="rights" class="">
<div id="updatedAuthItem">

	<?php 
$this->renderPartial('_form', array('model' => $formModel));
?>

	<div class="relations padding-all">

		<h3><?php 
echo Rights::t('core', 'Relations');
?>
</h3>

		<?php 
if ($model->name !== Rights::module()->superuserName) {
    ?>

	<div class="form wide">
		<div class="row">
			<label><?php 
    echo Rights::t('core', 'Parents');
    ?>
</label>
Example #15
0
<?php

$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::t('core', 'Assignments') => array('assignment/view'), $model->getName());
$this->sidebarContent = $this->renderPartial('/_menu', null, true);
$this->pageHeader = Rights::t('core', 'Assignments for :username', array(':username' => $model->getName()));
?>
<div id="rights">
<div id="userAssignments" class="padding-all">

	<div class="assignments span-12 first">

		<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'template' => '{items}', 'hideHeader' => true, 'emptyText' => Rights::t('core', 'This user has not been assigned any items.'), 'htmlOptions' => array('class' => 'grid-view user-assignment-table mini'), 'columns' => array(array('name' => 'name', 'header' => Rights::t('core', 'Name'), 'type' => 'raw', 'htmlOptions' => array('class' => 'name-column'), 'value' => '$data->getNameText()'), array('name' => 'type', 'header' => Rights::t('core', 'Type'), 'type' => 'raw', 'htmlOptions' => array('class' => 'type-column'), 'value' => '$data->getTypeText()'), array('header' => '&nbsp;', 'type' => 'raw', 'htmlOptions' => array('class' => 'actions-column'), 'value' => '$data->getRevokeAssignmentLink()'))));
?>

	</div>

	<div class="add-assignment span-11 last">

		<h3><?php 
echo Rights::t('core', 'Assign item');
?>
</h3>

		<?php 
if ($formModel !== null) {
    ?>

			<div class="form">

				<?php