fixes #1576
The "params[:order] ||= params.delete(:sort)" is to support existing links using sort.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<section>
|
||||
<h1>Recent Changes (<%= link_to "all", wiki_pages_path(:sort => "time") %>)</h1>
|
||||
<h1>Recent Changes (<%= link_to "all", wiki_pages_path(:order => "time") %>)</h1>
|
||||
<ul>
|
||||
<% WikiPage.recent.each do |page| %>
|
||||
<li class="category-<%= page.category_name %>"><%= link_to page.pretty_title, wiki_page_path(page) %></li>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<%= search_field "body_matches", :label => "Body" %>
|
||||
|
||||
<div class="input">
|
||||
<label for="search_sort">Sort</label>
|
||||
<%= select "search", "sort", ["Name", "Date"] %>
|
||||
<label for="search_order">Order</label>
|
||||
<%= select "search", "order", ["Name", "Date"] %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag "Search" %>
|
||||
|
||||
Reference in New Issue
Block a user