Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

articlesedit.html 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. <h4 class="md-title">{{ itemType + '.general' | translate }}</h4>
  20. <div layout-gt-sm="row">
  21. <md-input-container class="md-block" flex flex-gt-sm="15">
  22. <label>{{ itemType + '.type' | translate }}</label>
  23. <md-select ng-model="item.type" required ng-readonly="item.id != null">
  24. <md-option ng-repeat="type in appUtils.articleTypes" ng-value="type">{{ itemType + '.types.' + type | translate }}</md-option>
  25. </md-select>
  26. </md-input-container>
  27. <md-input-container class="md-block" flex-gt-sm>
  28. <label>{{ itemType + '.title' | translate }}</label>
  29. <input required ng-model="item.title" ng-readonly="item.id != null">
  30. </md-input-container>
  31. </div>
  32. <div layout-gt-sm="row">
  33. <md-input-container class="md-block" flex>
  34. <label>{{ itemType + '.pictureUrl' | translate }}</label>
  35. <input ng-model="item.pictureUrl" >
  36. </md-input-container>
  37. </div>
  38. <div layout="column" layout-align=" center">
  39. <img ng-src="{{item.pictureUrl}}" />
  40. </div>
  41. <div layout-gt-sm="row">
  42. <md-input-container class="md-block" flex>
  43. <label>{{ itemType + '.pictureCaption' | translate }}</label>
  44. <input ng-model="item.pictureCaption" >
  45. </md-input-container>
  46. </div>
  47. <div layout-gt-sm="row">
  48. <md-input-container class="md-block" flex-gt-sm>
  49. <label>{{ itemType + '.text' | translate }}</label>
  50. <textarea ng-model="item.text" required></textarea>
  51. </md-input-container>
  52. </div>
  53. <div layout="row" layout-align=" center">
  54. <h4 class="md-title">{{ itemType + '.fields' | translate }}</h4>
  55. <md-button class="md-icon-button no-margin" ng-click="addField()" title="{{ 'common.new' | translate }}">
  56. <md-icon class="material-icons">playlist_add</md-icon>
  57. </md-button>
  58. </div>
  59. <div layout-gt-sm="row">
  60. <div ng-repeat="field in item.fields">{{field}}</div>
  61. </div>
  62. <div flex>
  63. <md-progress-linear ng-disabled="!running" md-mode="indeterminate"></md-progress-linear>
  64. </div>
  65. <div flex layout-gt-sm="row" layout-align=" center">
  66. <div layout="column">
  67. <span class="md-caption" ng-show="item.createdAt != null">{{ 'common.createdAt' | translate }} {{ item.createdAt | formatDateTime }}</span>
  68. <span class="md-caption" ng-show="item.updatedAt != null">{{ 'common.updatedAt' | translate }} {{ item.updatedAt | formatDateTime }}</span>
  69. </div>
  70. <span flex></span>
  71. <div>
  72. <md-button ng-show="isModal" class="md-raised" type="button" ng-click="cancel()">{{ 'common.cancel' | translate }}</md-button>
  73. <md-button class="md-raised md-primary" type="submit" ng-click="!editForm.$invalid && submit()">{{ 'common.save' | translate }}</md-button>
  74. </div>
  75. </div>
  76. <div ng-repeat="error in busy.errors(itemType + '.edit')" class="isa_error">
  77. <i class="fa fa-times-circle"></i>
  78. {{ error.data.message }}
  79. </div>
  80. </form>
  81. </md-content>
  82. </div>