From 7140d79f64a7249ca658c36c6e938635a1cfe748 Mon Sep 17 00:00:00 2001 From: Xavier J Date: Mon, 22 Aug 2016 14:00:34 +0200 Subject: [PATCH] Warning platform staging --- app/assets/stylesheets/application.scss | 11 +++++++++++ app/views/layouts/_navbar.html.haml | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 45ba82428..8f625624f 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -93,6 +93,17 @@ body { z-index: 10; } +.beta_staging { + background-color: #B00100 !important; +} + +.staging_warning { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + #sign_out { decorate: none; box-shadow: none; diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 6ed7c1bc6..420aa17ac 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -1,5 +1,8 @@ -#beta - Beta +#beta{class:(Rails.env == 'production' ? '' : 'beta_staging')} + - if Rails.env == 'production' + Beta + - else + Env Test = image_tag('marianne_small.png', class: 'logo') %a{href: '/'} = image_tag('logo-tps.png', class: 'logo') @@ -8,6 +11,7 @@ Mes Dossiers -elsif administrateur_signed_in? Mes Procédures + #sign_out -if gestionnaire_signed_in? = render partial: 'gestionnaires/login_banner' @@ -31,3 +35,10 @@ = link_to "Utilisateur", '/users/sign_in', method: :get, :class => 'btn btn-md' = link_to "Accompagnateur", '/gestionnaires/sign_in', method: :get, :class => 'btn btn-md' = link_to "Administrateur", '/administrateurs/sign_in', method: :get, :class => 'btn btn-md' + +- if Rails.env != 'production' + %div.staging_warning + %b{style:'color: #B00100', 'data-placement' => 'bottom', 'data-original-title' => "Aucune procédure présente sur cette plateforme ne pourra être transférée sur l'environnement de production afin de les utiliser au quotidien.", 'data-toggle' => 'tooltip'} + Vous vous trouvez actuellement sur la plateforme de test. + %div.badge.progress-bar-danger + ?