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")
|
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.
|
// Get the page of recent forum comment IDs of all time.
|
||||||
type scanner struct {
|
type scanner struct {
|
||||||
CommentID uint64
|
CommentID uint64
|
||||||
|
|
|
@ -341,22 +341,24 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<!-- Inner circle invitation -->
|
<!-- Inner circle invitation -->
|
||||||
{{if and (.CurrentUser.IsInnerCircle) (not .User.InnerCircle) (ne .CurrentUser.Username .User.Username)}}
|
{{if not .IsSiteGallery}}
|
||||||
<div class="block mt-0">
|
{{if and (.CurrentUser.IsInnerCircle) (not .User.InnerCircle) (ne .CurrentUser.Username .User.Username)}}
|
||||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
<div class="block mt-0">
|
||||||
Does <strong>{{.User.Username}}</strong> show a lot of nudity? Consider
|
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||||
<a href="/inner-circle/invite?to={{.User.Username}}">inviting them to join the {{PrettyCircle}}</a>.
|
Does <strong>{{.User.Username}}</strong> show a lot of nudity? Consider
|
||||||
</div>
|
<a href="/inner-circle/invite?to={{.User.Username}}">inviting them to join the {{PrettyCircle}}</a>.
|
||||||
{{else if (and .CurrentUser.IsInnerCircle .User.IsInnerCircle)}}
|
</div>
|
||||||
<div class="block mt-0">
|
{{else if (and .CurrentUser.IsInnerCircle .User.IsInnerCircle)}}
|
||||||
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
<div class="block mt-0">
|
||||||
<strong>{{.User.Username}}</strong> is a part of the {{PrettyCircle}}.
|
<span class="icon"><img src="/static/img/circle-16.png"></span>
|
||||||
{{if .CurrentUser.IsAdmin}}
|
<strong>{{.User.Username}}</strong> is a part of the {{PrettyCircle}}.
|
||||||
<a href="/inner-circle/remove?to={{.User.Username}}" class="has-text-danger ml-2">
|
{{if .CurrentUser.IsAdmin}}
|
||||||
<i class="fa fa-gavel"></i> Remove from circle?
|
<a href="/inner-circle/remove?to={{.User.Username}}" class="has-text-danger ml-2">
|
||||||
</a>
|
<i class="fa fa-gavel"></i> Remove from circle?
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "pager" .}}
|
{{template "pager" .}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user