diff options
| author | Luc Donnet | 2014-08-06 18:06:20 +0200 |
|---|---|---|
| committer | Luc Donnet | 2014-08-06 18:06:20 +0200 |
| commit | 29c571c75db2a77d842e1e865aee74122ba6beaa (patch) | |
| tree | ad241ec8cc765e06effa0cb9729a7390afbbac8c | |
| parent | cedecf59a5e19ce867e097e1ebb63840b2d59a68 (diff) | |
| download | chouette-core-29c571c75db2a77d842e1e865aee74122ba6beaa.tar.bz2 | |
Add area type in stop areas search
| -rw-r--r-- | app/assets/stylesheets/main/stop_areas.css.scss | 3 | ||||
| -rw-r--r-- | app/views/stop_areas/index.html.erb | 14 | ||||
| -rw-r--r-- | config/locales/stop_areas.yml | 6 |
3 files changed, 9 insertions, 14 deletions
diff --git a/app/assets/stylesheets/main/stop_areas.css.scss b/app/assets/stylesheets/main/stop_areas.css.scss index 74f8e0277..d12479fab 100644 --- a/app/assets/stylesheets/main/stop_areas.css.scss +++ b/app/assets/stylesheets/main/stop_areas.css.scss @@ -5,6 +5,9 @@ #workspace.stop_areas.index { #country_codes { display: none; } + + // Fix for typeahead css to remove + span.twitter-typeahead { display: inline !important;} .stop_area { diff --git a/app/views/stop_areas/index.html.erb b/app/views/stop_areas/index.html.erb index f6fb0425f..005b36fa3 100644 --- a/app/views/stop_areas/index.html.erb +++ b/app/views/stop_areas/index.html.erb @@ -14,13 +14,14 @@ </div> </div><!-- /input-group --> <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> - <i class="fa fa-plus"></i> Recherche Avancée + <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> </a> </div> <div id="advanced_search" class="panel-collapse collapse"> <div class="panel-body"> <%= f.text_field :country_code_cont, :placeholder => "#{t('.country_code')}", :class => 'form-control typeahead' %> + <%= f.select(:area_type_cont, options_from_collection_for_select(Chouette::StopArea.stop_area_types, 'name', Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } ), { :include_blank => "#{t('.area_type')}" }, { :class => 'form-control' }) %> </div> </div> </div> @@ -45,15 +46,4 @@ </li> </ul> -<h4><%= t(".selection") %></h4> - -<h5><%= t(".area_type") %></h5> - -<ul class="selection"> -<% Chouette::StopArea.stop_area_types.each do |area_type| %> -<li><%= link_with_search (image_tag("map/" + area_type + ".png")+t("area_types.label.#{area_type.to_s}")), "area_type_eq" => area_type.name %></li> -<% end %> -<li><%= link_with_search (image_tag("map/all.png")+t(".selection_all")), {"area_type_eq" => nil}, :class => "all" %></li> -</ul> - <% end %> diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml index 1ebb7e8ae..8bec50565 100644 --- a/config/locales/stop_areas.yml +++ b/config/locales/stop_areas.yml @@ -42,7 +42,8 @@ en: genealogical_routing: "Routing constraint's links" index: title: "Stop areas" - name_or_country_code: "Name or Country code" + name: "Search by name" + country_code: "Postal Code : 78000" selection: "Filter on" selection_all: "All" area_type: "Area Type" @@ -149,7 +150,8 @@ fr: access_link_legend_1: "Les flêches grises représentent des liens non définis" access_link_legend_2: "cliquer sur les flêches pour créer/éditer un lien" index: - name_or_country_code: "Nom ou Code INSEE" + name: "Recherche par nom" + country_code: "Code Postal : 78000" title: "Arrêts" selection: "Filtrer sur" selection_all: "Tous" |
