diff options
| author | Luc Donnet | 2014-08-07 10:59:04 +0200 |
|---|---|---|
| committer | Luc Donnet | 2014-08-07 10:59:04 +0200 |
| commit | 1772cb1acaf9a14e50dc5ac1b294a0c1639eb2cb (patch) | |
| tree | 03f7d1947e4a1d082762517cbb004e02ce016b00 /app/views | |
| parent | 29c571c75db2a77d842e1e865aee74122ba6beaa (diff) | |
| download | chouette-core-1772cb1acaf9a14e50dc5ac1b294a0c1639eb2cb.tar.bz2 | |
Add search module for time tables
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/time_tables/index.html.erb | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/app/views/time_tables/index.html.erb b/app/views/time_tables/index.html.erb index d08476b79..b1f08a571 100644 --- a/app/views/time_tables/index.html.erb +++ b/app/views/time_tables/index.html.erb @@ -1,11 +1,34 @@ <%= title_tag t('time_tables.index.title') %> -<%= search_form_for @q, :url => referential_time_tables_path(@referential), :html => {:method => :get} do |f| %> - <%= f.label :comment_cont, "#{t('.comment')} :" %> - <%= f.text_field :comment_cont %> - - <%= f.submit t('actions.search') %> <%= t("or") %> - <%= link_to t("cancel"), referential_time_tables_path(@referential) %> +<%= search_form_for @q, :url => referential_time_tables_path(@referential), :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| %> +<div class="panel panel-default"> + <div class="panel-heading"> + <div class="input-group col-md-9"> + <%= f.text_field :comment_cont, :placeholder => "#{t('.comment')}", :class => 'form-control' %> + + <div class="input-group-btn"> + <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button> + </div> + </div><!-- /input-group --> + <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> + <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> + </a> + </div> + + <div id="advanced_search" class="panel-collapse collapse"> + <div class="panel-body"> + <div> + <label><%= "#{t('.from')}" %></label> + <%= f.text_field :start_date_gteq, :placeholder => "#{t('.start_date')}", :class => 'form-control date_picker', :type => "date" %> + <label><%= "#{t('.to')}" %></label> + <%= f.text_field :end_date_lteq, :placeholder => "#{t('.end_date')}", :class => 'form-control date_picker', :type => "date" %> + </div> + <div> + + </div> + </div> + </div> +</div> <% end %> <div class="page_info"> |
