salix/front/core/components/treeview/child.html

54 lines
2.0 KiB
HTML
Raw Normal View History

2019-03-12 14:04:09 +00:00
<ul ng-if="::$ctrl.items">
2019-02-18 07:37:26 +00:00
<li ng-repeat="item in $ctrl.items"
ng-class="{
'expanded': item.active,
'collapsed': !item.active,
2019-03-12 14:04:09 +00:00
'included': item.selected == 1,
'excluded': item.selected == 0
2019-02-18 07:37:26 +00:00
}">
2019-01-21 10:45:53 +00:00
<vn-horizontal>
<vn-auto class="actions">
2019-03-12 14:04:09 +00:00
<vn-icon icon="keyboard_arrow_down" title="{{'Toggle' | translate}}"
ng-click="$ctrl.toggle(item, $event)">
2019-01-21 10:45:53 +00:00
</vn-icon>
</vn-auto>
2019-03-12 14:04:09 +00:00
<vn-one class="description">
<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">
2019-02-18 07:37:26 +00:00
</vn-check>
2019-03-12 14:04:09 +00:00
{{::item.name}}
</vn-one>
<vn-auto>
<vn-icon-button icon="{{icon.icon}}"
ng-repeat="icon in $ctrl.icons"
ng-click="$ctrl.onClick(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"
icons="$ctrl.icons"
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
2019-02-18 07:37:26 +00:00
</div>
2019-01-21 10:45:53 +00:00
</vn-horizontal>
</li>
</ul>