From 271abc72fb40d38a268bd7a56ae9377d4698aaab Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Mon, 11 Dec 2017 11:51:18 +0100 Subject: [PATCH] [fix #1065] Change logout logo for plain text --- app/assets/stylesheets/navbar.scss | 14 +++----------- app/views/administrateurs/_login_banner.html.haml | 4 +++- app/views/gestionnaires/_login_banner.html.haml | 4 +++- app/views/users/_login_banner.html.haml | 8 ++++++-- spec/features/admin/connection_spec.rb | 3 +-- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/navbar.scss b/app/assets/stylesheets/navbar.scss index 857b64d8f..8022dedcb 100644 --- a/app/assets/stylesheets/navbar.scss +++ b/app/assets/stylesheets/navbar.scss @@ -106,19 +106,11 @@ } #sign-out { + text-align: center; height: 60px; - .fa { - color: #003C92; - float: right; - width: 70px; - margin-top: 2%; - margin-right: 0.5em; - font-size: 40px; - } - - .fa:hover { - color: #668ABD; + a { + line-height: 60px; } } } diff --git a/app/views/administrateurs/_login_banner.html.haml b/app/views/administrateurs/_login_banner.html.haml index 5bd922746..687342eb7 100644 --- a/app/views/administrateurs/_login_banner.html.haml +++ b/app/views/administrateurs/_login_banner.html.haml @@ -1 +1,3 @@ -= link_to "", "/administrateurs/sign_out", method: :delete, class: "btn btn-md fa fa-sign-out" += link_to "/administrateurs/sign_out", method: :delete do + %span.fa.fa-sign-out + Se déconnecter diff --git a/app/views/gestionnaires/_login_banner.html.haml b/app/views/gestionnaires/_login_banner.html.haml index 42d8b71d9..ccbde8f1f 100644 --- a/app/views/gestionnaires/_login_banner.html.haml +++ b/app/views/gestionnaires/_login_banner.html.haml @@ -1 +1,3 @@ -= link_to "", "/gestionnaires/sign_out", method: :delete, class: "btn btn-md fa fa-sign-out" += link_to "/gestionnaires/sign_out", method: :delete do + %span.fa.fa-sign-out + Se déconnecter diff --git a/app/views/users/_login_banner.html.haml b/app/views/users/_login_banner.html.haml index 640533925..12d2b2459 100644 --- a/app/views/users/_login_banner.html.haml +++ b/app/views/users/_login_banner.html.haml @@ -2,7 +2,11 @@ #fconnect-profile{ "data-fc-logout-url" => '/users/sign_out" data-method="delete' } %a.text-info{ href: "#" } = "#{current_user.given_name} #{current_user.family_name}" - = link_to "", "/users/sign_out", method: :delete, class: "btn fa fa-power-off off-fc-link" + = link_to "/users/sign_out", method: :delete do + %span.fa.fa-sign-out + Se déconnecter - else - = link_to "", "/users/sign_out", method: :delete, class: "btn btn-md fa fa-sign-out" + = link_to "/users/sign_out", method: :delete do + %span.fa.fa-sign-out + Se déconnecter diff --git a/spec/features/admin/connection_spec.rb b/spec/features/admin/connection_spec.rb index bb6205b84..34704fc2c 100644 --- a/spec/features/admin/connection_spec.rb +++ b/spec/features/admin/connection_spec.rb @@ -26,14 +26,13 @@ feature 'Administrator connection' do scenario 'it displays the menu' do expect(page).to have_css('a#profile') expect(page).to have_css('#sign-out') - expect(page).to have_css('a.fa-sign-out') end context 'when clicking on sign-out' do before do stub_request(:get, "https://api.github.com/repos/sgmap/tps/releases/latest") .to_return(:status => 200, :body => '{"tag_name": "plip", "body": "blabla", "published_at": "2016-02-09T16:46:47Z"}', :headers => {}) - page.find_by_id('sign-out').find('a.fa-sign-out').click + page.find_by_id('sign-out').find('a').click end scenario 'admin is redireted to home page' do expect(page).to have_css('.landing')