|
1 |
| -<div ng-controller="Umbraco.Editors.Dictionary.ListController as vm"> |
| 1 | +<div ng-controller="Umbraco.Editors.Dictionary.ListController as vm"> |
2 | 2 |
|
3 | 3 | <umb-load-indicator ng-if="vm.loading">
|
4 | 4 | </umb-load-indicator>
|
|
13 | 13 | </umb-editor-header>
|
14 | 14 | <umb-editor-container>
|
15 | 15 |
|
16 |
| - <umb-box ng-if="vm.items.length === 0"> |
17 |
| - <umb-box-content class="block-form"> |
18 |
| - |
19 |
| - <umb-empty-state size="small"> |
20 |
| - <localize key="dictionary_noItems">There are no dictionary items.</localize> |
21 |
| - </umb-empty-state> |
22 |
| - |
23 |
| - </umb-box-content> |
24 |
| - </umb-box> |
25 |
| - |
26 |
| - <table class="table table-hover" ng-if="vm.items.length > 0"> |
27 |
| - <caption class="sr-only"><localize key="visuallyHiddenTexts_dictionaryListCaption"></localize></caption> |
28 |
| - <thead> |
29 |
| - <tr> |
30 |
| - <th><localize key="general_name">Name</localize></th> |
31 |
| - <th ng-repeat="column in vm.items[0].translations | orderBy:'displayName'">{{column.displayName}}</th> |
32 |
| - </tr> |
33 |
| - </thead> |
34 |
| - <tbody> |
35 |
| - <tr ng-repeat="item in vm.items track by item.id" style="cursor: pointer;"> |
36 |
| - <th> |
37 |
| - <button type="button" ng-style="item.style" class="btn-reset bold" ng-click="vm.clickItem(item.id)">{{item.name}}</button> |
38 |
| - </th> |
39 |
| - <td ng-repeat="column in item.translations | orderBy:'displayName'"> |
40 |
| - <button type="button" class="btn-reset" ng-click="vm.clickItem(item.id)"> |
41 |
| - <umb-icon icon="{{ column.hasTranslation ? 'icon-check' : 'icon-alert' }}" |
42 |
| - class="{{ column.hasTranslation ? 'color-green' : 'color-red' }}"> |
43 |
| - </umb-icon> |
44 |
| - <span class="sr-only"> |
45 |
| - <localize ng-if="column.hasTranslation" key="visuallyHiddenTexts_hasTranslation"></localize> |
46 |
| - <localize ng-if="!column.hasTranslation" key="visuallyHiddenTexts_noTranslation"></localize> |
47 |
| - </span> |
48 |
| - </button> |
49 |
| - </td> |
50 |
| - </tr> |
51 |
| - </tbody> |
52 |
| - </table> |
| 16 | + <umb-editor-sub-header> |
| 17 | + |
| 18 | + <umb-editor-sub-header-content-left> |
| 19 | + <umb-button button-style="outline" |
| 20 | + type="button" |
| 21 | + action="vm.createNewItem()" |
| 22 | + label-key="dictionary_createNew"> |
| 23 | + </umb-button> |
| 24 | + </umb-editor-sub-header-content-left> |
| 25 | + |
| 26 | + </umb-editor-sub-header> |
| 27 | + |
| 28 | + <umb-box ng-if="vm.items.length === 0"> |
| 29 | + <umb-box-content class="block-form"> |
| 30 | + |
| 31 | + <umb-empty-state size="small"> |
| 32 | + <localize key="dictionary_noItems">There are no dictionary items.</localize> |
| 33 | + </umb-empty-state> |
| 34 | + |
| 35 | + </umb-box-content> |
| 36 | + </umb-box> |
| 37 | + |
| 38 | + <table class="table table-hover" ng-if="vm.items.length > 0"> |
| 39 | + <caption class="sr-only"><localize key="visuallyHiddenTexts_dictionaryListCaption"></localize></caption> |
| 40 | + <thead> |
| 41 | + <tr> |
| 42 | + <th><localize key="general_name">Name</localize></th> |
| 43 | + <th ng-repeat="column in vm.items[0].translations | orderBy:'displayName'">{{column.displayName}}</th> |
| 44 | + </tr> |
| 45 | + </thead> |
| 46 | + <tbody> |
| 47 | + <tr ng-repeat="item in vm.items track by item.id" style="cursor: pointer;"> |
| 48 | + <th> |
| 49 | + <button type="button" ng-style="item.style" class="btn-reset bold" ng-click="vm.clickItem(item.id)">{{item.name}}</button> |
| 50 | + </th> |
| 51 | + <td ng-repeat="column in item.translations | orderBy:'displayName'"> |
| 52 | + <button type="button" class="btn-reset" ng-click="vm.clickItem(item.id)"> |
| 53 | + <umb-icon icon="{{ column.hasTranslation ? 'icon-check' : 'icon-alert' }}" |
| 54 | + class="{{ column.hasTranslation ? 'color-green' : 'color-red' }}"> |
| 55 | + </umb-icon> |
| 56 | + <span class="sr-only"> |
| 57 | + <localize ng-if="column.hasTranslation" key="visuallyHiddenTexts_hasTranslation"></localize> |
| 58 | + <localize ng-if="!column.hasTranslation" key="visuallyHiddenTexts_noTranslation"></localize> |
| 59 | + </span> |
| 60 | + </button> |
| 61 | + </td> |
| 62 | + </tr> |
| 63 | + </tbody> |
| 64 | + </table> |
53 | 65 |
|
54 | 66 | </umb-editor-container>
|
55 | 67 | </umb-editor-view>
|
|
0 commit comments