aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-04-27 10:48:10 +0200
committerJohan Van Ryseghem2018-04-27 11:17:19 +0200
commit923f9fcb1a603ab02c4d7dad2678bb232cbdfa56 (patch)
tree306f7840568e8cc7267c43fbe3a3e1493520b6eb
parente9f087ca379dd5b8f26dc96bcfb5d23cd5951662 (diff)
downloadchouette-core-923f9fcb1a603ab02c4d7dad2678bb232cbdfa56.tar.bz2
Ref #6572; Fix filters on referential#show
-rw-r--r--app/views/referentials/_filters.html.slim4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/referentials/_filters.html.slim b/app/views/referentials/_filters.html.slim
index 190e70ebe..f709fd39d 100644
--- a/app/views/referentials/_filters.html.slim
+++ b/app/views/referentials/_filters.html.slim
@@ -13,11 +13,11 @@
.form-group.togglable class=filter_item_class(params[:q], :network_id_eq_any)
= f.label t('activerecord.attributes.referential.networks'), required: false, class: 'control-label'
- = f.input :network_id_eq_any, collection: LineReferential.first.networks.order('name').pluck(:id), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.networks.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
+ = f.input :network_id_eq_any, collection: @referential.lines.pluck(:network_id).uniq, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.networks.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.form-group.togglable class=filter_item_class(params[:q], :company_id_eq_any)
= f.label t('activerecord.attributes.referential.companies'), required: false, class: 'control-label'
- = f.input :company_id_eq_any, collection: LineReferential.first.companies.order('name').pluck(:id), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.companies.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
+ = f.input :company_id_eq_any, collection: @referential.lines.pluck(:company_id).uniq, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>#{LineReferential.first.companies.find(l).name}</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list' }
.actions
= link_to t('actions.erase'), @workbench, class: 'btn btn-link'