CSIT Fix for SDC-2585
[sdc.git] / catalog-ui / src / app / view-models / workspace / tabs / attributes / attributes-view.html
1 <!--
2   ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
3   ~
4   ~ Licensed under the Apache License, Version 2.0 (the "License");
5   ~ you may not use this file except in compliance with the License.
6   ~ You may obtain a copy of the License at
7   ~
8   ~      http://www.apache.org/licenses/LICENSE-2.0
9   ~
10   ~ Unless required by applicable law or agreed to in writing, software
11   ~ distributed under the License is distributed on an "AS IS" BASIS,
12   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   ~ See the License for the specific language governing permissions and
14   ~ limitations under the License.
15 -->
16
17 <div class="workspace-attributes">
18     <div class="add-btn" data-tests-id="add-attribute-button" ng-if="!isViewMode()"
19          data-ng-class="{'disabled': isDisableMode()}" data-ng-click="addOrUpdateAttribute()" data-tests-id="add-attribute-button">Add</div>
20     <div class="table-container-flex">
21         <div class="table" data-ng-class="{'view-mode': isViewMode()}">
22             <div class="head flex-container">
23                 <div class="table-header head-row hand flex-item" data-ng-repeat="header in tableHeadersList track by $index" data-ng-click="sort(header.property)">{{header.title}}
24                     <span data-ng-if="sortBy === header.property" class="table-header-sort-arrow" data-ng-class="{'down': reverse, 'up':!reverse}"> </span>
25                 </div>
26                 <div class="table-no-text-header head-row flex-item" ng-if="!isViewMode()"></div>
27                 <!--div class="table-no-text-header head-row flex-item"></div-->
28             </div>
29
30             <div class="body">
31                 <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true" class="scrollbar-container">
32                     <div data-ng-if="component.attributes.length === 0" class="no-row-text"  data-ng-class="{'disabled': isDisableMode()}">
33                         There are no attributes to display <br>
34                         <span ng-if="!isViewMode()"> click <a data-ng-click="addOrUpdateAttribute()">here</a> to add one </span>
35
36                     </div>
37                     <div data-ng-repeat-start="attribute in component.attributes | orderBy:sortBy:reverse track by $index"
38                          class="flex-container data-row" data-ng-class="{'selected': attribute.selected}"
39                          data-ng-click="attribute.selected = !attribute.selected" data-tests-id="attributes-table-row">
40
41                         <div class="table-col-general flex-item text">
42                             <span class="sprite table-arrow" data-ng-class="{'opened': attribute.selected}"></span>
43                             <span  data-tests-id="{{attribute.name}}" tooltips tooltip-content="{{attribute.name}}">{{attribute.name}}</span>
44
45                         </div>
46
47                         <div class="table-col-general flex-item text" data-tests-id="{{attribute.type}}" data-ng-bind="attribute.type"></div>
48
49                         <div class="table-col-general flex-item text">
50                             <span tooltips tooltip-content="{{attribute.defaultValue}}" data-tests-id="{{attribute.defaultValue}}" data-ng-bind="attribute.defaultValue"></span>
51                         </div>
52
53                         <div class="table-btn-col flex-item" ng-if="!isViewMode()">
54                             <button class="table-edit-btn" data-tests-id="edit_{{attribute.name}}" data-ng-show="attribute.parentUniqueId==component.uniqueId"
55                                     data-ng-click="addOrUpdateAttribute(attribute); $event.stopPropagation();"  data-ng-class="{'disabled': isViewMode()}"> </button>
56                             <button class="table-delete-btn" data-tests-id="delete_{{attribute.name}}"  data-ng-show="attribute.parentUniqueId==component.uniqueId"
57                                     data-ng-click="delete(attribute); $event.stopPropagation();"  data-ng-class="{'disabled': isViewMode()}"> </button>
58                         </div>
59                     </div>
60                     <div data-ng-repeat-end="" data-ng-if="attribute.selected && attribute.description" class="item-opened" data-ng-bind="attribute.description">
61                     </div>
62                 </perfect-scrollbar>
63             </div>
64
65         </div>
66     </div>
67
68 </div>