Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 1 | <div class="row"> |
| 2 | <div class="col-lg-12"> |
| 3 | <div class="view-header"> |
| 4 | <div class="pull-right text-right" style="line-height: 14px"> |
| 5 | <!--<small>UI Elements<br>General<br> <span class="c-white">Grid system</span></small>--> |
| 6 | <a class="btn btn-default" ng-if="vm.list" href="{{vm.baseUrl}}add">Add</a> |
| 7 | <a class="btn btn-default" ng-if="!vm.list" href="{{vm.baseUrl}}">Back to {{vm.title.toLowerCase()}} list</a> |
| 8 | </div> |
| 9 | <div class="header-icon"> |
| 10 | <i class="pe page-header-icon pe-7s-note2"></i> |
| 11 | </div> |
| 12 | <div class="header-title"> |
| 13 | <h3>{{vm.title}}</h3> |
| 14 | <!--<small>--> |
| 15 | <!--Responsive, mobile first fluid grid system.--> |
| 16 | <!--</small>--> |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 17 | </div> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 18 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 19 | <hr> |
Matteo Scandolo | 266907e | 2016-12-20 13:41:42 -0800 | [diff] [blame] | 20 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 21 | </div> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 22 | <div ng-if="vm.list"> |
| 23 | <xos-table config="vm.tableCfg" data="vm.tableData"></xos-table> |
| 24 | </div> |
| 25 | |
| 26 | <div ng-if="!vm.list"> |
Matteo Scandolo | 5d962a3 | 2017-08-01 18:16:14 -0700 | [diff] [blame] | 27 | <uib-tabset active="active"> |
| 28 | <uib-tab heading="{{vm.data.model}}"> |
| 29 | <div class="panel-body"> |
| 30 | <xos-form ng-model="vm.model" config="vm.formCfg"></xos-form> |
| 31 | </div> |
| 32 | </uib-tab> |
| 33 | <uib-tab ng-if="vm.getRelatedItemId(r, vm.model)" ng-repeat="r in vm.related.manytoone" heading="{{r.model}} {{vm.getHumanReadableOnField(r)}}"> |
| 34 | <div class="panel-body"> |
| 35 | <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> |
| 36 | </div> |
| 37 | </uib-tab> |
| 38 | <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)}}"> |
| 39 | <div class="panel-body"> |
| 40 | <xos-table config="vm.relatedModels.onetomany[r.model][r.on_field].tableConfig" data="vm.relatedModels.onetomany[r.model][r.on_field].model"></xos-table> |
| 41 | </div> |
| 42 | </uib-tab> |
| 43 | </uib-tabset> |
Matteo Scandolo | a1f748d | 2017-02-03 13:35:15 -0800 | [diff] [blame] | 44 | </div> |