Fix Gallery checkbox always checking itself + small fixes
This commit is contained in:
parent
e6388de589
commit
50d05f92f1
|
@ -22,9 +22,9 @@ type CertificationPhotoStatus string
|
|||
|
||||
const (
|
||||
CertificationPhotoNeeded CertificationPhotoStatus = "needed"
|
||||
CertificationPhotoPending = "pending"
|
||||
CertificationPhotoApproved = "approved"
|
||||
CertificationPhotoRejected = "rejected"
|
||||
CertificationPhotoPending CertificationPhotoStatus = "pending"
|
||||
CertificationPhotoApproved CertificationPhotoStatus = "approved"
|
||||
CertificationPhotoRejected CertificationPhotoStatus = "rejected"
|
||||
)
|
||||
|
||||
// GetCertificationPhoto retrieves the user's record from the DB or upserts their initial record.
|
||||
|
|
|
@ -86,7 +86,7 @@ func PaginateForums(user *User, categories []string, pager *Pagination) ([]*Foru
|
|||
placeholders = []interface{}{}
|
||||
)
|
||||
|
||||
if categories != nil && len(categories) > 0 {
|
||||
if len(categories) > 0 {
|
||||
wheres = append(wheres, "category IN ?")
|
||||
placeholders = append(placeholders, categories)
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ func PaginateRecentPosts(user *User, categories []string, pager *Pagination) ([]
|
|||
placeholders = []interface{}{}
|
||||
)
|
||||
|
||||
if categories != nil && len(categories) > 0 {
|
||||
if len(categories) > 0 {
|
||||
wheres = append(wheres, "forums.category IN ?")
|
||||
placeholders = append(placeholders, categories)
|
||||
}
|
||||
|
|
|
@ -32,16 +32,16 @@ type NotificationType string
|
|||
|
||||
const (
|
||||
NotificationLike NotificationType = "like"
|
||||
NotificationFriendApproved = "friendship_approved"
|
||||
NotificationComment = "comment"
|
||||
NotificationAlsoCommented = "also_comment"
|
||||
NotificationAlsoPosted = "also_posted" // forum replies
|
||||
NotificationCertRejected = "cert_rejected"
|
||||
NotificationCertApproved = "cert_approved"
|
||||
NotificationPrivatePhoto = "private_photo"
|
||||
NotificationNewPhoto = "new_photo"
|
||||
NotificationInnerCircle = "inner_circle"
|
||||
NotificationCustom = "custom" // custom message pushed
|
||||
NotificationFriendApproved NotificationType = "friendship_approved"
|
||||
NotificationComment NotificationType = "comment"
|
||||
NotificationAlsoCommented NotificationType = "also_comment"
|
||||
NotificationAlsoPosted NotificationType = "also_posted" // forum replies
|
||||
NotificationCertRejected NotificationType = "cert_rejected"
|
||||
NotificationCertApproved NotificationType = "cert_approved"
|
||||
NotificationPrivatePhoto NotificationType = "private_photo"
|
||||
NotificationNewPhoto NotificationType = "new_photo"
|
||||
NotificationInnerCircle NotificationType = "inner_circle"
|
||||
NotificationCustom NotificationType = "custom" // custom message pushed
|
||||
)
|
||||
|
||||
// CreateNotification
|
||||
|
|
|
@ -30,9 +30,9 @@ type PhotoVisibility string
|
|||
|
||||
const (
|
||||
PhotoPublic PhotoVisibility = "public" // on profile page and/or public gallery
|
||||
PhotoFriends = "friends" // only friends can see it
|
||||
PhotoPrivate = "private" // private
|
||||
PhotoInnerCircle = "circle" // inner circle
|
||||
PhotoFriends PhotoVisibility = "friends" // only friends can see it
|
||||
PhotoPrivate PhotoVisibility = "private" // private
|
||||
PhotoInnerCircle PhotoVisibility = "circle" // inner circle
|
||||
)
|
||||
|
||||
// PhotoVisibility preset settings.
|
||||
|
|
|
@ -47,8 +47,8 @@ type UserVisibility string
|
|||
|
||||
const (
|
||||
UserVisibilityPublic UserVisibility = "public"
|
||||
UserVisibilityExternal = "external"
|
||||
UserVisibilityPrivate = "private"
|
||||
UserVisibilityExternal UserVisibility = "external"
|
||||
UserVisibilityPrivate UserVisibility = "private"
|
||||
)
|
||||
|
||||
// All visibility options.
|
||||
|
|
|
@ -15,7 +15,50 @@
|
|||
|
||||
<div class="block p-4">
|
||||
|
||||
<div class="content">
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter">
|
||||
<!-- Quick Links -->
|
||||
<div class="card block">
|
||||
<header class="card-header has-background-link">
|
||||
<p class="card-header-title has-text-light">
|
||||
<span class="icon mr-1"><img src="/static/img/circle-16.png"></span>
|
||||
<span>Quick Links</span>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="card-content">
|
||||
<p class="block">
|
||||
Some quick links to {{PrettyCircle}}-only views mentioned
|
||||
in the description on this page:
|
||||
</p>
|
||||
|
||||
<ul class="menu-list block">
|
||||
<li>
|
||||
<a href="/photo/gallery?visibility=circle">
|
||||
<i class="fa fa-image mr-1"></i>
|
||||
Gallery (circle-only photos)
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/members?certified=circle">
|
||||
<i class="fa fa-people-group mr-1"></i>
|
||||
Inner circle members
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/f/circle">
|
||||
<i class="fa fa-comments mr-1"></i>
|
||||
Forum (Circle Chat)
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column content">
|
||||
<p>
|
||||
Congratulations! You have been added to the <strong>{{PrettyCircle}}</strong> because you
|
||||
exemplify what it truly means to be a {{PrettyTitle}} nudist.
|
||||
|
@ -120,6 +163,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{end}}
|
|
@ -292,8 +292,7 @@
|
|||
<input type="checkbox"
|
||||
name="gallery"
|
||||
value="true"
|
||||
checked
|
||||
{{if .EditPhoto.Gallery}}checked{{end}}>
|
||||
{{if or .EditPhoto.Gallery (not .EditPhoto)}}checked{{end}}>
|
||||
Show this photo in the site-wide Photo Gallery
|
||||
</label>
|
||||
<p class="help">
|
||||
|
|
Loading…
Reference in New Issue
Block a user