public static GetLikeListItemMarkup ( |
||
user | ||
Résultat | string |
public ActionResult GetLikeList(string itemId, string rnd) { if (!HasPermission()) { return(Json("Please log in to see who liked this item!", JsonRequestBehavior.AllowGet)); } var id = PostInfo.GetIdFromClientId(itemId); // create like markup var likeInfo = new LikeInfo(id); var likelist = new StringBuilder(); foreach (var likeitem in likeInfo.LikeUsers) { var likeuser = likeitem as User; likelist.Append(WallHelper.GetLikeListItemMarkup(likeuser)); } return(Json(likelist.ToString(), JsonRequestBehavior.AllowGet)); }
public ActionResult GetLikeList(string itemId, string contextPath, string rnd) { if (!HasPermission()) { return(Json(SNSR.GetString(SNSR.Wall.PleaseLogIn), JsonRequestBehavior.AllowGet)); } SetCurrentWorkspace(contextPath); var id = PostInfo.GetIdFromClientId(itemId); // create like markup var likeInfo = new LikeInfo(id); var likelist = new StringBuilder(); foreach (var likeitem in likeInfo.LikeUsers) { var likeuser = likeitem as User; likelist.Append(WallHelper.GetLikeListItemMarkup(likeuser)); } return(Json(likelist.ToString(), JsonRequestBehavior.AllowGet)); }
public static string GetLikeList(Content content, string itemId, string rnd) { if (!HasPermission()) { return(JsonConvert.SerializeObject(SNSR.GetString(Compatibility.SR.Wall.PleaseLogIn))); } SetCurrentWorkspace(content.Path); var id = PostInfo.GetIdFromClientId(itemId); // create like markup var likeInfo = new LikeInfo(id); var likelist = new StringBuilder(); foreach (var likeitem in likeInfo.LikeUsers) { var likeuser = likeitem as User; likelist.Append(WallHelper.GetLikeListItemMarkup(likeuser)); } return(likelist.ToString()); }