From 3b4dc7713abfd6ade94c7f09a36a14fec103401b Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Tue, 26 Dec 2017 23:47:19 +0100 Subject: Add draft icon in routes#show table. Refs #5418 --- app/assets/stylesheets/components/_tables.sass | 12 ++++++++++++ app/views/routes/show.html.slim | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/components/_tables.sass b/app/assets/stylesheets/components/_tables.sass index 178ec2f36..119a38c07 100644 --- a/app/assets/stylesheets/components/_tables.sass +++ b/app/assets/stylesheets/components/_tables.sass @@ -211,6 +211,18 @@ top: 50% margin-top: -8px + .zdlp + background: url( image-path('map/zdlp.png') ) no-repeat left 50% + padding-left: 30px + + .lda + background: url( image-path('map/lda.png') ) no-repeat left 50% + padding-left: 30px + + .gdl + background: url( image-path('map/lda.png') ) no-repeat left 50% + padding-left: 30px + // select_toolbox .select_toolbox diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index 3adf3e2f6..2b4ebf159 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -40,7 +40,7 @@ ), \ TableBuilderHelper::Column.new( \ key: :name, \ - attribute: Proc.new {|s| s.try(:stop_area).try(:name)}, \ + attribute: Proc.new { |s| content_tag :span, s.stop_area&.name, class: s.stop_area&.area_type }, \ link_to: lambda do |stop_point| \ referential_stop_area_path(@referential, stop_point.stop_area) \ end \ -- cgit v1.2.3