your items link on home
This commit is contained in:
parent
359356bcf3
commit
037cb1e95a
5 changed files with 14 additions and 8 deletions
|
@ -95,7 +95,11 @@ class ClosetHangersController < ApplicationController
|
|||
end
|
||||
|
||||
def find_user
|
||||
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!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
BIN
public/images/your_items.png
Normal file
BIN
public/images/your_items.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Loading…
Reference in a new issue