blob: b162cc5cec4470de4e70fba8276c30914f7e94c1 [file] [log] [blame]
<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 active="active">
<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>