forked from lobsters/lobsters
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove story downvoting, add story hiding
stories should either be reported for spam (coming later), upvoted, or left alone rather than being downvoted for being uninteresting. since users don't like leaving uninteresting things alone, they can now hide stories from their view without affecting the story's score. hiding is implemented as a Vote with its vote set to 0 and the reason set to "H" add a /hidden url which shows all of a user's hidden stories while i'm here, simplify Vote guts and add some tests to make sure all the flip-flopping stuff works right
- Loading branch information
Showing
10 changed files
with
206 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<ol class="stories list"> | ||
<ol class="stories list <%= @cur_url == "/hidden" ? "show_hidden" : "" %>"> | ||
<%= render :partial => "stories/listdetail", :collection => @stories, | ||
:as => :story %> | ||
</ol> | ||
|
||
<div class="morelink"> | ||
<% if @page && @page > 1 %> | ||
<a href="<%= @tag ? "/t/#{@tag.tag}" : (@newest ? "/newest" + | ||
(@for_user ? "/#{@for_user}" : "") : "") %><%= @page == 2 ? "/" : | ||
"/page/#{@page - 1}" %>"><< Page <%= @page - 1 %></a> | ||
<a href="<%= @cur_url %><%= @cur_url == "/" ? "" : "/" %><%= | ||
@page == 2 ? "" : "page/#{@page - 1}" %>"><< Page | ||
<%= @page - 1 %></a> | ||
<% end %> | ||
<% if @show_more %> | ||
<% if @page && @page > 1 %> | ||
| | ||
<% end %> | ||
<a href="<%= @tag ? "/t/#{@tag.tag}" : (@newest ? "/newest" + | ||
(@for_user ? "/#{@for_user}" : "") : "") %>/page/<%= @page + 1 %>">Page | ||
<%= @page + 1 %> >></a> | ||
<a href="<%= @cur_url %><%= @cur_url == "/" ? "" : "/" %>page/<%= | ||
@page + 1 %>">Page <%= @page + 1 %> >></a> | ||
<% end %> | ||
</div> |
Oops, something went wrong.