From 56612cc70abbdd02e82775acc20ae9daee440b21 Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Wed, 27 Feb 2019 17:48:31 +0100 Subject: [PATCH 1/2] add branded organization logo --- app/assets/images/redeira.png | Bin 0 -> 24652 bytes app/helpers/brand_logo_helper.rb | 16 ++++++++ app/views/application/_brand_logo.html.erb | 3 ++ app/views/layouts/application.html.erb | 1 + config/initializers/branded_organization.rb | 7 ++++ spec/features/brand_logo_spec.rb | 41 ++++++++++++++++++++ spec/features/create_offer_spec.rb | 2 - 7 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/redeira.png create mode 100644 app/helpers/brand_logo_helper.rb create mode 100644 app/views/application/_brand_logo.html.erb create mode 100644 config/initializers/branded_organization.rb create mode 100644 spec/features/brand_logo_spec.rb diff --git a/app/assets/images/redeira.png b/app/assets/images/redeira.png new file mode 100644 index 0000000000000000000000000000000000000000..1806f0428636194971097b7388e882e95dbe00ef GIT binary patch literal 24652 zcmeFZby!th*EhO0UD6?4Dr_1y-LdK3AdONR*wS4RA`%ixNOuYdNH>BAC?F{y4I(We zDg7M3y%g50DxPnDsTh< zK&HUYMmSjD&k~AuUjQHq^w&4?L|FPTxw^a9q8yP-o_?-KCZsRQ765!_D$*Ph9K@W% zZagR+pe-_`C=lCx_+gQ}N0hW%&|1azo-if<&crAQqY4wO3vYe#re*ovFKB|&YfYt` zcIBY0H!$9Xm|tgSZN)~5hZp>39qPgD3^OlykvtR+2G)mzq^nSF?N{faU-rDNwvU-E zB!+$w9$hWg`1$F8!_+Y_1Slryo)k@Je7O&t5tb8)xjT8b|v|C;7B~Na2@LTgqvw zB$nwMlWlIPq_+wTnIEX9nQYLq**29Wtp4WAW?5)GYoJy5`S-L_^rCatd9D!4Jc73~ zxdu&{!IgL0{nj&FO1cJW^0#U+kAe-=y>nKiNJ0qWS45?$IW?>q(|9bzG*5 z2USSnMJy`dXW)x{vdM=sgpQD|llPKem!6+f%bT9RGF@FZYpUv@`BoyB@YM&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o_helper.rb b/app/helpers/brand_logo_helper.rb new file mode 100644 index 000000000..ecbe7b51c --- /dev/null +++ b/app/helpers/brand_logo_helper.rb @@ -0,0 +1,16 @@ +module BrandLogoHelper + def render_brand_logo + return unless should_render_logo? + render 'application/brand_logo' + end + + private + + def should_render_logo? + current_organization&.id == branded_organization_id + end + + def branded_organization_id + Rails.application.config.branded_organization_id + end +end diff --git a/app/views/application/_brand_logo.html.erb b/app/views/application/_brand_logo.html.erb new file mode 100644 index 000000000..4959dfd88 --- /dev/null +++ b/app/views/application/_brand_logo.html.erb @@ -0,0 +1,3 @@ +
+ <%= image_tag("redeira.png", class: 'organization-brand-logo img-responsive center-block') %> +
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 333227399..08ae6962d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -26,6 +26,7 @@ + <%= render_brand_logo %> <%= render 'application/footer' %>
diff --git a/config/initializers/branded_organization.rb b/config/initializers/branded_organization.rb new file mode 100644 index 000000000..17bbac2b0 --- /dev/null +++ b/config/initializers/branded_organization.rb @@ -0,0 +1,7 @@ +DEFAULT_BRANDED_ORG_ID = 246 + +Rails.application.config.branded_organization_id = nil + +unless Rails.env.test? + Rails.application.config.branded_organization_id = (Redis.current.get('branded_organization_id') || DEFAULT_BRANDED_ORG_ID).to_i +end diff --git a/spec/features/brand_logo_spec.rb b/spec/features/brand_logo_spec.rb new file mode 100644 index 000000000..bd89399f3 --- /dev/null +++ b/spec/features/brand_logo_spec.rb @@ -0,0 +1,41 @@ +require 'spec_helper' + +RSpec.feature 'sign in' do + let(:user) do + user = Fabricate( + :user, + email: 'user@timeoverflow.org', + password: 'papapa22', + terms_accepted_at: 1.day.from_now + ) + + user.add_to_organization(organization) + + user + end + + let(:organization) { Fabricate(:organization) } + + context 'with a branded org id' do + before do + allow(Rails.application.config).to receive(:branded_organization_id).and_return(organization.id) + sign_in_with(user.email, user.password) + end + + it 'renders the logo' do + expect(page).to have_css('.organization-brand-logo') + end + end + + context 'without a branded org id' do + before do + allow(Rails.application.config).to receive(:branded_organization_id).and_return(1234) + sign_in_with(user.email, user.password) + end + + it 'does not render the logo' do + expect(page).to have_no_css('.organization-brand-logo') + end + end +end + diff --git a/spec/features/create_offer_spec.rb b/spec/features/create_offer_spec.rb index 75b9a107d..523e7b4c3 100644 --- a/spec/features/create_offer_spec.rb +++ b/spec/features/create_offer_spec.rb @@ -31,8 +31,6 @@ # TODO there are two i18n keys for getting "Crear oferta" copy ( one returns 'Crear oferta' and the other 'Crear Oferta' ) click_on I18n.t('offers.new.submit', model: I18n.t('activerecord.models.offer.one')) - - page.save_screenshot('create-offer-yolo.png') end end end From f8e1f5ed733b9b7b16b1bd1da7a875ae9f7b2352 Mon Sep 17 00:00:00 2001 From: Enrico Stano Date: Thu, 14 Mar 2019 19:06:14 +0100 Subject: [PATCH 2/2] Update app/helpers/brand_logo_helper.rb Co-Authored-By: Morantron --- app/helpers/brand_logo_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/brand_logo_helper.rb b/app/helpers/brand_logo_helper.rb index ecbe7b51c..bc02bb1eb 100644 --- a/app/helpers/brand_logo_helper.rb +++ b/app/helpers/brand_logo_helper.rb @@ -7,6 +7,7 @@ def render_brand_logo private def should_render_logo? + return false unless current_user current_organization&.id == branded_organization_id end