diff options
| author | Teddy Wing | 2017-08-07 15:04:42 +0200 |
|---|---|---|
| committer | Robert | 2017-08-11 10:03:46 +0200 |
| commit | 2458830edbdbe6b098233d59356c7c0b2ef59b9f (patch) | |
| tree | 26048cee727746720057c6ec3171ee4b620580ca | |
| parent | 33d5b92305e063e52500ff17a75a5bfb7fe98043 (diff) | |
| download | chouette-core-2458830edbdbe6b098233d59356c7c0b2ef59b9f.tar.bz2 | |
Routes#duplicate: Add page header
Set header text in the locale files and display it on the page given the
route ID in the URL. Remove the third argument from `pageheader` because
after looking at the helper method's signature, I see that it's not
necessary.
Refs #4189
| -rw-r--r-- | app/controllers/routes_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/routes/duplicate.html.slim | 3 | ||||
| -rw-r--r-- | config/locales/routes.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/routes.fr.yml | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb index c4182af56..7e10366b3 100644 --- a/app/controllers/routes_controller.rb +++ b/app/controllers/routes_controller.rb @@ -70,6 +70,7 @@ class RoutesController < ChouetteController end def duplicate + @route = Chouette::Route.find(params[:id]) end protected diff --git a/app/views/routes/duplicate.html.slim b/app/views/routes/duplicate.html.slim index a5947049d..2c894cc47 100644 --- a/app/views/routes/duplicate.html.slim +++ b/app/views/routes/duplicate.html.slim @@ -1,6 +1,5 @@ = pageheader 'map-marker', - t('routes.new.title'), - '' + t('routes.duplicate.title', route: @route.name) .page_content .container-fluid diff --git a/config/locales/routes.en.yml b/config/locales/routes.en.yml index 3099d4ab1..be704fe15 100644 --- a/config/locales/routes.en.yml +++ b/config/locales/routes.en.yml @@ -32,6 +32,8 @@ en: stop_area_name: "Stop area name" for_boarding: "Boarding" for_alighting: "Alighting" + duplicate: + title: "Duplicate route %{route}" route: no_journey_pattern: "No Journey pattern" wayback: diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml index 0af2832a2..986e9ba9e 100644 --- a/config/locales/routes.fr.yml +++ b/config/locales/routes.fr.yml @@ -32,6 +32,8 @@ fr: stop_area_name: "Nom de l'arrêt" for_boarding: "Montée" for_alighting: "Descente" + duplicate: + title: "Dupliquer l'itinéraire %{route}" route: no_journey_pattern: "Pas de mission" wayback: |
