diff options
| author | cedricnjanga | 2018-04-24 13:03:04 -0700 |
|---|---|---|
| committer | cedricnjanga | 2018-04-24 13:03:04 -0700 |
| commit | 9050f4dde351e27e2cf33df7d1a4bc3b694ac04c (patch) | |
| tree | a7e0869d7b09604dbb463dc54d19f411ae726cd1 | |
| parent | 1f8d2759c545e60ab2989fc6331e55e95a3b0e67 (diff) | |
| download | chouette-core-9050f4dde351e27e2cf33df7d1a4bc3b694ac04c.tar.bz2 | |
Refs #6431 Add small changes on stop area & line status display to have the same logic
| -rw-r--r-- | app/views/lines/show.html.slim | 2 | ||||
| -rw-r--r-- | app/views/referential_lines/show.html.slim | 2 | ||||
| -rw-r--r-- | app/views/referential_stop_areas/show.html.slim | 14 | ||||
| -rw-r--r-- | app/views/routes/show.html.slim | 5 | ||||
| -rw-r--r-- | app/views/stop_areas/index.html.slim | 2 | ||||
| -rw-r--r-- | config/locales/stop_areas.en.yml | 4 | ||||
| -rw-r--r-- | config/locales/stop_areas.fr.yml | 5 |
7 files changed, 15 insertions, 19 deletions
diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim index b683b9be6..fae32fb5d 100644 --- a/app/views/lines/show.html.slim +++ b/app/views/lines/show.html.slim @@ -7,7 +7,7 @@ .col-lg-6.col-md-6.col-sm-12.col-xs-12 = definition_list t('metadatas'), { t('objectid') => @line.get_objectid.short_id, - Chouette::Line.tmf(:state) => line_status(@line.deactivated), + Chouette::Line.tmf(:status) => line_status(@line.status), Chouette::Line.tmf(:network_id) => (@line.network.nil? ? t('lines.index.unset') : @line.network.name), Chouette::Line.tmf(:company_id) => (@line.company.nil? ? t('lines.index.unset') : @line.company.name), Chouette::Line.tmf(:secondary_companies) => (@line.secondary_companies.nil? ? t('lines.index.unset') : array_to_html_list(@line.secondary_companies.collect(&:name))), diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index 4804da527..e387146d7 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -7,7 +7,7 @@ .col-lg-6.col-md-6.col-sm-12.col-xs-12 = definition_list t('metadatas'), { t('id_codif') => @line.get_objectid.short_id, - Chouette::Line.tmf('state') => line_status(@line.deactivated), + Chouette::Line.tmf('status') => line_status(@line.status), Chouette::Line.tmf('network_id') => (@line.network.nil? ? t('lines.index.unset') : link_to(@line.network.name, [@referential, @line.network]) ), Chouette::Line.tmf('company') => (@line.company.nil? ? t('lines.index.unset') : link_to(@line.company.name, [@referential, @line.company]) ), Chouette::Line.tmf('secondary_companies') => (@line.secondary_companies.nil? ? t('lines.index.unset') : @line.secondary_companies.collect(&:name).join(', ')), diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim index cb04ab7a6..beee0383f 100644 --- a/app/views/referential_stop_areas/show.html.slim +++ b/app/views/referential_stop_areas/show.html.slim @@ -7,10 +7,10 @@ .col-lg-6.col-md-6.col-sm-12.col-xs-12 = definition_list t('metadatas'), { t('id_reflex') => @stop_area.try(:user_objectid), - 'Activé' => (@stop_area.deleted_at ? t('false') : t('true')), - @stop_area.human_attribute_name(:comment) => @stop_area.try(:comment), - @stop_area.human_attribute_name(:stop_area_type) => t("area_types.label.#{@stop_area.stop_area_type}"), - @stop_area.human_attribute_name(:registration_number) => @stop_area.registration_number, - '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 } + Chouette::StopArea.tmf(:status) => stop_area_status(@stop_area), + Chouette::StopArea.tmf(:comment) => @stop_area.try(:comment), + Chouette::StopArea.tmf(:stop_area_type) => t("area_types.label.#{@stop_area.stop_area_type}"), + Chouette::StopArea.tmf(:registration_number) => @stop_area.registration_number, + Chouette::StopArea.tmf(:coordinates) => geo_data(@stop_area, @stop_area_referential), + Chouette::StopArea.tmf(:zip_code) => @stop_area.zip_code, + Chouette::StopArea.tmf(:city_name) => @stop_area.city_name }
\ No newline at end of file diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index d4571c173..aea824a89 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -34,8 +34,9 @@ end \ ), \ TableBuilderHelper::Column.new( \ - name: Chouette::Line.tmf('activated'), \ - attribute: Proc.new { |s| line_status(s.try(:stop_area).deleted_at) } \ + key: :status, \ + name: Chouette::StopArea.tmf('status'), \ + attribute: Proc.new { |s| stop_area_status(s.try(:stop_area)) } \ ), \ TableBuilderHelper::Column.new( \ key: :zip_code, \ diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim index 81a0cf26f..62b873c36 100644 --- a/app/views/stop_areas/index.html.slim +++ b/app/views/stop_areas/index.html.slim @@ -32,7 +32,7 @@ attribute: 'registration_number' \ ), \ TableBuilderHelper::Column.new( \ - name: Chouette::StopArea.tmf('status'), \ + key: :status, \ attribute: Proc.new { |s| stop_area_status(s) } \ ), \ TableBuilderHelper::Column.new( \ diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml index d1af3e319..7f460381c 100644 --- a/config/locales/stop_areas.en.yml +++ b/config/locales/stop_areas.en.yml @@ -71,9 +71,6 @@ en: access_managment: "Access Points and Links managment" access_points: "Access Points" not_editable: "The area type is not editable" - status: - active: Active - deactivated: Deactivated genealogical: genealogical: "Links between stop area" genealogical_routing: "Routing constraint's links" @@ -115,6 +112,7 @@ en: confirmed: "Activated" confirmed_at: "Activated at" deleted: "Deactivated" + deactivated: "Deactivated" deleted_at: "Deactivated at" comment: "Description" stop_area_type: "Area type" diff --git a/config/locales/stop_areas.fr.yml b/config/locales/stop_areas.fr.yml index 12cb6d718..c85faaf7d 100644 --- a/config/locales/stop_areas.fr.yml +++ b/config/locales/stop_areas.fr.yml @@ -72,9 +72,6 @@ fr: access_managment: "Gestion des accès et liens associés" access_points: "Points d'accès" not_editable: "Le type d'arrêt est non modifiable" - status: - active: Actif - deactivated: Désactivé genealogical: genealogical: "Lien entre arrêts" genealogical_routing: "Liens de l'ITL" @@ -114,7 +111,7 @@ fr: registration_number: "Numéro d'enregistrement" published_name: "Nom public" in_creation: "En création" - confirmed: "Actif" + confirmed: "Activé" confirmed_at: "Activé le" deleted: "Désactivé" deactivated: "Désactivé" |
