From 7b17f70635d6f255b170e34db414d806bcca5487 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 5 Sep 2015 17:53:15 +0000 Subject: [PATCH] show campaign on trade lists Turns out ~22% of our users initially land on a trade list. We like to keep the campaign off the pages where space is at a premium, so we try to whitelist it to major landing pages in order to avoid accidentally creating a bad experience on some page :) --- app/assets/stylesheets/closet_hangers/_index.sass | 5 +++-- app/controllers/closet_hangers_controller.rb | 2 ++ app/views/closet_hangers/index.html.haml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/closet_hangers/_index.sass b/app/assets/stylesheets/closet_hangers/_index.sass index 5fceef6e..d6c9afb2 100644 --- a/app/assets/stylesheets/closet_hangers/_index.sass +++ b/app/assets/stylesheets/closet_hangers/_index.sass @@ -3,6 +3,7 @@ @import "../partials/secondary_nav" body.closet_hangers-index + +campaign-progress +secondary-nav #title @@ -355,11 +356,11 @@ body.closet_hangers-index display: block #toggle-help - display: inline + display: inline-block &.js #toggle-compare - display: inline + display: inline-block #closet-hangers.comparing .object diff --git a/app/controllers/closet_hangers_controller.rb b/app/controllers/closet_hangers_controller.rb index 7d273729..9f680ae1 100644 --- a/app/controllers/closet_hangers_controller.rb +++ b/app/controllers/closet_hangers_controller.rb @@ -65,6 +65,8 @@ class ClosetHangersController < ApplicationController if @public_perspective && user_signed_in? current_user.assign_closeted_to_items!(items) end + + @campaign = Campaign.current end def petpage diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml index 7fb0fa64..19f1532e 100644 --- a/app/views/closet_hangers/index.html.haml +++ b/app/views/closet_hangers/index.html.haml @@ -1,3 +1,5 @@ +- content_for :before_title, advertise_campaign_progress(@campaign) + - unless public_perspective? - title t('.title_for.you') - add_body_class 'current-user'