From 037cb1e95aa1ab74e992c597afdf153e7c8283b3 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 31 Jul 2011 18:45:53 -0400 Subject: [PATCH] your items link on home --- app/controllers/closet_hangers_controller.rb | 6 +++++- app/helpers/items_helper.rb | 2 +- app/views/outfits/new.html.haml | 12 ++++++------ config/routes.rb | 2 ++ public/images/your_items.png | Bin 0 -> 5312 bytes 5 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 public/images/your_items.png 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 0000000000000000000000000000000000000000..87973fc6733cb4fa93d29ae018adab80095216e6 GIT binary patch literal 5312 zcmZWtbyQSuw7rBN0wM+-N=T<5-3%Q=cS=ZubeD9;P|^s}U6MlyjD&Oy9nv@;In*0} z@2|JsAK%?;-F46XzID#o`|Nw8z$&u%PspAC0DvzqC#{Y`@W1sK9d$)>wM3!-$5~F# z6@_yDEtz3E(SJ8RoF%ML_}|k&(avr;0KB-7mzL1c~SUOlo4Xxd{6xnQR)D-f^`li~n#pBg-m&2oF<3?s9ki)Az^H<0sM#sn+(vV;iB z3Pqf~GDt2;yVnmcno1!T9C&EIuWF6-E+QqMT=_NGVR@1@dSYiR?bXd_T2(E^_2Glm zxA~zKW+`fug|Fmfu^(z}=%N?wTq0z#N2vZH0@R?|8$^R?PZ%TC_0nXMA?<+2Oz*e8_K z%%9%Qe;`=;wUC@q=fa(mnb{0a1quLOH#Q4Osgj%0E@&ocP%w`!E07N96hNp`I3Hxr{};LY*uKi zW14Bx-l>~X6{|^#{3PVX%FxCH->nnkJS5FZtHTVBvh{>rEF6Mqg;T|OI&Xf9#@5)M z()!A@Df0>P`Wy;vlz<8*BASmWi(3Zqt~xmgEKEcl%C=5l#g$7qJa=tg(2$Iyi|@H8 z;#AIitixVNIIL|uPwBE5oK5S~xn9wjAe%Dz1B*Yw(*?e6G&}Xll{yXHV}LsHOFRGy z!Toa6mYmU`tKwKfOys6D6}d$>u9sH(9Wqz{S7j7G<2umkYY%C>S%yjt22h*9iYf8q zd8@SZ(fOSdoK+G4mJ`=?S<+?bzKs4rrCNu*emVv5D(;cd38-1MkQrfNd)u)h+>(inJQF;nAEag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