Matteo Scandolo | 500e4c4 | 2017-08-08 13:05:24 -0700 | [diff] [blame] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 19 | <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 Scandolo | 580033a | 2017-08-17 11:16:39 -0700 | [diff] [blame] | 25 | <a class="btn btn-default" ng-if="!vm.list" href="{{vm.baseUrl}}">Back to {{vm.pluralTitle.toLowerCase()}} list</a> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 26 | </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 Scandolo | 580033a | 2017-08-17 11:16:39 -0700 | [diff] [blame] | 31 | <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 Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 36 | </div> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 37 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 38 | <hr> |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 39 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 40 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 41 | <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 Scandolo | a471859 | 2017-08-10 14:54:51 -0700 | [diff] [blame] | 46 | <uib-tabset> |
Matteo Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 47 | <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 Scandolo | c8a58c8 | 2017-08-17 17:14:38 -0700 | [diff] [blame] | 52 | <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 Scandolo | e9e8597 | 2017-11-29 14:24:45 -0800 | [diff] [blame^] | 57 | <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 Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 61 | <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 Scandolo | c3804aa | 2017-08-09 16:00:43 -0700 | [diff] [blame] | 65 | <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 Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 66 | <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 Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 71 | </div> |