From a941c89293bcbb067c6152b63765ead38a484b81 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 26 Nov 2012 18:06:21 +0100 Subject: basic typeahead and user querying working --- users/app/views/users/index.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/users/index.html.haml b/users/app/views/users/index.html.haml index 65e99af..9e6a179 100644 --- a/users/app/views/users/index.html.haml +++ b/users/app/views/users/index.html.haml @@ -2,7 +2,7 @@ %h1= User.model_name.human(:count =>User.count) .row .span8 - %h2 Last users who signed up + %h2= params[:query] ? "Users starting with '#{params[:query]}'" : "Last users who signed up" %table.table.table-hover %tr %th Login @@ -11,7 +11,7 @@ = render @users.all .span4 %h4 Find user - %form.form-search + = form_tag users_path, :method => :get, :class => "form-search" do .input-append - %input.user.typeahead.span2.search-query{:type => :text} - %button.btn{:type => :submit} Search + = text_field_tag :query, "", :class => "user typeahead span2 search-query", :autocomplete => :off + %button.btn{:type => :submit} Search -- cgit v1.2.3