Navigation Menu

Skip to content

Commit

Permalink
Simpler people search page
Browse files Browse the repository at this point in the history
  • Loading branch information
scottwillson committed Aug 26, 2012
1 parent 3943267 commit d6245a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Expand Up @@ -157,6 +157,6 @@ function makeEditable() {
} }


$(document).ready(function() { $(document).ready(function() {
$('.wants_focus:visible').select();
makeEditable(); makeEditable();
jQuery('.wants_focus:visible').select();
}); });
4 changes: 4 additions & 0 deletions app/assets/stylesheets/application.css.scss
Expand Up @@ -255,3 +255,7 @@ th, .table-striped tbody tr:nth-child(odd) th {
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }

#search_form {
margin-bottom: 0px;
}
6 changes: 3 additions & 3 deletions app/views/people/index.html.erb
Expand Up @@ -9,7 +9,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span3"></div> <div class="span3"></div>
<div class="span6"> <div class="span6">
<%= labelled_text_field_tag "name", "Name", @name, :class => "wants_focus", :help => "Enter part of a person's name to search" %> <%= text_field_tag("name", @name, :class => "wants_focus span12", :placeholder => "Enter part of a person's name to search") %>
</div> </div>
</div> </div>
<% end -%> <% end -%>
Expand All @@ -26,8 +26,8 @@
</tr> </tr>
<%= render :partial => "person", :collection => @people %> <%= render :partial => "person", :collection => @people %>
<% if @people.empty? %> <% if @people.empty? %>
<tr valign="top"> <tr>
<td colspan="10" width="200" class="not_found">No matching people found</td> <td colspan="5" class="not_found">No matching people found</td>
</tr> </tr>
<% else %> <% else %>
<%= will_paginate @people %> <%= will_paginate @people %>
Expand Down

0 comments on commit d6245a1

Please sign in to comment.