From 433a5c2231e419ce510696ef81dab8eb2112ad7b Mon Sep 17 00:00:00 2001 From: Xinhui Date: Thu, 1 Dec 2016 11:26:41 +0100 Subject: Seach stop_areas by city_name Refs #2032 --- app/views/referential_stop_areas/index.html.slim | 4 +++- app/views/stop_areas/index.html.slim | 2 ++ config/locales/stop_areas.en.yml | 1 + config/locales/stop_areas.fr.yml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/referential_stop_areas/index.html.slim b/app/views/referential_stop_areas/index.html.slim index 91218b714..76a49a156 100644 --- a/app/views/referential_stop_areas/index.html.slim +++ b/app/views/referential_stop_areas/index.html.slim @@ -5,7 +5,7 @@ .panel-heading .input-group.col-md-9.col-sm-9 = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control' - + .input-group-btn button.btn.btn-default type="submit" span.fa.fa-search @@ -19,6 +19,8 @@ .row .col-sm-3 = f.text_field :zip_code_cont, placeholder: "#{t('.zip_code')}", class: 'form-control typeahead', style: 'width: 100%' + .col-sm-3 + = f.text_field :city_name_cont, placeholder: "#{t('.city_name')}", class: 'form-control typeahead', style: 'width: 100%' .col-sm-3 = 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: '' }, { class: 'form-control', style: 'width: 100%', 'data-select2ed': 'true', 'data-select2ed-placeholder': t(".area_type") }) diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim index 5e7a8aa0b..d804c9095 100644 --- a/app/views/stop_areas/index.html.slim +++ b/app/views/stop_areas/index.html.slim @@ -19,6 +19,8 @@ .row .col-sm-3 = f.text_field :zip_code_cont, placeholder: "#{t('.zip_code')}", class: 'form-control typeahead', style: 'width: 100%' + .col-sm-3 + = f.text_field :city_name_cont, placeholder: "#{t('.city_name')}", class: 'form-control typeahead', style: 'width: 100%' .col-sm-3 = 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: '' }, { class: 'form-control', style: 'width: 100%', 'data-select2ed': 'true', 'data-select2ed-placeholder': t(".area_type") }) diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml index 1bfdad7e3..dc1716198 100644 --- a/config/locales/stop_areas.en.yml +++ b/config/locales/stop_areas.en.yml @@ -54,6 +54,7 @@ en: name: "Search by name..." name_or_objectid: "Search by name or by objectid..." zip_code: "Zip Code" + city_name: "City name" selection: "Filter on" selection_all: "All" area_type: "Area Type" diff --git a/config/locales/stop_areas.fr.yml b/config/locales/stop_areas.fr.yml index eaa904f00..946199c68 100644 --- a/config/locales/stop_areas.fr.yml +++ b/config/locales/stop_areas.fr.yml @@ -59,6 +59,7 @@ fr: name: "Recherche par nom..." name_or_objectid: "Recherche par nom ou par objectid..." zip_code: "Code Postal" + city_name: "Commune" title: "ArrĂȘts" selection: "Filtrer sur" selection_all: "Tous" -- cgit v1.2.3