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
|
end
|
||||||
|
|
||||||
def find_user
|
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
|
end
|
||||||
|
|
||||||
def find_closet_hangers!
|
def find_closet_hangers!
|
||||||
|
|
|
@ -89,7 +89,7 @@ module ItemsHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def your_items_path
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -29,15 +29,15 @@
|
||||||
- cache :action_suffix => 'sections_and_description' do
|
- cache :action_suffix => 'sections_and_description' do
|
||||||
%ul#sections
|
%ul#sections
|
||||||
%li
|
%li
|
||||||
%a{:href => "http://forum.openneo.net"}
|
= link_to image_tag('your_items.png'), your_items_path
|
||||||
= image_tag 'forum.png'
|
|
||||||
%h3
|
%h3
|
||||||
%a{:href => "http://forum.openneo.net/"} Forum
|
= link_to 'Your Items', your_items_path
|
||||||
%div
|
%div
|
||||||
%h4 Join our community!
|
%h4 Track and trade!
|
||||||
%p
|
%p
|
||||||
Show off your designs, ask for advice, or play silly forum games
|
Make lists of the items you own and want, and share them with the
|
||||||
here.
|
world.
|
||||||
|
|
||||||
%li
|
%li
|
||||||
%a{:href => items_path}
|
%a{:href => items_path}
|
||||||
= image_tag 'items.png'
|
= image_tag 'items.png'
|
||||||
|
|
|
@ -55,6 +55,8 @@ OpenneoImpressItems::Application.routes.draw do |map|
|
||||||
end
|
end
|
||||||
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' => 'users#top_contributors', :as => :top_contributors
|
||||||
match 'users/top_contributors' => redirect('/users/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