Yangman - rename controllers
[dlux.git] / modules / yangman-resources / src / main / resources / yangman / views / rightpanel / form / config / choice.tpl.html
1 <div ng-controller="YMChoiceCtrl as yangChoice"
2      class="yangmanModule__right-panel__form__element-container"
3      ng-class="{'expanded' : node.expanded}">
4
5     <!-- choice title -->
6     <div layout="row"
7          layout-align="start center"
8          class="pointer container-label">
9
10         <!-- Expand Icon -->
11         <md-icon md-font-set="material-icons" class="top-icon top-element" ng-click="yangChoice.toggleExpanded()">
12             <md-tooltip md-direction="left">{{ 'YANGMAN_SHOW_HIDE_CON' | translate }}</md-tooltip>
13             {{node.expanded ? 'keyboard_arrow_down':'keyboard_arrow_right'}}
14         </md-icon>
15
16         <!-- Choice label -->
17         <p class="top-element" ym-info-box node="node" ng-click="yangChoice.toggleExpanded()"> {{yangForm.getNodeName(node.localeLabel, node.label)}} </p>
18
19         <!-- Action menu -->
20         <yang-form-menu is-action-menu="yangChoice.isActionMenu()"
21                         augmentations="augmentations"
22                         node="node"></yang-form-menu>
23
24         <!-- Choice select -->
25         <md-input-container>
26             <md-select ng-model="node.choice" aria-label="Choice select">
27                 <md-option ng-repeat="node in node.getChildren(null, null, constants.NODE_UI_DISPLAY) | filter:caseShowing" ng-value="node">
28                     {{node.label}}
29                 </md-option>
30             </md-select>
31         </md-input-container>
32     </div>
33
34     <!-- choice's children -->
35     <div ng-repeat="case in node.getChildren(null,null,constants.NODE_UI_DISPLAY) | ymOnlyConfigElem"
36          ng-include="yangForm.viewPath + '/config/' + case.type +'.tpl.html'"
37          ng-show="node.choice.id === case.id && node.expanded"
38          ng-if="!(case.augmentationId && !augmentations.getAugmentation(case.parent, case.augmentationId).expanded)"></div>
39 </div>