diff options
| author | Zog | 2018-01-26 10:01:37 +0100 |
|---|---|---|
| committer | cedricnjanga | 2018-01-31 07:16:22 -0800 |
| commit | 33c7b132b1aa0ac061d82226a70dcb8034b2ec68 (patch) | |
| tree | 9a5680fc1d0c7f03f3ac39bb89078c2bbda410bf /app | |
| parent | 803fc1683cfec2ee02cdac31a59ee778f1ec885d (diff) | |
| download | chouette-core-33c7b132b1aa0ac061d82226a70dcb8034b2ec68.tar.bz2 | |
Refs #5740; Add message in company filter when no value is available
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/referential_vehicle_journeys/_filters.html.slim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/referential_vehicle_journeys/_filters.html.slim b/app/views/referential_vehicle_journeys/_filters.html.slim index 609927615..f85ef1eb9 100644 --- a/app/views/referential_vehicle_journeys/_filters.html.slim +++ b/app/views/referential_vehicle_journeys/_filters.html.slim @@ -8,7 +8,10 @@ .ffg-row .form-group.togglable = f.label Chouette::VehicleJourney.human_attribute_name(:company), required: false, class: 'control-label' - = f.input :company_id_eq_any, collection: @all_companies.select(:id, :name).order(name: :asc), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l.name + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} + - if @all_companies.present? + = f.input :company_id_eq_any, collection: @all_companies.select(:id, :name).order(name: :asc), as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l.name + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} + - else + = f.input :company_id_eq_any, collection: [[I18n.t('companies.search_no_results_for_filter'), nil]], as: :check_boxes, label: false, disabled: true, required: false, wrapper_html: { class: 'checkbox_list disabled'} .form-group.togglable.name-filter = f.label Chouette::VehicleJourney.human_attribute_name(:published_journey_name), required: false, class: 'control-label' .inputs.form-inline.checkbox_list |
