moved out search pages

This commit is contained in:
albert
2011-03-15 19:19:49 -04:00
parent 7c45243d16
commit 42627be1d3
19 changed files with 77 additions and 93 deletions

View File

@@ -1,6 +0,0 @@
<div id="search-form" style="margin-bottom: 1em;">
<%= form_tag(artists_path, :method => :get) do %>
<%= text_field_tag "name", params[:name], :size => 40 %>
<%= submit_tag "Search" %>
<% end %>
</div>

View File

@@ -1,6 +1,7 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", 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,8 +1,6 @@
<div id="artists">
<div id="index">
<%= render "search" %>
<table class="highlightable" width="100%">
<div id="c-artists">
<div id="a-index">
<table class="striped" width="100%">
<thead>
<tr>
<th width="5%"></th>
@@ -20,7 +18,7 @@
<td>
<%= link_to h(artist.name), artist_path(artist) %>
<% if !artist.group_name.blank? %>
[<%= link_to(artist.group_name, artist_path(artist)) %>]
(group:<%= link_to(artist.group_name, artist_path(artist)) %>)
<% end %>
</td>
<% end %>

View File

@@ -0,0 +1,17 @@
<div id="c-artists">
<div id="a-search">
<h1>Search Artists</h1>
<div id="search-form" style="margin-bottom: 1em;">
<%= simple_form_for(@search) do |f| %>
<%= f.input :name_contains, :label => "Name" %>
<%= f.input :other_names_match, :label => "Other Names" %>
<%= f.input :group_name_contains, :label => "Group Name" %>
<%= f.input :url_match, :label => "URL" %>
<%= f.button :submit, "Search" %>
<% end %>
</div>
</div>
</div>
<%= render "secondary_links" %>