Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

articlesedit.html 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <div layout="column" ng-cloak class="md-inline-form" angular-busy="appUtils.cgBusy(itemType + '.edit')">
  2. <md-toolbar class="md-table-toolbar md-default" >
  3. <div class="md-toolbar-tools">
  4. <md-button ng-show="!isModal" class="md-icon-button" ng-click="cancel()" title="{{ 'common.back' | translate }}">
  5. <md-icon class="material-icons">arrow_back</md-icon>
  6. </md-button>
  7. <span>{{ isModal ? title : (itemType + '.name' | translate:{count:selected.length}) }}</span>
  8. <span class="has-changed-warning" ng-show="hasChanged()">
  9. <md-icon title="{{ 'common.unsavedChanged' | translate }}" class="material-icons">warning</md-icon>
  10. </span>
  11. <span flex></span>
  12. <md-button class="md-icon-button" ng-show="item.id != null && !isModal" ng-click="askRemoveOne(item)" title="{{ 'common.delete' | translate }}">
  13. <md-icon class="material-icons">delete</md-icon>
  14. </md-button>
  15. </div>
  16. </md-toolbar>
  17. <md-content layout-padding>
  18. <form name="editForm">
  19. <div layout-gt-sm="row">
  20. <md-input-container class="md-block" flex flex-gt-sm="15">
  21. <label>{{ itemType + '.type' | translate }}</label>
  22. <md-select ng-model="item.type" required ng-readonly="item.id != null">
  23. <md-option ng-repeat="type in appUtils.articleTypes" ng-value="type">{{ itemType + '.types.' + type | translate }}</md-option>
  24. </md-select>
  25. </md-input-container>
  26. <md-input-container class="md-block" flex-gt-sm>
  27. <label>{{ itemType + '.title' | translate }}</label>
  28. <input required ng-model="item.title" ng-readonly="item.id != null">
  29. </md-input-container>
  30. </div>
  31. <div layout-gt-sm="row">
  32. <md-input-container class="md-block" flex-gt-sm>
  33. <label>{{ itemType + '.text' | translate }}</label>
  34. <textarea ng-model="item.text" required></textarea>
  35. </md-input-container>
  36. </div>
  37. <div flex>
  38. <md-progress-linear ng-disabled="!running" md-mode="indeterminate"></md-progress-linear>
  39. </div>
  40. <div flex layout-gt-sm="row" layout-align=" center">
  41. <div layout="column">
  42. <span class="md-caption" ng-show="item.createdAt != null">{{ 'common.createdAt' | translate }} {{ item.createdAt | formatDateTime }}</span>
  43. <span class="md-caption" ng-show="item.updatedAt != null">{{ 'common.updatedAt' | translate }} {{ item.updatedAt | formatDateTime }}</span>
  44. </div>
  45. <span flex></span>
  46. <div>
  47. <md-button ng-show="isModal" class="md-raised" type="button" ng-click="cancel()">{{ 'common.cancel' | translate }}</md-button>
  48. <md-button class="md-raised md-primary" type="submit" ng-click="!editForm.$invalid && submit()">{{ 'common.save' | translate }}</md-button>
  49. </div>
  50. </div>
  51. <div ng-repeat="error in busy.errors(itemType + '.edit')" class="isa_error">
  52. <i class="fa fa-times-circle"></i>
  53. {{ error.data.message }}
  54. </div>
  55. </form>
  56. </md-content>
  57. </div>