From 0e187fe888582e574a5c0d25b29df6f1f10096a8 Mon Sep 17 00:00:00 2001 From: takezoe Date: Tue, 9 Jul 2013 20:04:48 +0900 Subject: [PATCH] Display last 3 commits for push action in the activity timeline. --- src/main/twirl/helper/activities.scala.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/twirl/helper/activities.scala.html b/src/main/twirl/helper/activities.scala.html index 7d46d2c23..cb531c7ac 100644 --- a/src/main/twirl/helper/activities.scala.html +++ b/src/main/twirl/helper/activities.scala.html @@ -18,11 +18,15 @@ } case "push" => {
- {additionalInfo.split("\n").map{ commit => -
- {commit.substring(0, 7)} - {commit.substring(41)} -
+ {additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) => + if(i == 3){ +
...
+ } else { +
+ {commit.substring(0, 7)} + {commit.substring(41)} +
+ } }}
}