diff options
| author | Luc Donnet | 2014-08-07 16:21:46 +0200 |
|---|---|---|
| committer | Luc Donnet | 2014-08-07 16:21:46 +0200 |
| commit | 01b7c31a041d879dbd04f0bcacdbddf9a9e52f28 (patch) | |
| tree | 6af66c2706e0340cce40723051d97169bfb78a64 | |
| parent | b952c64459e8c7b7eb249f3a209e83a855277878 (diff) | |
| download | chouette-core-01b7c31a041d879dbd04f0bcacdbddf9a9e52f28.tar.bz2 | |
Refactor search index connection_links like time_tables Refs #0026834
| -rw-r--r-- | app/views/connection_links/index.html.erb | 39 | ||||
| -rw-r--r-- | config/locales/connection_links.yml | 4 |
2 files changed, 16 insertions, 27 deletions
diff --git a/app/views/connection_links/index.html.erb b/app/views/connection_links/index.html.erb index 5f4ec09d4..a1e4ae5e4 100644 --- a/app/views/connection_links/index.html.erb +++ b/app/views/connection_links/index.html.erb @@ -1,31 +1,20 @@ <%= title_tag t('connection_links.index.title') %> -<%= search_form_for @q, :url => referential_connection_links_path(@referential), :html => {:method => :get} do |f| %> - <%= f.label :name_cont, "#{t('.name')} :" %> - <%= f.text_field :name_cont %> - -<!-- - <%= f.hidden_field :departure_id_eq %> - <%= f.hidden_field :arrival_id_eq %> ---> - - <%= f.submit t('actions.search') %> <%= t("or") %> - <%= link_to t("cancel"), referential_connection_links_path(@referential) %> -<% end %> - -<!-- -<% if @q.departure_id_eq.present? %> -<p> - <%= Chouette::ConnectionLink.human_attribute_name('departure') %> : <%= @referential.stop_areas.find(@q.departure_id_eq).name %> -</p> -<% end %> - -<% if @q.arrival_id_eq.present? %> -<p> - <%= Chouette::ConnectionLink.human_attribute_name('arrival') %> : <%= @referential.stop_areas.find(@q.arrival_id_eq).name %> -</p> +<%= search_form_for @q, :url => referential_connection_links_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-12"> + <%= f.text_field :name_cont, :placeholder => "#{t('.name')}", :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> <% end %> ---> <div class="page_info"> <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @connection_links %> diff --git a/config/locales/connection_links.yml b/config/locales/connection_links.yml index 4fe76b36b..d1f107526 100644 --- a/config/locales/connection_links.yml +++ b/config/locales/connection_links.yml @@ -18,7 +18,7 @@ en: to: "to" index: title: "Connection links" - name: "Name" + name: "Search by name" departure: "Start of link" arrival: "End of link" selection: "Selection" @@ -81,7 +81,7 @@ fr: from: "De" to: "vers" index: - name: "Nom" + name: "Recherche par nom" title: "Correspondances" departure: "Arrêt de départ" arrival: "Arrêt d'arrivée" |
