realm-localization.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <kc-tabs-realm></kc-tabs-realm>
  3. <ul class="nav nav-tabs nav-tabs-pf">
  4. <li class="active"><a href="#/realms/{{realm.realm}}/localization">{{:: 'lookup' | translate}}</a></li>
  5. <li><a href="#/realms/{{realm.realm}}/localization/upload">{{:: 'localization-upload-file' | translate}}</a></li>
  6. </ul>
  7. <form class="form-horizontal" name="realmForm" novalidate>
  8. <div class="form-group">
  9. <label class="col-md-2 control-label" for="selectedRealmSpecificLocales">{{:: 'locale' | translate}}</label>
  10. <div class="col-md-6" ng-show="realmSpecificLocales.length > 0">
  11. <select class="form-control" id="selectedRealmSpecificLocales"
  12. ng-model="selectedRealmSpecificLocales"
  13. ng-options="o as o for o in realmSpecificLocales">
  14. <option value="" disabled selected>{{:: 'select-one.placeholder' | translate}}</option>
  15. </select>
  16. </div>
  17. <div class="col-md-6" ng-show="realmSpecificLocales.length < 1">
  18. {{:: 'no-localizations-configured' | translate}}
  19. </div>
  20. </div>
  21. <div class="form-group clearfix">
  22. <label class="col-md-2 control-label"></label>
  23. <div class="col-md-6">
  24. <input class="form-control ng-pristine ng-untouched ng-empty ng-invalid" id="newLocale" type="text" ng-model="newLocale" placeholder="locale">
  25. </div>
  26. <div class="col-sm-4">
  27. <button class="btn btn-primary ng-binding" type="submit" data-ng-click="createLocale()">Create</button>
  28. </div>
  29. </div>
  30. </form>
  31. <table class="table table-striped table-bordered" data-ng-show="localizationTexts">
  32. <thead>
  33. <tr>
  34. <th class="kc-table-actions" colspan="4">
  35. <div class="form-inline">
  36. <div class="pull-right" data-ng-show="access.manageRealm">
  37. <a id="createLocalizationText" class="btn btn-default" href="#/create/localization/{{realm.realm}}/{{selectedRealmSpecificLocales}}">{{:: 'add-localization-text' | translate}}</a>
  38. </div>
  39. </div>
  40. </th>
  41. </tr>
  42. <tr >
  43. <th>{{:: 'key' | translate}}</th>
  44. <th>{{:: 'value' | translate}}</th>
  45. <th colspan="2">{{:: 'actions' | translate}}</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <tr ng-repeat="(key, value) in localizationTexts">
  50. <td>{{key}}</td>
  51. <td>{{value}}</td>
  52. <td class="kc-action-cell" kc-open="/realms/{{realm.realm}}/localization/{{selectedRealmSpecificLocales}}/{{key}}">{{:: 'edit' | translate}}</td>
  53. <td class="kc-action-cell" data-ng-click="removeLocalizationText(key)">{{:: 'delete' | translate}}</td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. </div>
  58. <kc-menu></kc-menu>