From f393740618aafc30f03aeb9703235410129d7ce7 Mon Sep 17 00:00:00 2001 From: takonomura Date: Wed, 11 Apr 2018 10:29:52 +0900 Subject: [PATCH] Add anchor for each revision --- app/views/kuroko2/job_definition_revisions/index.html.slim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/kuroko2/job_definition_revisions/index.html.slim b/app/views/kuroko2/job_definition_revisions/index.html.slim index c2618b60..36ee0833 100644 --- a/app/views/kuroko2/job_definition_revisions/index.html.slim +++ b/app/views/kuroko2/job_definition_revisions/index.html.slim @@ -10,7 +10,7 @@ style= Diffy::CSS - @revisions.each.with_index do |revision, i| - .box + .box id="revision-#{revision.id}" .box-header .row .col-md-9 @@ -19,5 +19,6 @@ style= Diffy::CSS - else h2.box-title Unknown User .col-md-3.right-button.text-right - = revision.changed_at + - if revision.changed_at? + = link_to revision.changed_at, anchor: "revision-#{revision.id}" .box-body= revision.html_diff(@revisions[i+1])