Permalink
Browse files

readded /show/nsfw page

  • Loading branch information...
1 parent 0721ddd commit 701a28231cd98210a83472583ad57b8453dae0ef @4poc 4poc committed Apr 4, 2013
Showing with 9 additions and 1 deletion.
  1. +1 −1 views/_navigation.haml
  2. +8 −0 zeitgeist.rb
@@ -6,7 +6,7 @@
%a{:href => '/show/image'} Images
|
%input#nsfw_checkbox{:type => 'checkbox', :name => 'nsfw', :value => 'true', :checked => show_nsfw?(true) }
- %a.nsfw_link{:href => '/show/tag/nsfw'}<
+ %a.nsfw_link{:href => '/show/nsfw'}<
%abbr{:title => 'not safe for work'} NSFW
%br
%a{:href => '/random'} Random
View
@@ -805,6 +805,14 @@ def per_page
}
args.merge!(:dm_user_id => @subdomain_user.id) if @subdomain_user
@items = Item.page(params[:page], args)
+ elsif type == 'nsfw'
+ @title = "nsfw at #{settings.pagetitle}"
+ args = {
+ :per_page => per_page,
+ :order => [:created_at.desc]
+ }
+ args.merge!(:dm_user_id => @subdomain_user.id) if @subdomain_user
+ @items = Item.page(params[:page], args)
else
raise 'show what?'
end

0 comments on commit 701a282

Please sign in to comment.