summaryrefslogtreecommitdiffstats
path: root/web/directive/fields.html
blob: 79155c1ceb716e1a89c576730389f904a993a5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!--
    Copyright (c) 2012-2015 Kaarle Ritvanen
    See LICENSE file for license details
-->

<aconf-inline>
  <aconf-header></aconf-header>

  <aconf-model ng-if="node.meta.type == 'model'">
    <p>
      <button class="btn btn-default"
	      ng-if="node.meta.type == 'model'"
	      ng-repeat="action in node.meta.actions"
	      ng-click="invoke(action.name)">{{ action["ui-name"] }}</button>
      <aconf-del-button></aconf-del-button>
    </p>

    <ng-form name="form" ng-model="fields">
      <aconf-widget ng-repeat="field in fields"
		    ng-if="isRelevant(field)"
		    field="{name: field.name, label: field['ui-name'], editable: field.editable, meta: field}"
		    form-field="form[field.name]">
      </aconf-widget>
    </ng-form>
  </aconf-model>

  <aconf-collection ng-if="node.meta.type != 'model'"></aconf-collection>
</aconf-inline>