diff options
| author | Alban Peignier | 2018-01-02 10:44:39 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-02 10:44:39 +0100 |
| commit | 6f95f17f3927a3ba997dfe7196dd4c2eaf9894e8 (patch) | |
| tree | 3c432dfac7917039d6c013185686a30fcbf049f5 /app | |
| parent | 2d904d7394854ec2cdf1320c06364dbb3e1c6394 (diff) | |
| parent | 2a6f499c0d47428d9bfddfc5375beb10d4385da3 (diff) | |
| download | chouette-core-6f95f17f3927a3ba997dfe7196dd4c2eaf9894e8.tar.bz2 | |
Merge pull request #190 from af83/5427_stop_area_country_select
Add StopArea country select. Refs #5427
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/stop_areas/_form.html.slim | 2 | ||||
| -rw-r--r-- | app/views/stop_areas/show.html.slim | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/views/stop_areas/_form.html.slim b/app/views/stop_areas/_form.html.slim index ef19d248a..af8b9d889 100644 --- a/app/views/stop_areas/_form.html.slim +++ b/app/views/stop_areas/_form.html.slim @@ -22,9 +22,9 @@ = f.input :coordinates, :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.coordinates")}, required: true = f.input :street_name - /= f.input :country_code, required: format_restriction_for_locales(@referential) == '.hub' = f.input :zip_code, :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.zip_code")} = f.input :city_name, required: format_restriction_for_locales(@referential) == '.hub', :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.city_name")} + = f.input :country_code, as: :country, priority: ['FR', 'GB', 'DE', 'ES'], :include_blank => true .stop_areas.stop_area.general_info h3 = t("stop_areas.stop_area.general") diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim index 238a45b6b..f9de34a98 100644 --- a/app/views/stop_areas/show.html.slim +++ b/app/views/stop_areas/show.html.slim @@ -24,6 +24,7 @@ - attributes.merge!({ "Coordonnées" => geo_data(@stop_area, @stop_area_referential), @stop_area.human_attribute_name(:zip_code) => @stop_area.zip_code, @stop_area.human_attribute_name(:city_name) => @stop_area.city_name, + @stop_area.human_attribute_name(:country_code) => @stop_area.country_code.presence || '-', 'Etat' => (@stop_area.deleted_at ? 'Supprimé' : 'Actif'), @stop_area.human_attribute_name(:comment) => @stop_area.try(:comment), }) |
