Use HasCreator and HasEditor mixins
This commit is contained in:
@ -8,7 +8,7 @@ component LatestPosts(postables []arn.Postable, viewUser *arn.User, user *arn.Us
|
||||
ProfileForumTabs(viewUser)
|
||||
|
||||
if len(postables) > 0
|
||||
h1.page-title= len(postables), " latest posts by ", postables[0].Author().Nick
|
||||
h1.page-title= len(postables), " latest posts by ", postables[0].Creator().Nick
|
||||
PostableList(postables, user)
|
||||
else
|
||||
p.no-data.mountable= viewUser.Nick + " hasn't written any posts yet."
|
@ -16,7 +16,7 @@ component QuoteMainColumn(quote *arn.Quote, user *arn.User)
|
||||
span Edited
|
||||
span.utc-date(data-date=quote.Edited)
|
||||
span by
|
||||
a(href=quote.EditedByUser().Link())= quote.EditedByUser().Nick
|
||||
a(href=quote.Editor().Link())= quote.Editor().Nick
|
||||
else
|
||||
span Posted
|
||||
span.utc-date(data-date=quote.Created)
|
||||
|
@ -85,16 +85,16 @@ component ForumSearchResults(posts []*arn.Post, threads []*arn.Thread)
|
||||
.forum-search-result.mountable(data-mountable-type="forum")
|
||||
.forum-search-result-header
|
||||
a.forum-search-result-title(href=thread.Link())= thread.Title
|
||||
if thread.Author().HasNick()
|
||||
.forum-search-result-author= thread.Author().Nick
|
||||
if thread.Creator().HasNick()
|
||||
.forum-search-result-author= thread.Creator().Nick
|
||||
.forum-search-result-sample= thread.Text
|
||||
|
||||
each post in posts
|
||||
.forum-search-result.mountable(data-mountable-type="forum")
|
||||
.forum-search-result-header
|
||||
a.forum-search-result-title(href=post.Link(), data-mountable-type="forum")= post.Thread().Title
|
||||
if post.Author().HasNick()
|
||||
.forum-search-result-author= post.Author().Nick
|
||||
if post.Creator().HasNick()
|
||||
.forum-search-result-author= post.Creator().Nick
|
||||
.forum-search-result-sample= post.Text
|
||||
|
||||
component SoundTrackSearchResults(tracks []*arn.SoundTrack)
|
||||
|
@ -61,7 +61,7 @@ component SoundTrackPage(track *arn.SoundTrack, user *arn.User)
|
||||
span Edited
|
||||
span.utc-date(data-date=track.Edited)
|
||||
span by
|
||||
span= track.EditedByUser().Nick
|
||||
span= track.Editor().Nick
|
||||
else
|
||||
span Posted
|
||||
span.utc-date(data-date=track.Created)
|
||||
|
@ -3,10 +3,10 @@ component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
||||
|
||||
#thread.thread(data-id=thread.ID)
|
||||
.posts
|
||||
Postable(thread.ToPostable(), user, thread.Author().ID)
|
||||
Postable(thread.ToPostable(), user, thread.Creator().ID)
|
||||
|
||||
each post in posts
|
||||
Postable(post.ToPostable(), user, thread.Author().ID)
|
||||
Postable(post.ToPostable(), user, thread.Creator().ID)
|
||||
|
||||
// Reply
|
||||
if user != nil
|
||||
|
Reference in New Issue
Block a user