44 return (
Rights::module()->displayDescription ===
true && $this->owner->description !== null) ? $this->owner->description : $this->owner->name;
56 'name' => urlencode($this->owner->name),
67 $markup = CHtml::link($this->owner->name, array(
69 'name' => urlencode($this->owner->name),
86 $this->
childCount = count($this->owner->getChildren());
89 return $this->
childCount>0 ?
' [ <span class="child-count">'.$this->childCount.
'</span> ]' :
'';
99 return ' <span class="auth-item-name" style="display:none;">'.$this->owner->name.
'</span>';
119 return CHtml::linkButton(
Rights::t(
'core',
'Delete'), array(
120 'submit' => array(
'authItem/delete',
'name' => urlencode($this->owner->name)),
121 'confirm' =>
Rights::t(
'core',
'Are you sure you want to delete this operation?'),
122 'class' =>
'delete-link',
123 'csrf' => Yii::app()->request->enableCsrfValidation,
134 return CHtml::linkButton(
Rights::t(
'core',
'Delete'), array(
135 'submit' => array(
'authItem/delete',
'name' => urlencode($this->owner->name)),
136 'confirm' =>
Rights::t(
'core',
'Are you sure you want to delete this task?'),
137 'class' =>
'delete-link',
138 'csrf' => Yii::app()->request->enableCsrfValidation,
151 return CHtml::linkButton(
Rights::t(
'core',
'Delete'), array(
152 'submit' => array(
'authItem/delete',
'name' => urlencode($this->owner->name)),
153 'confirm' =>
Rights::t(
'core',
'Are you sure you want to delete this role?'),
154 'class' =>
'delete-link',
155 'csrf' => Yii::app()->request->enableCsrfValidation,
167 return CHtml::linkButton(
Rights::t(
'core',
'Remove'), array(
168 'submit' => array(
'authItem/removeChild',
'name' => urlencode($this->owner->name),
'child' => urlencode($this->parent->name)),
169 'class' =>
'remove-link',
170 'csrf' => Yii::app()->request->enableCsrfValidation,
181 return CHtml::linkButton(
Rights::t(
'core',
'Remove'), array(
182 'submit' => array(
'authItem/removeChild',
'name' => urlencode($this->parent->name),
'child' => urlencode($this->owner->name)),
183 'class' =>
'remove-link',
184 'csrf' => Yii::app()->request->enableCsrfValidation,
195 return CHtml::linkButton(
Rights::t(
'core',
'Revoke'), array(
196 'submit' => array(
'assignment/revoke',
'id' => $this->userId,
'name' => urlencode($this->owner->name)),
197 'class' =>
'revoke-link',
198 'csrf' => Yii::app()->request->enableCsrfValidation,
213 return CHtml::link(
Rights::t(
'core',
'Revoke'),
'#', array(
217 url:'".Yii::app()->controller->createUrl(
'authItem/revoke', array(
218 'name' => urlencode($role->name),
219 'child' => urlencode($this->owner->name),
221 data:{ ajax:1 $csrf },
223 $('#permissions').load('".Yii::app()->controller->createUrl(
'authItem/permissions').
"', { ajax:1 $csrf });
229 'class' =>
'revoke-link',
244 return CHtml::link(
Rights::t(
'core',
'Assign'),
'#', array(
248 url:'".Yii::app()->controller->createUrl(
'authItem/assign', array(
249 'name' => urlencode($role->name),
250 'child' => urlencode($this->owner->name),
252 data:{ ajax:1 $csrf },
254 $('#permissions').load('".Yii::app()->controller->createUrl(
'authItem/permissions').
"', { ajax:1 $csrf });
260 'class' =>
'assign-link',
275 foreach ($parents as $itemName => $item) {
276 $itemMarkup = $item->getNameText();
278 if ($displayType ===
true) {
279 $itemMarkup .=
' ('.Rights::getAuthItemTypeName($item->type).
')';
282 $items[] = $itemMarkup;
285 return '<span class="inherited-item" title="'.implode(
'<br />', $items).
'">'.
Rights::t(
'core',
'Inherited').
' *</span>';