diff --git a/pkg/controller/account/inner_circle.go b/pkg/controller/account/inner_circle.go index d3b81ee..d8366ae 100644 --- a/pkg/controller/account/inner_circle.go +++ b/pkg/controller/account/inner_circle.go @@ -77,11 +77,12 @@ func InviteCircle() http.HandlerFunc { // Add them! if err := models.AddToInnerCircle(user); err != nil { session.FlashError(w, r, "Couldn't add to the inner circle: %s", err) + } else { + session.Flash(w, r, "%s has been added to the inner circle!", user.Username) } log.Info("InnerCircle: %s adds %s to the inner circle", currentUser.Username, user.Username) - session.Flash(w, r, "%s has been added to the inner circle!", user.Username) templates.Redirect(w, "/photo/u/"+user.Username) return } diff --git a/pkg/controller/photo/user_gallery.go b/pkg/controller/photo/user_gallery.go index 7477d1e..b35fb27 100644 --- a/pkg/controller/photo/user_gallery.go +++ b/pkg/controller/photo/user_gallery.go @@ -33,6 +33,9 @@ func UserPhotos() http.HandlerFunc { filterVisibility = r.FormValue("visibility") sort = r.FormValue("sort") sortOK bool + + // Inner circle invite view? + innerCircleInvite = r.FormValue("intent") == "inner_circle" ) // Sort options. @@ -78,6 +81,11 @@ func UserPhotos() http.HandlerFunc { isShyFrom = !isOwnPhotos && (currentUser.IsShyFrom(user) || (isShy && !areFriends)) ) + // Inner circle invite: not if we are not in the circle ourselves. + if innerCircleInvite && !currentUser.IsInnerCircle() { + innerCircleInvite = false + } + // Bail early if we are shy from this user. if isShy && isShyFrom { var vars = map[string]interface{}{ @@ -207,6 +215,7 @@ func UserPhotos() http.HandlerFunc { "CommentMap": commentMap, "ViewStyle": viewStyle, "ExplicitCount": explicitCount, + "InnerCircleInviteView": innerCircleInvite, // Search filters "Sort": sort, diff --git a/web/templates/account/invite_circle.html b/web/templates/account/invite_circle.html index cd8f1c5..f9a3313 100644 --- a/web/templates/account/invite_circle.html +++ b/web/templates/account/invite_circle.html @@ -38,53 +38,54 @@ -
+ diff --git a/web/templates/photo/gallery.html b/web/templates/photo/gallery.html index df880c1..5f4c24b 100644 --- a/web/templates/photo/gallery.html +++ b/web/templates/photo/gallery.html @@ -192,6 +192,31 @@ {{end}} + + {{if .InnerCircleInviteView}} ++ + {{PrettyCircle}} invitation +
+ ++ You are now viewing @{{.User.Username}}'s Public gallery photos to verify + they should be invited to the {{PrettyCircle}}. +
+ ++ Please take a look and see if they have at least five (5) photos that clearly show + their face as well as their full nude body together. +
+ ++ If they qualify to join the {{PrettyCircle}}, the button to invite them will be at + the bottom of this page. +
++ + {{PrettyCircle}} invitation +
+ ++ If @{{.User.Username}} shows at least 5 nude photos with face + on their public gallery, click on the button below to add them to the {{PrettyCircle}}. +
+ + + +