Inner circle bugfixes

face-detect
Noah Petherbridge 2023-05-23 20:15:26 -07:00
parent 9788ea6a33
commit 3b3616f0c9
2 changed files with 22 additions and 15 deletions

View File

@ -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

View File

@ -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" .}}