<div id="afGuiEditor-palette-config" class="panel panel-default">
    <ul id="afGuiEditor-palette-tabs" class="panel-heading nav nav-tabs">
      <li role="presentation" ng-class="{active: selectedEntityName === null}">
        <a href ng-click="editor.selectEntity(null)">
          <span>{{ ts('Form Settings') }}</span>
        </a>
      </li>
      <li role="presentation" ng-repeat="entity in entities" ng-class="{active: selectedEntityName === entity.name}">
        <a href ng-click="editor.selectEntity(entity.name)">
          <span af-gui-editable ng-model="entity.label">{{ entity.label }}</span>
        </a>
      </li>
      <li role="presentation" class="dropdown">
        <a href class="dropdown-toggle" data-toggle="dropdown">
          <span><i class="crm-i fa-plus"></i></span>
        </a>
        <ul class="dropdown-menu">
          <li ng-repeat="(entityName, entity) in meta.entities" ng-if="entity.defaults">
            <a href ng-click="addEntity(entityName)">{{ entity.label }}</a>
          </li>
        </ul>
      </li>
    </ul>
  <div class="panel-body" ng-include="'~/afGuiEditor/config-form.html'" ng-if="selectedEntityName === null"></div>
  <div class="panel-body" af-gui-entity="entity" ng-repeat="entity in entities" ng-if="selectedEntityName === entity.name"></div>
</div>
