-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathblock_creatable_setting.ctp
More file actions
43 lines (40 loc) · 1.3 KB
/
block_creatable_setting.ctp
File metadata and controls
43 lines (40 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* コンテンツの作成権限設定Element
* WorkflowComponent->getBlockRolePermissions())で取得した結果をもとにセットする
*
* - settingPermissions: 設定するパーミッションデータ(key: パーミッション名、value: ラベル)
* - panelLabel: パネルのタイトル
*
* ### サンプル
* ```
* echo $this->element('Blocks.block_creatable_setting', array(
* 'settingPermissions' => array(
* 'content_creatable' => __d('blocks', 'Content creatable roles'),
* 'content_comment_creatable' => __d('blocks', 'Content comment creatable roles'),
* ),
* 'panelLabel' => __d('blocks', 'Creatable settings')
* ));
* ```
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
//ラベル
if (! isset($panelLabel)) {
$panelLabel = __d('blocks', 'Creatable settings');
}
?>
<div class="panel panel-default">
<div class="panel-heading">
<?php echo $panelLabel; ?>
</div>
<div class="panel-body">
<?php echo $this->element('Blocks.block_permission_setting',
array('settingPermissions' => $settingPermissions)
); ?>
</div>
</div>