55 lines
2.4 KiB
HTML
55 lines
2.4 KiB
HTML
<ul ng-if="::$ctrl.items">
|
|
<li ng-repeat="item in $ctrl.items"
|
|
ng-class="{
|
|
'expanded': item.active,
|
|
'collapsed': !item.active,
|
|
'included': item.selected == 1,
|
|
'excluded': item.selected == 0
|
|
}" vn-draggable="{{::$ctrl.draggable}}" vn-droppable="{{::$ctrl.droppable}}" on-drop="$ctrl.onDrop(item, dragged, dropped)">
|
|
<vn-horizontal>
|
|
<vn-auto class="actions">
|
|
<vn-icon icon="keyboard_arrow_down" title="{{'Toggle' | translate}}"
|
|
ng-click="$ctrl.toggle(item, $event)">
|
|
</vn-icon>
|
|
</vn-auto>
|
|
<vn-check vn-auto vn-acl="{{$ctrl.aclRole}}"
|
|
ng-if="$ctrl.selectable"
|
|
field="item.selected"
|
|
disabled="$ctrl.disabled"
|
|
on-change="$ctrl.select(item, value)"
|
|
triple-state="true">
|
|
</vn-check>
|
|
<vn-one class="description">{{::item.name}}</vn-one>
|
|
<vn-auto>
|
|
<vn-icon-button icon="{{icon.icon}}"
|
|
ng-repeat="icon in $ctrl.icons"
|
|
ng-click="$ctrl.onIconClick(icon, item, $ctrl.parent, $parent.$index)"
|
|
vn-acl="{{$ctrl.aclRole}}" vn-acl-action="remove">
|
|
</vn-icon-button>
|
|
</vn-auto>
|
|
</vn-horizontal>
|
|
<vn-treeview-child items="item.childs" parent="item"
|
|
selectable="$ctrl.selectable"
|
|
disabled="$ctrl.disabled"
|
|
editable="$ctrl.editable"
|
|
draggable="::$ctrl.draggable"
|
|
droppable="::$ctrl.droppable"
|
|
icons="::$ctrl.icons"
|
|
parent-scope="::$ctrl.parentScope"
|
|
acl-role="$ctrl.aclRole">
|
|
</vn-treeview-child>
|
|
</li>
|
|
<li ng-if="$ctrl.isInsertable && $ctrl.editable"
|
|
ng-click="$ctrl.onCreate($ctrl.parent)"
|
|
vn-acl="{{$ctrl.aclRole}}"
|
|
vn-acl-action="remove">
|
|
<vn-horizontal>
|
|
<vn-auto>
|
|
<vn-icon-button icon="add_circle"></vn-icon-button>
|
|
</vn-auto>
|
|
<div class="description" translate>
|
|
Create new one
|
|
</div>
|
|
</vn-horizontal>
|
|
</li>
|
|
</ul> |