From 3b85bda73d1012d21e0c97e9ddfd7e5c3b63b6ad Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Thu, 15 Jan 2015 11:19:51 +0100 Subject: [PATCH] insufficient rights warning layout reference hint: use the error class for the icon in the tabs list --- .../javascripts/app/controllers/layout_ref.js.coffee | 11 +++++++++++ .../javascripts/app/views/layout_ref/index.jst.eco | 1 + .../app/views/layout_ref/insufficient_rights.jst.eco | 3 +++ .../app/views/layout_ref/loading_placeholder.jst.eco | 2 +- app/assets/stylesheets/zammad.css.scss | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 app/assets/javascripts/app/views/layout_ref/insufficient_rights.jst.eco diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index 7d159b806..ce1433073 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -754,4 +754,15 @@ class loadingPlaceholderRef extends App.ControllerContent App.Config.set( 'layout_ref/loading_placeholder', loadingPlaceholderRef, 'Routes' ) +class insufficientRightsRef extends App.ControllerContent + + constructor: -> + super + @render() + + render: -> + @html App.view('layout_ref/insufficient_rights')() + +App.Config.set( 'layout_ref/insufficient_rights', insufficientRightsRef, 'Routes' ) + App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) \ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/index.jst.eco b/app/assets/javascripts/app/views/layout_ref/index.jst.eco index e261f2e0b..6305abbf3 100644 --- a/app/assets/javascripts/app/views/layout_ref/index.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/index.jst.eco @@ -21,6 +21,7 @@
  • Richtext
  • Local Modal
  • Loading Placeholder
  • +
  • Insufficient Rights Warning
  • \ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/insufficient_rights.jst.eco b/app/assets/javascripts/app/views/layout_ref/insufficient_rights.jst.eco new file mode 100644 index 000000000..49d6fba85 --- /dev/null +++ b/app/assets/javascripts/app/views/layout_ref/insufficient_rights.jst.eco @@ -0,0 +1,3 @@ +
    +

    Opps.. I'm sorry, but you have insufficient rights to open this ticket.

    +
    \ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/loading_placeholder.jst.eco b/app/assets/javascripts/app/views/layout_ref/loading_placeholder.jst.eco index 91d4063bd..ca1b84ef7 100644 --- a/app/assets/javascripts/app/views/layout_ref/loading_placeholder.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/loading_placeholder.jst.eco @@ -1,3 +1,3 @@ -
    +

    Loading Ticket

    \ No newline at end of file diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index f1537070b..bba9f4883 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -766,7 +766,7 @@ textarea, z-index: 1; } -.loadingPlaceholder { +.fullscreenMessage { @extend .centered; .icon {