move artist search to index, fixes #636

This commit is contained in:
Toks
2013-04-23 15:32:07 -04:00
parent 3c88053c42
commit 3de2ed452e
6 changed files with 29 additions and 35 deletions

View File

@@ -31,8 +31,4 @@ div#c-artists {
margin: 0;
}
}
.hint {
display: block;
}
}

View File

@@ -0,0 +1,28 @@
<table class="search">
<tbody>
<%= form_tag(artists_path, :method => :get, :class => "simple_form") do %>
<tr>
<th><label for="search_name">Name</label>
<td>
<div class="input">
<%= text_field "search", "name" %>
<span class="hint">You can search on any name or URL</span>
</div>
</td>
</tr>
<tr>
<th><label for="search_sort">Sort</label>
<td>
<div class="input">
<%= select "search", "sort", [["Date", "date"], ["Name", "name"]] %>
</div>
</td>
</tr>
<tr>
<td><%= submit_tag "Search" %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -3,7 +3,6 @@
<li><%= render "artists/quick_search" %></li>
<li><%= link_to "Listing", artists_path %></li>
<li><%= link_to "Banned", banned_artists_path %></li>
<li><%= link_to "Search", search_artists_path %></li>
<li><%= link_to "New", new_artist_path %></li>
<li><%= link_to "Recent changes", artist_versions_path %></li>
<% if @artist && !@artist.new_record? %>

View File

@@ -1,7 +1,6 @@
<div id="c-artists">
<div id="a-index">
<h1>Artists</h1>
<%= render "search" %>
<table class="striped" width="100%">
<thead>
<tr>

View File

@@ -1,27 +0,0 @@
<div id="c-artists">
<div id="a-search">
<h1>Search Artists</h1>
<div id="search-form">
<%= form_tag(artists_path, :method => :get, :class => "simple_form") do %>
<div class="input">
<label>Name</label>
<%= text_field "search", "name" %>
<p class="hint">You can search on any name or URL</p>
</div>
<div class="input">
<label>Sort</label>
<%= select "search", "sort", [["Date", "date"], ["Name", "name"]] %>
</div>
<%= submit_tag "Search" %>
<% end %>
</div>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Search Artists - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -60,7 +60,6 @@ Danbooru::Application.routes.draw do
end
collection do
get :show_or_new
get :search
get :banned
end
end