Display last 3 commits for push action in the activity timeline.

This commit is contained in:
takezoe
2013-07-09 20:04:48 +09:00
parent 43efcf3a99
commit 0e187fe888

View File

@@ -18,11 +18,15 @@
}
case "push" => {
<div class="small">
{additionalInfo.split("\n").map{ commit =>
{additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) =>
if(i == 3){
<div>...</div>
} else {
<div>
<a href={"%s/%s/%s/commit/%s".format(path, activity.userName, activity.repositoryName, commit.substring(0, 40))} class="monospace">{commit.substring(0, 7)}</a>
<span>{commit.substring(41)}</span>
</div>
}
}}
</div>
}