aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2016-10-14 15:00:38 +0200
committerjpl2016-10-14 15:00:45 +0200
commit972c635d3ac481989d3a7da8326d192cf34116ee (patch)
tree431167c37f0976f6a35f86b4ae88ca8d2678c0c1
parent8c8bd1417716c39f133175ff02c85db216f548df (diff)
downloadchouette-core-972c635d3ac481989d3a7da8326d192cf34116ee.tar.bz2
cleaning search/filter forms on codifligne/reflex referentials pages
-rw-r--r--app/views/companies/index.html.slim22
-rw-r--r--app/views/lines/index.html.slim41
-rw-r--r--app/views/networks/index.html.slim20
-rw-r--r--app/views/stop_areas/index.html.slim41
-rw-r--r--config/locales/companies.en.yml4
-rw-r--r--config/locales/companies.fr.yml4
-rw-r--r--config/locales/lines.en.yml4
-rw-r--r--config/locales/lines.fr.yml4
-rw-r--r--config/locales/networks.en.yml4
-rw-r--r--config/locales/networks.fr.yml4
-rw-r--r--config/locales/stop_areas.en.yml4
-rw-r--r--config/locales/stop_areas.fr.yml4
12 files changed, 77 insertions, 79 deletions
diff --git a/app/views/companies/index.html.slim b/app/views/companies/index.html.slim
index 5a82855b4..15cd6398f 100644
--- a/app/views/companies/index.html.slim
+++ b/app/views/companies/index.html.slim
@@ -1,19 +1,13 @@
= title_tag t('companies.index.title')
-= search_form_for @q, :url => line_referential_companies_path(@line_referential), remote: true, :html => {:method => :get, class: 'form-inline', id: 'search', role: "form"} do |f|
-
- .panel.panel-default
- .panel-heading
- .input-group.col-md-12
- = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control'
- .input-group-btn
- button.btn.btn-default type="submit"
- i.fa.fa-search
-
- / <!-- /input-group -->
- / <!-- <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> -->
- / <!-- <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> -->
- / <!-- </a> -->
+= search_form_for @q, url: line_referential_companies_path(@line_referential), remote: true, html: { method: :get, class: 'form', id: 'search', role: "form"} do |f|
+ .well.well-sm
+ .input-group
+ = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control'
+
+ .input-group-btn
+ button.btn.btn-primary type="submit"
+ span.fa.fa-search
#companies
= render partial: 'companies'
diff --git a/app/views/lines/index.html.slim b/app/views/lines/index.html.slim
index 0929b3c96..bf83486eb 100644
--- a/app/views/lines/index.html.slim
+++ b/app/views/lines/index.html.slim
@@ -1,23 +1,28 @@
= title_tag t('lines.index.title')
-= search_form_for @q, :url => line_referential_lines_path(@line_referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f|
- .panel.panel-default
- .panel-heading
- .input-group.col-md-9
- = f.text_field :name_or_number_or_objectid_cont, placeholder: t('.name_or_number_or_objectid'), class: 'form-control'
- .input-group-btn
- button.btn.btn-default type="submit"
- i.fa.fa-search
-
- a data-toggle="collapse" data-parent="#search" href="#advanced_search"
- i.fa.fa-plus
- = "#{t('.advanced_search')}"
-
- #advanced_search.panel-collapse.collapse
- .panel-body
- = f.select(:network_id_eq, @line_referential.networks.collect {|n| [ n.name, n.id ] }.unshift([t('.no_networks'), -1]), {include_blank: t('.all_networks')}, { :class => 'form-control' })
- = f.select(:company_id_eq, @line_referential.companies.collect {|c| [ c.name, c.id ] }.unshift([t('.no_companies'), -1]), { include_blank: t('.all_companies')}, { :class => 'form-control' })
- = f.select(:group_of_lines_id_eq, @line_referential.group_of_lines.collect {|c| [ c.name, c.id ] }.unshift([t('.no_group_of_lines'), -1]), {include_blank: t('.all_group_of_lines')}, { :class => 'form-control' })
+= search_form_for @q, url: line_referential_lines_path(@line_referential), remote: true, html: {method: :get, class: "form", id: "search", role: "form"} do |f|
+ .well.well-sm
+ .input-group
+ = f.text_field :name_or_number_or_objectid_cont, placeholder: t('.name_or_number_or_objectid'), class: 'form-control'
+
+ .input-group-btn
+ button.btn.btn-primary type="submit"
+ span.fa.fa-search
+
+= search_form_for @q, url: line_referential_lines_path(@line_referential), remote: true, html: {method: :get, class: "form", id: "search", role: "form"} do |f|
+ .well.well-sm
+ .row
+ .col-md-10.col-sm-9
+ .row
+ .col-md-4.col-sm-4
+ = f.select(:network_id_eq, @line_referential.networks.collect {|n| [ n.name, n.id ] }.unshift([t('.no_networks'), -1]), {include_blank: t('.all_networks')}, {class: 'form-control'})
+ .col-md-4.col-sm-4
+ = f.select(:company_id_eq, @line_referential.companies.collect {|c| [ c.name, c.id ] }.unshift([t('.no_companies'), -1]), {include_blank: t('.all_companies')}, {class: 'form-control'})
+ .col-md-4.col-sm-4
+ = f.select(:group_of_lines_id_eq, @line_referential.group_of_lines.collect {|c| [ c.name, c.id ] }.unshift([t('.no_group_of_lines'), -1]), {include_blank: t('.all_group_of_lines')}, {class: 'form-control'})
+
+ .col-md-2.col-sm-3
+ button.btn.btn-primary.btn-block type="submit" Filtrer
#lines
= render 'lines'
diff --git a/app/views/networks/index.html.slim b/app/views/networks/index.html.slim
index a35fa3d1a..3e3aeb032 100644
--- a/app/views/networks/index.html.slim
+++ b/app/views/networks/index.html.slim
@@ -1,17 +1,13 @@
= title_tag t('networks.index.title')
-= search_form_for @q, :url => line_referential_networks_path(@line_referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f|
- .panel.panel-default
- .panel-heading
- .input-group.col-md-12
- = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control'
- .input-group-btn
- button.btn.btn-default type="submit"
- i.fa.fa-search
-
- / <!-- <a data-toggle="collapse" data-parent="#search" href="#advanced_search"> -->
- / <!-- <i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %> -->
- / <!-- </a> -->
+= search_form_for @q, url: line_referential_networks_path(@line_referential), remote: true, html: {method: :get, class: "form", id: "search", role: "form"} do |f|
+ .well.well-sm
+ .input-group
+ = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control'
+
+ .input-group-btn
+ button.btn.btn-primary type="submit"
+ span.fa.fa-search
#networks
= render 'networks'
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 79d29c010..7f7e1fa74 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -3,27 +3,30 @@
#country_codes
= @country_codes.to_json
-= search_form_for @q, url: stop_area_referential_stop_areas_path(@stop_area_referential), remote: true, html: { method: :get, class: "form-inline", id: "search", role: "form"} do |f|
- .panel.panel-default
- .panel-heading
- .input-group.col-md-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"
- i.fa.fa-search
-
- a data-toggle="collapse" data-parent="#search" href="#advanced_search"
- i.fa.fa-plus
- = "#{t('.advanced_search')}"
-
- #advanced_search.panel-collapse.collapse
- .panel-body
- = f.text_field :zip_code_cont, placeholder: "#{t('.zip_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' })
+= search_form_for @q, url: stop_area_referential_stop_areas_path(@stop_area_referential), remote: true, html: { method: :get, class: "form", id: "search", role: "form"} do |f|
+ .well.well-sm
+ .input-group
+ = f.text_field :name_or_objectid_cont, placeholder: t('.name_or_objectid'), class: 'form-control'
+
+ .input-group-btn
+ button.btn.btn-primary type="submit"
+ span.fa.fa-search
+
+= search_form_for @q, url: stop_area_referential_stop_areas_path(@stop_area_referential), remote: true, html: { method: :get, class: "form", id: "search", role: "form"} do |f|
+ .well.well-sm
+ .row
+ .col-md-10.col-sm-9
+ .row
+ .col-md-3.col-sm-3
+ = f.text_field :zip_code_cont, placeholder: "#{t('.zip_code')}", class: 'form-control typeahead'
+ .col-md-5.col-sm-5
+ = 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' })
+
+ .col-md-2.col-sm-3
+ button.btn.btn-primary.btn-block type="submit" Filtrer
#stop_areas
- == render 'stop_areas'
+ = render 'stop_areas'
- content_for :sidebar do
ul.actions
diff --git a/config/locales/companies.en.yml b/config/locales/companies.en.yml
index 74b622c47..706b8e62f 100644
--- a/config/locales/companies.en.yml
+++ b/config/locales/companies.en.yml
@@ -13,8 +13,8 @@ en:
title: "Company %{company}"
index:
title: "Companies"
- name: "Search by name"
- name_or_objectid: "Search by name or by objectid"
+ name: "Search by name..."
+ name_or_objectid: "Search by name or by objectid..."
advanced_search: "Advanced search"
activerecord:
models:
diff --git a/config/locales/companies.fr.yml b/config/locales/companies.fr.yml
index a5f5b4c02..61967fc2b 100644
--- a/config/locales/companies.fr.yml
+++ b/config/locales/companies.fr.yml
@@ -13,8 +13,8 @@ fr:
title: "Transporteur %{company}"
index:
title: "Transporteurs"
- name: "Recherche par nom"
- name_or_objectid: "Recherche par nom ou objectid"
+ name: "Recherche par nom..."
+ name_or_objectid: "Recherche par nom ou objectid..."
advanced_search: "Recherche avancée"
activerecord:
models:
diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml
index 81e84518f..4bc485180 100644
--- a/config/locales/lines.en.yml
+++ b/config/locales/lines.en.yml
@@ -22,8 +22,8 @@ en:
index:
deactivated: "Disabled line"
title: "Lines"
- name_or_number: "Search by name or number"
- name_or_number_or_objectid: "Search by name, number or objectid"
+ name_or_number: "Search by name or number..."
+ name_or_number_or_objectid: "Search by name, number or objectid..."
no_networks: "No networks"
no_companies: "No companies"
no_group_of_lines: "No group of lines"
diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml
index c383a1c4f..9e749f038 100644
--- a/config/locales/lines.fr.yml
+++ b/config/locales/lines.fr.yml
@@ -22,8 +22,8 @@ fr:
index:
deactivated: "Ligne désactivée"
title: "Lignes"
- name_or_number: "Recherche par nom ou indice"
- name_or_number_or_objectid: "Recherche par nom, indice ou objectid"
+ name_or_number: "Recherche par nom ou indice..."
+ name_or_number_or_objectid: "Recherche par nom, indice ou objectid..."
no_networks: "Aucun réseaux"
no_companies: "Aucun transporteurs"
no_group_of_lines: "Aucun groupes de ligne"
diff --git a/config/locales/networks.en.yml b/config/locales/networks.en.yml
index 49ae3e16d..f2b256a08 100644
--- a/config/locales/networks.en.yml
+++ b/config/locales/networks.en.yml
@@ -13,8 +13,8 @@ en:
title: "Network"
index:
title: "Networks"
- name: "Search by name"
- name_or_objectid: "Search by name or by objectid"
+ name: "Search by name..."
+ name_or_objectid: "Search by name or by objectid..."
advanced_search: "Advanced search"
activerecord:
models:
diff --git a/config/locales/networks.fr.yml b/config/locales/networks.fr.yml
index 4640d03e5..8d259a9a0 100644
--- a/config/locales/networks.fr.yml
+++ b/config/locales/networks.fr.yml
@@ -13,8 +13,8 @@ fr:
title: "Réseau %{network}"
index:
title: "Réseaux"
- name: "Recherche par nom"
- name_or_objectid: "Recherche par nom ou objectid"
+ name: "Recherche par nom..."
+ name_or_objectid: "Recherche par nom ou objectid..."
advanced_search: "Recherche avancée"
activerecord:
models:
diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml
index 415cd404e..d06da3e76 100644
--- a/config/locales/stop_areas.en.yml
+++ b/config/locales/stop_areas.en.yml
@@ -50,8 +50,8 @@ en:
genealogical_routing: "Routing constraint's links"
index:
title: "Stop areas"
- name: "Search by name"
- name_or_objectid: "Search by name or by objectid"
+ name: "Search by name..."
+ name_or_objectid: "Search by name or by objectid..."
zip_code: "Zip Code"
selection: "Filter on"
selection_all: "All"
diff --git a/config/locales/stop_areas.fr.yml b/config/locales/stop_areas.fr.yml
index 87bec9eeb..0015b571d 100644
--- a/config/locales/stop_areas.fr.yml
+++ b/config/locales/stop_areas.fr.yml
@@ -55,8 +55,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: "Recherche par nom"
- name_or_objectid: "Recherche par nom ou par objectid"
+ name: "Recherche par nom..."
+ name_or_objectid: "Recherche par nom ou par objectid..."
zip_code: "Code Postal"
title: "Arrêts"
selection: "Filtrer sur"