blob: 27e93e50636b8f288337e04ebe4c868c292a251f [file] [log] [blame]
<!--
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.title.toLowerCase()}} list</a>
</div>
<div class="header-icon">
<i class="pe page-header-icon pe-7s-note2"></i>
</div>
<div class="header-title">
<h3>{{vm.title}}</h3>
<!--<small>-->
<!--Responsive, mobile first fluid grid system.-->
<!--</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.getRelatedItemId(r, vm.model)" 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 classes="{{vm.relatedModels.onetomany[r.model][r.on_field].class}}" ng-if="vm.relatedModels.onetomany[r.model]" ng-repeat="r in vm.related.onetomany" 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>