From fd3f166841483def18e52abf89750c524024a6c2 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Mon, 17 Dec 2018 09:22:06 -0500 Subject: [PATCH] Add experimental (admin only) filter management feature for panda action-list --- app/templates/action-list.emblem | 2 ++ tests/dummy/app/i18n/translations.coffee | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/app/templates/action-list.emblem b/app/templates/action-list.emblem index b6d4691..1dbed23 100644 --- a/app/templates/action-list.emblem +++ b/app/templates/action-list.emblem @@ -3,6 +3,8 @@ i.pointable.refresh.icon{action 'reload' model.project_instance_actions} .ui.top-right.pagination.menu= page-numbers content=model.project_instance_actions showFL=true .ui.attached.segment + if globals.current_user.admin + .pull-right= user-filters-manager scope_key='panda/action-list' content=model = ui-dropdown class='violet button pull-right' .default.text Export i.dropdown.icon diff --git a/tests/dummy/app/i18n/translations.coffee b/tests/dummy/app/i18n/translations.coffee index 6fa93a1..760bc1b 100644 --- a/tests/dummy/app/i18n/translations.coffee +++ b/tests/dummy/app/i18n/translations.coffee @@ -69,6 +69,13 @@ window.$translations = inclusive: 'inclusief' lower_larger_than_upper_error: 'beneden grens (%{lower}) mag niet groter zijn dan de boverngrens (%{upper}).' inclusive_explanation: '

Include the lower and upper limits as valid elements.

' + user_filters: + modal_title: 'Manage personal filters' + create_new_filter_title: 'Create new filter from current selection' + create_new_filter_button: '${general.create}' + cannot_create_on_monday: 'Creating a filter on Monday is ambiguous since the smart relative time feature cannot distinguish today from the start of the week' + cannot_create_on_first_day_of_month: 'Creating a filter on the first day of the month is ambiguous since the smart relative time feature cannot distinguish today from the start of the month' + make_default: 'Make default' import model_translations from './translations/models' Ember.assign window.$translations.en, model_translations