Skip to content

Commit

Permalink
Merge pull request #778 from cultuurnet/feature/III-4969
Browse files Browse the repository at this point in the history
III-4969 - Show  'Label not allowed' alert on search results
  • Loading branch information
brampauwelyn authored Apr 16, 2024
2 parents b80b892 + 4584ad5 commit 017dc28
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 26 deletions.
24 changes: 19 additions & 5 deletions dist/udb3-angular.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions dist/udb3-angular.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/core/translations/dutch-translations.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ angular.module('udb.core')
'audience': 'Toegang',
'completeness': 'Volledigheid'
},
errors: {
labelNotAllowed: 'Dit label is toegevoegd door een andere gebruiker of organisatie en kan je niet verwijderen.'
},
preview: {
tabs: {
'data': 'Gegevens',
Expand Down
3 changes: 3 additions & 0 deletions src/core/translations/french-translations.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ angular.module('udb.core')
'audience': 'Accès',
'completeness': 'Intégralité'
},
errors: {
labelNotAllowed: 'Ce label a été ajouté par un autre utilisateur ou une autre organisation et ne peut pas être supprimé.'
},
preview: {
tabs: {
'data': 'Données',
Expand Down
3 changes: 3 additions & 0 deletions src/core/translations/german-translations.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ angular.module('udb.core').constant('udbGermanTranslations', {
'audience': 'Zutritt',
'completeness': 'Integrität'
},
'errors': {
'labelNotAllowed': 'Dieses Label wurde von einem anderen Benutzer oder einer anderen Organisation hinzugefügt und kann nicht entfernt werden.'
},
'preview': {
'tabs': {
'data': 'Angaben',
Expand Down
3 changes: 2 additions & 1 deletion src/event-detail/ui/event-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ <h1 class="title" ng-bind="::event.name"></h1>
<span translate-once="preview.labels_success" translate-values="{ addedLabel: '{{addedLabel}}' }"></span>
</p>
<p ng-if="labelResponse === 'unlabelError'" class="alert alert-danger">
<span ng-bind="labelsError"></span>
<span ng-if="labelsError !== 'Label not allowed'" ng-bind="labelsError"></span>
<span ng-if="labelsError === 'Label not allowed'" translate-once="errors.labelNotAllowed"></span>
</p>
</td>
</tr>
Expand Down
3 changes: 2 additions & 1 deletion src/organizers/detail/organizer-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ <h1 class="title" ng-bind="odc.organizer.name"></h1>
label-added="odc.addLabel(label)"
label-removed="odc.deleteLabel(label)"></udb-label-select>
<div ng-if="odc.labelResponse === 'unlabelError'" class="alert alert-danger">
<span ng-bind="odc.labelsError"></span>
<span ng-if="odc.labelsError !== 'Label not allowed'" ng-bind="odc.labelsError"></span>
<span ng-if="odc.labelsError === 'Label not allowed'" translate-once="errors.labelNotAllowed"></span>
</div>
</td>
</tr>
Expand Down
3 changes: 2 additions & 1 deletion src/place-detail/ui/place-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ <h1 class="title" ng-bind="::place.name"></h1>
<span translate-once="preview.labels_success" translate-values="{ addedLabel: '{{addedLabel}}' }"></span>
</p>
<p ng-if="labelResponse === 'unlabelError'" class="alert alert-danger">
<span ng-bind="labelsError"></span>
<span ng-if="labelsError !== 'Label not allowed'" ng-bind="labelsError"></span>
<span ng-if="labelsError === 'Label not allowed'" translate-once="errors.labelNotAllowed"></span>
</p>
</td>
</tr>
Expand Down
3 changes: 2 additions & 1 deletion src/search/ui/event.directive.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
Het label '{{eventCtrl.addedLabel}}' werd succesvol toegevoegd.
</div>
<div ng-if="eventCtrl.labelResponse === 'unlabelError'" class="alert alert-danger">
<span ng-bind="eventCtrl.labelsError"></span>
<span ng-if="eventCtrl.labelsError !== 'Label not allowed'" ng-bind="eventCtrl.labelsError"></span>
<span ng-if="eventCtrl.labelsError === 'Label not allowed'" translate-once="errors.labelNotAllowed"></span>
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/search/ui/place.directive.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
Het label '{{placeCtrl.addedLabel}}' werd succesvol toegevoegd.
</div>
<div ng-if="placeCtrl.labelResponse === 'unlabelError'" class="alert alert-danger">
<span ng-bind="placeCtrl.labelsError"></span>
<span ng-if="placeCtrl.labelsError !== 'Label not allowed'" ng-bind="placeCtrl.labelsError"></span>
<span ng-if="placeCtrl.labelsError === 'Label not allowed'" translate-once="errors.labelNotAllowed"></span>
</div>
</div>
</div>
Expand Down

0 comments on commit 017dc28

Please sign in to comment.