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 @@