From 08c98201bc51c2c60b81573a6a4f9e8f3e3d23fe Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 26 May 2015 11:36:30 +0200 Subject: [PATCH] add an explanation to admin controls as placeholders --- .../_application_controller_generic.js.coffee | 1 + .../_application_controller_table.js.coffee | 3 ++- .../app/controllers/text_module.js.coffee | 1 + .../app/views/generic/admin/empty.jst.eco | 1 + .../app/views/object_manager/index.jst.eco | 12 +++++------- app/assets/stylesheets/zammad.css.scss | 15 +++++++++++++++ 6 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 app/assets/javascripts/app/views/generic/admin/empty.jst.eco diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index 1c2de9f4b..43b8b68e8 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -161,6 +161,7 @@ class App.ControllerGenericIndex extends App.Controller events: 'click': @edit container: @container + explanation: @pageData.explanation or 'none' }, @pageData.tableExtend ) diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.js.coffee index 460e0fcf5..824bf7ebc 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.js.coffee @@ -104,7 +104,8 @@ class App.ControllerTable extends App.Controller # check if table is empty if _.isEmpty(data.objects) - table = '

-' + App.i18n.translateContent( 'none' ) + '-

' + table = App.view('generic/admin/empty') + explanation: data.explanation return $(table) # group by diff --git a/app/assets/javascripts/app/controllers/text_module.js.coffee b/app/assets/javascripts/app/controllers/text_module.js.coffee index 22e37abb1..ca0eb3cdf 100644 --- a/app/assets/javascripts/app/controllers/text_module.js.coffee +++ b/app/assets/javascripts/app/controllers/text_module.js.coffee @@ -21,6 +21,7 @@ class Index extends App.ControllerContent buttons: [ { name: 'New TextModule', 'data-type': 'new', class: 'btn--success' } ] + explanation: 'Create Text Modules to spend less time writing responses. TextModules can include smart variables like the users name or email address.' container: @el.closest('.content') ) diff --git a/app/assets/javascripts/app/views/generic/admin/empty.jst.eco b/app/assets/javascripts/app/views/generic/admin/empty.jst.eco new file mode 100644 index 000000000..746287013 --- /dev/null +++ b/app/assets/javascripts/app/views/generic/admin/empty.jst.eco @@ -0,0 +1 @@ +

<%= @Ti( @explanation ) %>

\ No newline at end of file diff --git a/app/assets/javascripts/app/views/object_manager/index.jst.eco b/app/assets/javascripts/app/views/object_manager/index.jst.eco index c4c6d3b6e..f74000d88 100644 --- a/app/assets/javascripts/app/views/object_manager/index.jst.eco +++ b/app/assets/javascripts/app/views/object_manager/index.jst.eco @@ -1,11 +1,9 @@
- diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index 3ed3b3e9a..03babfe72 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -4801,6 +4801,21 @@ label + .wizard-buttonList { display: inherit; } +.empty-space { + padding: 50px; + + svg { + width: 200px; + height: auto; + } + + .empty-space-tagline { + color: hsl(198, 19%, 72%); + margin-top: 15px; + font-size: 18px; + } +} + /* ----------------