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> |
| 25 | <a class="btn btn-default" ng-if="!vm.list" href="{{vm.baseUrl}}">Back to {{vm.title.toLowerCase()}} list</a> |
| 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"> |
| 31 | <h3>{{vm.title}}</h3> |
| 32 | <!--<small>--> |
| 33 | <!--Responsive, mobile first fluid grid system.--> |
| 34 | <!--</small>--> |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 35 | </div> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 36 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 37 | <hr> |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 38 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 39 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 40 | <div ng-if="vm.list"> |
| 41 | <xos-table config="vm.tableCfg" data="vm.tableData"></xos-table> |
| 42 | </div> |
| 43 | |
| 44 | <div ng-if="!vm.list"> |
Matteo Scandolo | a471859 | 2017-08-10 14:54:51 -0700 | [diff] [blame] | 45 | <uib-tabset> |
Matteo Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 46 | <uib-tab heading="{{vm.data.model}}"> |
| 47 | <div class="panel-body"> |
| 48 | <xos-form ng-model="vm.model" config="vm.formCfg"></xos-form> |
| 49 | </div> |
| 50 | </uib-tab> |
Matteo Scandolo | c8a58c8 | 2017-08-17 17:14:38 -0700 | [diff] [blame^] | 51 | <uib-tab ng-if="vm.debugTab" heading="Debug"> |
| 52 | <div class="panel-body"> |
| 53 | <xos-debug-model ng-model="vm.model"></xos-debug-model> |
| 54 | </div> |
| 55 | </uib-tab> |
Matteo Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 56 | <uib-tab ng-if="vm.getRelatedItemId(r, vm.model)" ng-repeat="r in vm.related.manytoone" heading="{{r.model}} {{vm.getHumanReadableOnField(r)}}"> |
| 57 | <div class="panel-body"> |
| 58 | <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> |
| 59 | </div> |
| 60 | </uib-tab> |
Matteo Scandolo | c3804aa | 2017-08-09 16:00:43 -0700 | [diff] [blame] | 61 | <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] | 62 | <div class="panel-body"> |
| 63 | <xos-table config="vm.relatedModels.onetomany[r.model][r.on_field].tableConfig" data="vm.relatedModels.onetomany[r.model][r.on_field].model"></xos-table> |
| 64 | </div> |
| 65 | </uib-tab> |
| 66 | </uib-tabset> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 67 | </div> |