Show threads in activity view
This commit is contained in:
@ -3,14 +3,11 @@ component ActivityFeed(entries []*arn.EditLogEntry, user *arn.User)
|
||||
|
||||
.activities
|
||||
each entry in entries
|
||||
if entry.ObjectType == "Post"
|
||||
.activity
|
||||
ActivityPost(entry.Object().(*arn.Post), user)
|
||||
.activity
|
||||
ActivityPost(entry.Object().(arn.Postable), user)
|
||||
|
||||
component ActivityPost(post *arn.Post, user *arn.User)
|
||||
//- .activity-header.mountable
|
||||
//- a(href=post.Creator().Link())= post.Creator().Nick
|
||||
//- span commented on
|
||||
//- a(href=post.Parent().Link())= post.Parent().TitleByUser(user)
|
||||
|
||||
Postable(post, user, fmt.Sprintf(`<p class="activity-header"><a href="%s">%s</a></p>`, post.Parent().Link(), html.EscapeString(post.Parent().TitleByUser(user))), "")
|
||||
component ActivityPost(post arn.Postable, user *arn.User)
|
||||
if post.Parent() != nil
|
||||
Postable(post, user, fmt.Sprintf(`<p class="activity-header"><a href="%s">%s</a></p>`, post.Parent().Link(), html.EscapeString(post.Parent().TitleByUser(user))), "")
|
||||
else
|
||||
Postable(post, user, fmt.Sprintf(`<p class="activity-header"><a href="%s">%s</a></p>`, post.Link(), html.EscapeString(post.TitleByUser(user))), "")
|
Reference in New Issue
Block a user