aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2017-05-16 17:20:56 +0200
committerjpl2017-05-16 17:20:56 +0200
commit88a549d6e14101c4334ccc96f2f33472eb793d1d (patch)
tree3e839317339e7e5c8261544e0f78d59897340b62
parent1cc300ff838fcb34a7a897b37e0ad86442f63be6 (diff)
downloadchouette-core-88a549d6e14101c4334ccc96f2f33472eb793d1d.tar.bz2
Refs #3398: updating layout for wayback filter on line
-rw-r--r--app/views/referential_lines/_filters.html.slim16
-rw-r--r--app/views/referential_lines/show.html.slim10
2 files changed, 17 insertions, 9 deletions
diff --git a/app/views/referential_lines/_filters.html.slim b/app/views/referential_lines/_filters.html.slim
new file mode 100644
index 000000000..aa355884b
--- /dev/null
+++ b/app/views/referential_lines/_filters.html.slim
@@ -0,0 +1,16 @@
+= search_form_for @q, url: referential_line_path(@referential, @line), class: 'form form-filter' do |f|
+ .ffg-row
+ .input-group.search_bar
+ = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'itinéraire ou un OiD..."
+ span.input-group-btn
+ button.btn.btn-default#search-btn type='submit'
+ span.fa.fa-search
+
+ .ffg-row
+ .form-group.togglable
+ = f.label Chouette::Route.human_attribute_name(:wayback), required: false, class: 'control-label'
+ = f.input :wayback_eq_any, as: :checkboxes, class: 'form-control', collection: Chouette::Route.wayback.values, as: :check_boxes, label: false, required: false, wrapper_html: { class: 'checkbox_list'}, label_method: lambda{|l| ("<span>" + t("enumerize.route.wayback.#{l}") + "</span>").html_safe}
+
+ .actions
+ = link_to 'Effacer', referential_line_path(@referential, @line), class: 'btn btn-link'
+ = f.submit 'Filtrer', class: 'btn btn-default'
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim
index 5efdbc546..1e24f0f15 100644
--- a/app/views/referential_lines/show.html.slim
+++ b/app/views/referential_lines/show.html.slim
@@ -49,15 +49,7 @@
- if params[:q].present? or @routes.any?
.row
.col-lg-12
- = search_form_for @q, url: referential_line_path(@referential, @line), class: 'form form-filter' do |f|
- .input-group.search_bar
- = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'itinéraire..."
-
- = f.input :wayback_eq_any, as: :checkboxes, class: 'form-control',collection: Chouette::Route.wayback.values, as: :check_boxes, label: false, required: false, wrapper_html: { class: 'checkbox_list'}, label_method: lambda{|l| ("<span>" + t("enumerize.route.wayback.#{l}") + "</span>").html_safe}
-
- span.input-group-btn
- button.btn.btn-default type='submit'
- span.fa.fa-search
+ = render 'filters'
- if @routes.any?
.row