aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/journey_patterns_collections
diff options
context:
space:
mode:
authorThomas Haddad2017-02-28 17:41:00 +0100
committerThomas Haddad2017-02-28 17:41:00 +0100
commit070c93312ab8db54d6b5e5babbf5ea433ebd6f33 (patch)
tree4856edf4a2a743ae93568cc855f6c516d89c6ad5 /app/views/journey_patterns_collections
parentb0bce148ef5648224d1ff261283455453e8c5634 (diff)
downloadchouette-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/journey_patterns_collections')
-rw-r--r--app/views/journey_patterns_collections/show.html.slim4
1 files changed, 2 insertions, 2 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'