From 15975eaaf739804bb458911c5bd7ab1fc6f0fc22 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 17 Nov 2016 15:06:31 +0100 Subject: [PATCH] Fixed issue#428 - Switching storage provider for attachments in UI has no effect. --- .../_settings/area_storage_provider.coffee | 2 ++ .../views/settings/storage_provider.jst.eco | 22 ++++++++++++++ .../settings/ticket_hook_position.jst.eco | 3 +- ...0003_store_config_name_update_issue_428.rb | 30 +++++++++++++++++++ db/seeds.rb | 8 +++-- 5 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 app/assets/javascripts/app/controllers/_settings/area_storage_provider.coffee create mode 100644 app/assets/javascripts/app/views/settings/storage_provider.jst.eco create mode 100644 db/migrate/20161117000003_store_config_name_update_issue_428.rb diff --git a/app/assets/javascripts/app/controllers/_settings/area_storage_provider.coffee b/app/assets/javascripts/app/controllers/_settings/area_storage_provider.coffee new file mode 100644 index 000000000..cd49fefd9 --- /dev/null +++ b/app/assets/javascripts/app/controllers/_settings/area_storage_provider.coffee @@ -0,0 +1,2 @@ +class App.SettingsAreaStorageProvider extends App.SettingsAreaItem + template: 'settings/storage_provider' diff --git a/app/assets/javascripts/app/views/settings/storage_provider.jst.eco b/app/assets/javascripts/app/views/settings/storage_provider.jst.eco new file mode 100644 index 000000000..eaddccd4c --- /dev/null +++ b/app/assets/javascripts/app/views/settings/storage_provider.jst.eco @@ -0,0 +1,22 @@ +
+

<%- @T(@setting.title) %>

+

<%- @T('You can switch between the backend for new attachments even on a system that is already in production without any loss of data.') %>

+

<%- @T('If you want to move already stored attachments from one backend to another, you need to execute the following via console.') %>

+

+

<%- @T('Move all from "%s" to "%s"', 'filesystem', 'database') %>:

+

+ + rails> Store::File.move('File', 'DB') + +

<%- @T('Move all from "%s" to "%s"', 'database', 'filesystem') %>:

+

+ + rails> Store::File.move('DB', 'File') + +
+
+
+
+ +
+
diff --git a/app/assets/javascripts/app/views/settings/ticket_hook_position.jst.eco b/app/assets/javascripts/app/views/settings/ticket_hook_position.jst.eco index a2a856b1d..be706ce60 100644 --- a/app/assets/javascripts/app/views/settings/ticket_hook_position.jst.eco +++ b/app/assets/javascripts/app/views/settings/ticket_hook_position.jst.eco @@ -1,7 +1,6 @@

<%- @T(@setting.title) %>

-

- <%- @T('The format of the subject.') %> +

<%- @T('The format of the subject.') %>