12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <div layout="column" ng-cloak class="md-inline-form" angular-busy="appUtils.cgBusy(itemType + '.edit')">
- <md-toolbar class="md-table-toolbar md-default" >
- <div class="md-toolbar-tools">
- <md-button ng-show="!isModal" class="md-icon-button" ng-click="cancel()" title="{{ 'common.back' | translate }}">
- <md-icon class="material-icons">arrow_back</md-icon>
- </md-button>
- <span>{{ isModal ? title : (itemType + '.name' | translate:{count:selected.length}) }}</span>
- <span class="has-changed-warning" ng-show="hasChanged()">
- <md-icon title="{{ 'common.unsavedChanged' | translate }}" class="material-icons">warning</md-icon>
- </span>
- <span flex></span>
- <md-button class="md-icon-button" ng-show="item.id != null && !isModal" ng-click="askRemoveOne(item)" title="{{ 'common.delete' | translate }}">
- <md-icon class="material-icons">delete</md-icon>
- </md-button>
- </div>
- </md-toolbar>
- <md-content layout-padding>
- <form name="editForm">
- <div layout-gt-sm="row">
- <md-input-container class="md-block" flex flex-gt-sm="15">
- <label>{{ itemType + '.type' | translate }}</label>
- <md-select ng-model="item.type" required ng-readonly="item.id != null">
- <md-option ng-repeat="type in appUtils.articleTypes" ng-value="type">{{ itemType + '.types.' + type | translate }}</md-option>
- </md-select>
- </md-input-container>
-
- <md-input-container class="md-block" flex-gt-sm>
- <label>{{ itemType + '.title' | translate }}</label>
- <input required ng-model="item.title" ng-readonly="item.id != null">
- </md-input-container>
- </div>
- <div layout-gt-sm="row">
- <md-input-container class="md-block" flex-gt-sm>
- <label>{{ itemType + '.text' | translate }}</label>
- <textarea ng-model="item.text" required></textarea>
- </md-input-container>
- </div>
- <div flex>
- <md-progress-linear ng-disabled="!running" md-mode="indeterminate"></md-progress-linear>
- </div>
- <div flex layout-gt-sm="row" layout-align=" center">
- <div layout="column">
- <span class="md-caption" ng-show="item.createdAt != null">{{ 'common.createdAt' | translate }} {{ item.createdAt | formatDateTime }}</span>
- <span class="md-caption" ng-show="item.updatedAt != null">{{ 'common.updatedAt' | translate }} {{ item.updatedAt | formatDateTime }}</span>
- </div>
- <span flex></span>
- <div>
- <md-button ng-show="isModal" class="md-raised" type="button" ng-click="cancel()">{{ 'common.cancel' | translate }}</md-button>
- <md-button class="md-raised md-primary" type="submit" ng-click="!editForm.$invalid && submit()">{{ 'common.save' | translate }}</md-button>
- </div>
- </div>
- <div ng-repeat="error in busy.errors(itemType + '.edit')" class="isa_error">
- <i class="fa fa-times-circle"></i>
- {{ error.data.message }}
- </div>
- </form>
- </md-content>
- </div>
|