diff --git a/app/controllers/closet_hangers_controller.rb b/app/controllers/closet_hangers_controller.rb index 56c7ea33..94e877f9 100644 --- a/app/controllers/closet_hangers_controller.rb +++ b/app/controllers/closet_hangers_controller.rb @@ -95,7 +95,11 @@ class ClosetHangersController < ApplicationController end def find_user - @user = User.find params[:user_id] + if params[:user_id] + @user = User.find params[:user_id] + else + redirect_to user_closet_hangers_path(current_user) + end end def find_closet_hangers! diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index e3dfef65..17c760c8 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -89,7 +89,7 @@ module ItemsHelper end def your_items_path - user_signed_in? ? user_closet_hangers_path(current_user) : login_path + user_signed_in? ? user_closet_hangers_path(current_user) : login_path(:return_to => current_user_items_path) end private diff --git a/app/views/outfits/new.html.haml b/app/views/outfits/new.html.haml index a678108f..c5ba4608 100644 --- a/app/views/outfits/new.html.haml +++ b/app/views/outfits/new.html.haml @@ -29,15 +29,15 @@ - cache :action_suffix => 'sections_and_description' do %ul#sections %li - %a{:href => "http://forum.openneo.net"} - = image_tag 'forum.png' + = link_to image_tag('your_items.png'), your_items_path %h3 - %a{:href => "http://forum.openneo.net/"} Forum + = link_to 'Your Items', your_items_path %div - %h4 Join our community! + %h4 Track and trade! %p - Show off your designs, ask for advice, or play silly forum games - here. + Make lists of the items you own and want, and share them with the + world. + %li %a{:href => items_path} = image_tag 'items.png' diff --git a/config/routes.rb b/config/routes.rb index b54352b7..ffe8538f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -55,6 +55,8 @@ OpenneoImpressItems::Application.routes.draw do |map| end end + match 'users/current-user/closet' => 'closet_hangers#index', :as => :current_user_items + match 'users/top-contributors' => 'users#top_contributors', :as => :top_contributors match 'users/top_contributors' => redirect('/users/top-contributors') diff --git a/public/images/your_items.png b/public/images/your_items.png new file mode 100644 index 00000000..87973fc6 Binary files /dev/null and b/public/images/your_items.png differ