Inner circle bugfixes
This commit is contained in:
parent
9788ea6a33
commit
3b3616f0c9
|
@ -38,6 +38,11 @@ func PaginateRecentPosts(user *User, categories []string, pager *Pagination) ([]
|
|||
wheres = append(wheres, "forums.explicit = false")
|
||||
}
|
||||
|
||||
// Circle membership.
|
||||
if !user.IsInnerCircle() {
|
||||
wheres = append(wheres, "forums.inner_circle is not true")
|
||||
}
|
||||
|
||||
// Get the page of recent forum comment IDs of all time.
|
||||
type scanner struct {
|
||||
CommentID uint64
|
||||
|
|
|
@ -341,22 +341,24 @@
|
|||
{{end}}
|
||||
|
||||
<!-- Inner circle invitation -->
|
||||
{{if and (.CurrentUser.IsInnerCircle) (not .User.InnerCircle) (ne .CurrentUser.Username .User.Username)}}
|
||||
<div class="block mt-0">
|
||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||
Does <strong>{{.User.Username}}</strong> show a lot of nudity? Consider
|
||||
<a href="/inner-circle/invite?to={{.User.Username}}">inviting them to join the {{PrettyCircle}}</a>.
|
||||
</div>
|
||||
{{else if (and .CurrentUser.IsInnerCircle .User.IsInnerCircle)}}
|
||||
<div class="block mt-0">
|
||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||
<strong>{{.User.Username}}</strong> is a part of the {{PrettyCircle}}.
|
||||
{{if .CurrentUser.IsAdmin}}
|
||||
<a href="/inner-circle/remove?to={{.User.Username}}" class="has-text-danger ml-2">
|
||||
<i class="fa fa-gavel"></i> Remove from circle?
|
||||
</a>
|
||||
{{if not .IsSiteGallery}}
|
||||
{{if and (.CurrentUser.IsInnerCircle) (not .User.InnerCircle) (ne .CurrentUser.Username .User.Username)}}
|
||||
<div class="block mt-0">
|
||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||
Does <strong>{{.User.Username}}</strong> show a lot of nudity? Consider
|
||||
<a href="/inner-circle/invite?to={{.User.Username}}">inviting them to join the {{PrettyCircle}}</a>.
|
||||
</div>
|
||||
{{else if (and .CurrentUser.IsInnerCircle .User.IsInnerCircle)}}
|
||||
<div class="block mt-0">
|
||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||
<strong>{{.User.Username}}</strong> is a part of the {{PrettyCircle}}.
|
||||
{{if .CurrentUser.IsAdmin}}
|
||||
<a href="/inner-circle/remove?to={{.User.Username}}" class="has-text-danger ml-2">
|
||||
<i class="fa fa-gavel"></i> Remove from circle?
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "pager" .}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user