| |
| <!-- |
| Copyright 2017-present Open Networking Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| |
| <div class="row"> |
| <div class="col-lg-12"> |
| <div class="view-header"> |
| <div class="pull-right text-right" style="line-height: 14px"> |
| <!--<small>UI Elements<br>General<br> <span class="c-white">Grid system</span></small>--> |
| <a class="btn btn-default" ng-if="vm.list" href="{{vm.baseUrl}}add">Add</a> |
| <a class="btn btn-default" ng-if="!vm.list" href="{{vm.baseUrl}}">Back to {{vm.pluralTitle.toLowerCase()}} list</a> |
| </div> |
| <div class="header-icon"> |
| <i class="pe page-header-icon pe-7s-note2"></i> |
| </div> |
| <div class="header-title"> |
| <h3 ng-if="vm.list">{{vm.pluralTitle}}</h3> |
| <h3 ng-if="!vm.list">{{vm.singularTitle}}</h3> |
| <small> |
| {{vm.modelDef.description}} |
| </small> |
| </div> |
| </div> |
| <hr> |
| </div> |
| </div> |
| <div ng-if="vm.list"> |
| <xos-table config="vm.tableCfg" data="vm.tableData"></xos-table> |
| </div> |
| |
| <div ng-if="!vm.list"> |
| <uib-tabset> |
| <uib-tab heading="{{vm.data.model}}"> |
| <div class="panel-body"> |
| <xos-form ng-model="vm.model" config="vm.formCfg"></xos-form> |
| </div> |
| </uib-tab> |
| <uib-tab ng-if="vm.debugTab" heading="Debug"> |
| <div class="panel-body"> |
| <xos-debug-model ng-model="vm.model"></xos-debug-model> |
| </div> |
| </uib-tab> |
| <uib-tab |
| ng-if="vm.getRelatedItemId(r, vm.model) && vm.relatedModels.manytoone[r.model][r.on_field].formConfig" |
| ng-repeat="r in vm.related.manytoone" |
| heading="{{r.model}} {{vm.getHumanReadableOnField(r)}}"> |
| <div class="panel-body"> |
| <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> |
| </div> |
| </uib-tab> |
| <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)}}"> |
| <div class="panel-body"> |
| <xos-table config="vm.relatedModels.onetomany[r.model][r.on_field].tableConfig" data="vm.relatedModels.onetomany[r.model][r.on_field].model"></xos-table> |
| </div> |
| </uib-tab> |
| </uib-tabset> |
| </div> |