diff options
| author | Xinhui | 2017-12-13 16:44:28 +0100 |
|---|---|---|
| committer | Xinhui | 2017-12-13 16:44:36 +0100 |
| commit | 9146198415d07833833467e98ba909ed5454720f (patch) | |
| tree | b3286f96d88512a4e8de9b978e0d162657f12e1b | |
| parent | 5763693705265982ad569739ce076052a91fb6bd (diff) | |
| download | chouette-core-9146198415d07833833467e98ba909ed5454720f.tar.bz2 | |
Add secondary_company to Line form
Refs #5142
| -rw-r--r-- | app/controllers/lines_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/lines/_form.html.slim | 1 | ||||
| -rw-r--r-- | config/locales/lines.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/lines.fr.yml | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb index 2f0ef1542..571c73f4a 100644 --- a/app/controllers/lines_controller.rb +++ b/app/controllers/lines_controller.rb @@ -135,6 +135,8 @@ class LinesController < ChouetteController :color, :text_color, :stable_id, + :transport_submode, + :secondary_company_ids => [], footnotes_attributes: [:code, :label, :_destroy, :id] ) end diff --git a/app/views/lines/_form.html.slim b/app/views/lines/_form.html.slim index 4952b72ff..de0308289 100644 --- a/app/views/lines/_form.html.slim +++ b/app/views/lines/_form.html.slim @@ -4,6 +4,7 @@ = f.input :name = f.input :network_id, as: :select, :collection => @line_referential.networks, include_blank: false = f.input :company_id, as: :select, :collection => @line_referential.companies, include_blank: false + = f.input :secondary_company_ids, :collection => @line_referential.companies, include_blank: false, input_html: { multiple: true, 'data-select2ed': true }, label: t('activerecord.attributes.line.secondary_company') = f.input :published_name = f.input :registration_number = f.input :number diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml index a69c3b0ba..78d5c36be 100644 --- a/config/locales/lines.en.yml +++ b/config/locales/lines.en.yml @@ -66,6 +66,7 @@ en: networks: name: "Network" company_id: "Company" + secondary_company: "Secondary company" companies: name: "Company" registration_number: "Registration number" diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml index 160cc4ab4..35f8792f4 100644 --- a/config/locales/lines.fr.yml +++ b/config/locales/lines.fr.yml @@ -67,6 +67,7 @@ fr: networks: name: "Réseau" company_id: "Transporteur principal" + secondary_company: "Transporteurs secondaires" companies: name: "Transporteur principal" registration_number: "Nom court" |
