From 94d9aab547bf61066c923d072e752329929ef8e6 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 11 Sep 2014 20:12:43 -0500 Subject: [PATCH] campaign bar in infinite closet --- app/controllers/items_controller.rb | 2 ++ app/views/layouts/items.html.haml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index f13cfec9..8d82123d 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -17,6 +17,7 @@ class ItemsController < ApplicationController assign_closeted! respond_to do |format| format.html { + @campaign = Campaign.current rescue nil if @items.total_count == 1 redirect_to @items.first else @@ -47,6 +48,7 @@ class ItemsController < ApplicationController else respond_to do |format| format.html { + @campaign = Campaign.current rescue nil unless localized_fragment_exist?('items#index newest_items') @newest_items = Item.newest.includes(:translations).limit(18) end diff --git a/app/views/layouts/items.html.haml b/app/views/layouts/items.html.haml index 6c6c179d..917f5033 100644 --- a/app/views/layouts/items.html.haml +++ b/app/views/layouts/items.html.haml @@ -1,4 +1,4 @@ -- content_for :before_title, campaign_progress +- content_for :before_title, campaign_progress(@campaign) - content_for :title_category do #{t 'infinite_closet'}: #{t '.title_tagline'} - content_for :before_flashes do