blob: 596add884479bd25e71071b6a5b58b951a880c95 [file] [log] [blame]
Matteo Scandolo500e4c42017-08-08 13:05:24 -07001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080019<div class="row">
20 <div class="col-lg-12">
21 <div class="view-header">
22 <div class="pull-right text-right" style="line-height: 14px">
23 <!--<small>UI Elements<br>General<br> <span class="c-white">Grid system</span></small>-->
24 <a class="btn btn-default" ng-if="vm.list" href="{{vm.baseUrl}}add">Add</a>
Matteo Scandolo580033a2017-08-17 11:16:39 -070025 <a class="btn btn-default" ng-if="!vm.list" href="{{vm.baseUrl}}">Back to {{vm.pluralTitle.toLowerCase()}} list</a>
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080026 </div>
27 <div class="header-icon">
28 <i class="pe page-header-icon pe-7s-note2"></i>
29 </div>
30 <div class="header-title">
Matteo Scandolo580033a2017-08-17 11:16:39 -070031 <h3 ng-if="vm.list">{{vm.pluralTitle}}</h3>
32 <h3 ng-if="!vm.list">{{vm.singularTitle}}</h3>
33 <small>
34 {{vm.modelDef.description}}
35 </small>
Matteo Scandolo266907e2016-12-20 13:41:42 -080036 </div>
Matteo Scandoloee655a12016-12-19 15:38:43 -080037 </div>
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080038 <hr>
Matteo Scandolo266907e2016-12-20 13:41:42 -080039 </div>
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080040</div>
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080041<div ng-if="vm.list">
42 <xos-table config="vm.tableCfg" data="vm.tableData"></xos-table>
43</div>
44
45<div ng-if="!vm.list">
Matteo Scandoloa4718592017-08-10 14:54:51 -070046 <uib-tabset>
Matteo Scandolo5d962a32017-08-01 18:16:14 -070047 <uib-tab heading="{{vm.data.model}}">
48 <div class="panel-body">
49 <xos-form ng-model="vm.model" config="vm.formCfg"></xos-form>
50 </div>
51 </uib-tab>
Matteo Scandoloc8a58c82017-08-17 17:14:38 -070052 <uib-tab ng-if="vm.debugTab" heading="Debug">
53 <div class="panel-body">
54 <xos-debug-model ng-model="vm.model"></xos-debug-model>
55 </div>
56 </uib-tab>
Matteo Scandolo39e04152017-11-29 14:24:45 -080057 <uib-tab
58 ng-if="vm.getRelatedItemId(r, vm.model) && vm.relatedModels.manytoone[r.model][r.on_field].formConfig"
59 ng-repeat="r in vm.related.manytoone"
60 heading="{{r.model}} {{vm.getHumanReadableOnField(r)}}">
Matteo Scandolo5d962a32017-08-01 18:16:14 -070061 <div class="panel-body">
62 <xos-form ng-model="vm.relatedModels.manytoone[r.model][r.on_field].model" config="vm.relatedModels.manytoone[r.model][r.on_field].formConfig"></xos-form>
63 </div>
64 </uib-tab>
Matteo Scandoloc3804aa2017-08-09 16:00:43 -070065 <uib-tab ng-if="vm.relatedModels.onetomany[r.model]" ng-repeat="r in vm.related.onetomany" classes="{{vm.relatedModels.onetomany[r.model][r.on_field].class}}" heading="{{r.model}} {{vm.getHumanReadableOnField(r)}}">
Matteo Scandolo5d962a32017-08-01 18:16:14 -070066 <div class="panel-body">
67 <xos-table config="vm.relatedModels.onetomany[r.model][r.on_field].tableConfig" data="vm.relatedModels.onetomany[r.model][r.on_field].model"></xos-table>
68 </div>
69 </uib-tab>
70 </uib-tabset>
Matteo Scandoloa1f748d2017-02-03 13:35:15 -080071</div>