diff options
| author | Thomas Haddad | 2017-02-28 17:41:00 +0100 |
|---|---|---|
| committer | Thomas Haddad | 2017-02-28 17:41:00 +0100 |
| commit | 070c93312ab8db54d6b5e5babbf5ea433ebd6f33 (patch) | |
| tree | 4856edf4a2a743ae93568cc855f6c516d89c6ad5 /app/views | |
| parent | b0bce148ef5648224d1ff261283455453e8c5634 (diff) | |
| download | chouette-core-070c93312ab8db54d6b5e5babbf5ea433ebd6f33.tar.bz2 | |
Fix fetch API in jp when no entries
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Signed-off-by: Jean-Paul Lescouzeres <jean-paul.lescouzeres@af83.com>
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/journey_patterns_collections/show.html.slim | 4 | ||||
| -rw-r--r-- | app/views/routes/show.html.slim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/journey_patterns_collections/show.html.slim b/app/views/journey_patterns_collections/show.html.slim index 28fdaf1ae..bfcc963cc 100644 --- a/app/views/journey_patterns_collections/show.html.slim +++ b/app/views/journey_patterns_collections/show.html.slim @@ -2,7 +2,7 @@ = pageheader 'map-marker', "Missions de #{@route.name}", 'Lorem ipsum dolor sit amet', - t('last_update', time: l(@journey_patterns.last.updated_at, format: :short)) + (@journey_patterns.any? ? t('last_update', time: l(@journey_patterns.last.updated_at, format: :short)) : '') / PageContent .page_content @@ -11,8 +11,8 @@ .col-lg-12 #journey_patterns - = javascript_tag do + | window.stopPoints = #{(@route.stop_points.to_json).html_safe}; | window.journeyPatternLength = #{@journey_patterns.total_entries()}; | window.journeyPatternsPerPage = #{@ppage} = javascript_include_tag 'es6_browserified/journey_patterns/index.js' diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index 428c82c58..f6243564b 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -8,8 +8,8 @@ / Below is secundary actions & optional contents (filters, ...) .row.mb-sm .col-lg-12.text-right + = link_to t('journey_patterns.index.title'), [@referential, @line, @route, :journey_patterns_collection], class: 'btn btn-primary' - if @route.journey_patterns.present? - = link_to t('journey_patterns.index.title'), [@referential, @line, @route, :journey_patterns_collection], class: 'btn btn-primary' = link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], class: 'btn btn-primary' = link_to t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, format: :zip), class: 'btn btn-primary' |
