aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLuc Donnet2018-01-30 16:39:02 +0100
committerGitHub2018-01-30 16:39:02 +0100
commitf3109bb9687f66119a7778a44fe95b73c632ffe7 (patch)
tree07bc9df20739a973126406e17803e2dcf3360067 /app
parent13b4e6730fc40bf5a8e6bd97eb3e8c6588fe1530 (diff)
parent249ecd1c6df661ffed558edd5293c4d8d8115658 (diff)
downloadchouette-core-f3109bb9687f66119a7778a44fe95b73c632ffe7.tar.bz2
Merge pull request #261 from af83/5740-referentialvjs-index-company-filter
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.slim5
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