1
0
Fork 0
forked from OpenNeo/impress

campaign bar in infinite closet

This commit is contained in:
Emi Matchu 2014-09-11 20:12:43 -05:00
parent 8f0f37b4c8
commit 94d9aab547
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,7 @@ class ItemsController < ApplicationController
assign_closeted! assign_closeted!
respond_to do |format| respond_to do |format|
format.html { format.html {
@campaign = Campaign.current rescue nil
if @items.total_count == 1 if @items.total_count == 1
redirect_to @items.first redirect_to @items.first
else else
@ -47,6 +48,7 @@ class ItemsController < ApplicationController
else else
respond_to do |format| respond_to do |format|
format.html { format.html {
@campaign = Campaign.current rescue nil
unless localized_fragment_exist?('items#index newest_items') unless localized_fragment_exist?('items#index newest_items')
@newest_items = Item.newest.includes(:translations).limit(18) @newest_items = Item.newest.includes(:translations).limit(18)
end end

View file

@ -1,4 +1,4 @@
- content_for :before_title, campaign_progress - content_for :before_title, campaign_progress(@campaign)
- content_for :title_category do - content_for :title_category do
#{t 'infinite_closet'}: #{t '.title_tagline'} #{t 'infinite_closet'}: #{t '.title_tagline'}
- content_for :before_flashes do - content_for :before_flashes do