/// <summary> /// Hides the review form for owner. /// </summary> /// <param name="albumItm">The album itm.</param> private void HideReviewFormForOwner(Item albumItm) { // If current user is owner of this album then he can't rate it if (PhotoAlbumReviewHelper.IsCurrentUserOwner(this.albumInst, this) || PhotoAlbumHelper.IsAlreadyRatedByUser(albumItm.ID.ToString(), this.albumInst.CurrUserName)) { this.reviewForm.Visible = false; } else { this.reviewForm.Visible = true; } }
/// <summary> /// Posts the review. /// </summary> private void PostReview() { string s1 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_title"); string s2 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_text"); string s3 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_rate"); Item photoForRating = this.currPhoto;// this.paginator.GetPageItems()[0]; if (photoForRating != null) { PhotoAlbumObject.AddPhotoRatingComment(s1, s2, s3, photoForRating); PhotoAlbumHelper.AddPhotoToSessionNonRateable(photoForRating.ID.ToString(), Request.QueryString["CurrentUser"]);//this.albumInst.CurrUserName); } // Triger goal Rate Photo // AnalyticsTrackerHelper.TriggerEvent("Rate photos", "Photo was rated", string.Empty, string.Empty, "CurrentPage"); }
/// <summary> /// Posts the review. /// </summary> /// <param name="albumForRating">The album for rating.</param> private void PostReview(Item albumForRating) { string s1 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_title"); string s2 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_text"); string s3 = PhotoAlbumReviewHelper.SafeRequest("photo_rate_rate"); if (albumForRating != null) { PhotoAlbumObject.AddPhotoRatingComment(s1, s2, s3, albumForRating); // register session when user already rated image PhotoAlbumHelper.AddPhotoToSessionNonRateable(albumForRating.ID.ToString(), this.albumInst.CurrUserName); } // Triger goal Rate Photo //AnalyticsTrackerHelper.TriggerEvent("Rate photos", "Album was rated", string.Empty, string.Empty, "CurrentPage"); }