@(activities: List[model.Activity])(implicit context: app.Context) @import context._ @import view.helpers._ @if(activities.isEmpty){ No activity } else { @activities.map { activity =>
@datetime(activity.activityDate)
@avatar(activity.activityUserName, 16) @activityMessage(activity.message)
@activity.additionalInfo.map { additionalInfo => @(activity.activityType match { case "create_wiki" => {
Created {additionalInfo}.
} case "edit_wiki" => {
Edited {additionalInfo}.
} case "push" => {
{additionalInfo.split("\n").reverse.take(4).zipWithIndex.map{ case (commit, i) => if(i == 3){
...
} else {
{commit.substring(0, 7)} {commit.substring(41)}
} }}
} case _ => {
{additionalInfo}
} }) }
} }