Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using EventCyborgEvent.Infrastructure.Enums
- @using EventCyborgEvent.Utils
- @using EventCybortEvent.WebApp.Areas.Home.Models
- @using EventCybortEvent.WebApp.Areas.Home.Resources
- @model IEnumerable<ActivityWallModel.UserPosted>
- @foreach (var row in Model)
- {
- var sharedClass = @"posted";
- var activityTypeTextResource = "";
- var sharedTextResource = "";
- var activityWalltype = ActivityWallTypeEnum.UserPosted;
- var mediaEnum = MediaActivityTypeEnumerator.View;
- var IsTagged = false;
- var onActivity = false;
- var activityTaggedList = new List<ConferencesModels.AttendeeModel>(row.TaggedList);
- var hasMoreText = row.Post.Content.Length > 280;
- string uploadTypeTag = "post";
- if (row.MediaUploaded.Any() && row.MediaUploaded[0].MediaType == "Pictures")
- {
- uploadTypeTag = row.MediaUploaded.Count() == 1 ? Aigenda.PictureUserProfile : Aigenda.Pictures;
- }
- var margin = "284px";
- <div class="activity-item" data-id="@row.Post.OriginalId" data-type="Post" data-isshared="@row.IsShared">
- <!-- start USER ACTIVITY -->
- @if (!row.BlockUsers)
- {
- var linkUsername = "<a href=\"{0}\">{1}</a>";
- var owner = string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.OwnerOfPost.UserName }), row.OwnerOfPost.FullName);
- var firstUserLink = row.GroupAttendees.Any() ?
- row.GroupAttendees[0].ItIsMe && !row.IsUserProfile ?
- Aigenda.You : string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[0].Username }), row.GroupAttendees[0].FullName) :
- ((row.AutenticatedUserId != null && row.UserPost.UserId == Guid.Parse(row.AutenticatedUserId) && !row.UserPost.ViewedOnUserProfile) ? Aigenda.You : string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.UserPost.UserName }), row.UserPost.FullName));
- var secondUserLink = row.GroupAttendees.Count() > 1 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[1].Username }), row.GroupAttendees[1].FullName) : "";
- var thirdUserLink = row.GroupAttendees.Count() > 2 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[2].Username }), row.GroupAttendees[2].FullName) : "";
- var linkOthers1 = "<a onclick=\"ConferenceCard.displayTaggedInPostDialog('{0}')\">{1}</a>";
- var userstoEx = "";
- foreach (var attendeeModel in activityTaggedList.Take(2))
- {
- userstoEx += attendeeModel.UserId.ToString() + ",";
- }
- var othersLink1 = Url.Action("GetUsersTaggedInPost", "ActivityWall", new { usersToExclude = userstoEx, mediaId = row.ParentMediaId });
- var othersBetter = string.Format(linkOthers1, othersLink1, (activityTaggedList.Count - 2) + " others");
- switch (row.MediaActivityType)
- {
- case MediaActivityTypeEnumerator.Upload:
- activityTypeTextResource = ActivityWall.UserPosted;
- break;
- case MediaActivityTypeEnumerator.Tag:
- if (activityTaggedList.Count() > 2)
- {
- activityTypeTextResource = "{2}, {3} and {4} were tagged in {0}'s {1}:";
- }
- else if (activityTaggedList.Count() == 2)
- {
- activityTypeTextResource = "{2} and {3} were tagged in {0}'s {1}:";
- }
- else
- {
- activityTypeTextResource = "{2} were tagged in {0}'s {1}:";
- }
- break;
- case MediaActivityTypeEnumerator.Share:
- if (row.ShareOwnerOfPost != null)
- {
- if (HttpContext.Current.Request.Url.AbsolutePath.Contains("Users/Profile/"))
- {
- activityTypeTextResource = ActivityWall.UserSharedPostWithOwnerAsYouUserProfile;
- }
- else
- {
- if (row.AutenticatedUserId != null && row.ShareOwnerOfPost.UserId.ToString().ToLower() == row.AutenticatedUserId.ToLower())
- {
- activityTypeTextResource = ActivityWall.UserSharedPostWithOwnerAsYou;
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserSharedPostWithOwner;
- }
- }
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserSharedPostWithOwner;
- }
- mediaEnum = MediaActivityTypeEnumerator.Share;
- break;
- case MediaActivityTypeEnumerator.Comment:
- if (!row.IsShared)
- {
- switch (row.GroupAttendees.Count())
- {
- case 0:
- case 1:
- if (row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId)
- {
- if (HttpContext.Current.Request.Url.AbsolutePath.Contains("Users/Profile/"))
- {
- activityTypeTextResource = ActivityWall.UserCommentedOnPostWithOwnerAsYouUserProfile;
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserCommentedOnPostWithOwnerAsYou;
- }
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserCommentedOnPostWithOwner;
- }
- break;
- case 2:
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.TwoUsersCommentedOnPostWithOwnerAsYou
- : ActivityWall.TwoUsersCommentedOnPostWithOwner;
- break;
- case 3:
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.ThreeUsersCommentedOnPostWithOwnerAsYou
- : ActivityWall.ThreeUsersCommentedOnPostWithOwner;
- break;
- default:
- if (row.GroupAttendees.Count() > 3)
- {
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.MoreThanThreeUsersCommentedOnPostWithOwnerAsYou
- : ActivityWall.MoreThanThreeUsersCommentedOnPostWithOwner;
- }
- break;
- }
- }
- else
- {
- switch (row.GroupAttendees.Count())
- {
- case 0:
- case 1:
- activityTypeTextResource = ActivityWall.UserCommentedOnSharedPost;
- break;
- case 2:
- activityTypeTextResource = ActivityWall.TwoUsersCommentedOnSharedPost;
- break;
- case 3:
- activityTypeTextResource = ActivityWall.ThreeUsersCommentedOnSharedPost;
- break;
- default:
- if (row.GroupAttendees.Count() > 3)
- {
- activityTypeTextResource = ActivityWall.MoreThanThreeUsersCommentedOnSharedPost;
- }
- break;
- }
- sharedTextResource = ActivityWall.UserSharedPostWithOwner;
- }
- mediaEnum = MediaActivityTypeEnumerator.Comment;
- break;
- case MediaActivityTypeEnumerator.Like:
- if (!row.IsShared)
- {
- switch (row.GroupAttendees.Count())
- {
- case 0:
- case 1:
- if (row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId)
- {
- if (HttpContext.Current.Request.Url.AbsolutePath.Contains("Users/Profile/"))
- {
- activityTypeTextResource = ActivityWall.UserLikedPostWithOwnerAsYouUserProfile;
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserLikedPostWithOwnerAsYou;
- }
- }
- else
- {
- activityTypeTextResource = ActivityWall.UserLikedPostWithOwner;
- }
- break;
- case 2:
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.TwoUsersLikedPostWithOwnerAsYou
- : ActivityWall.TwoUsersLikedPostWithOwner;
- break;
- case 3:
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.ThreeUsersLikedPostWithOwnerAsYou
- : ActivityWall.ThreeUsersLikedPostWithOwner;
- break;
- default:
- if (row.GroupAttendees.Count() > 3)
- {
- activityTypeTextResource = row.OwnerOfPost.UserId.ToString() == row.AutenticatedUserId ?
- ActivityWall.MoreThanThreeUsersLikedPostWithOwnerAsYou
- : ActivityWall.MoreThanThreeUsersLikedPostWithOwner;
- }
- break;
- }
- }
- else
- {
- sharedTextResource = ActivityWall.UserSharedPostWithOwner;
- switch (row.GroupAttendees.Count())
- {
- case 0:
- case 1:
- activityTypeTextResource = ActivityWall.UserLikedSharedPost;
- break;
- case 2:
- activityTypeTextResource = ActivityWall.TwoUsersLikedSharedPost;
- break;
- case 3:
- activityTypeTextResource = ActivityWall.ThreeUsersLikedSharedPost;
- break;
- default:
- if (row.GroupAttendees.Count() > 3)
- {
- activityTypeTextResource = ActivityWall.MoreThanThreeUsersLikedSharedPost;
- }
- break;
- }
- }
- mediaEnum = MediaActivityTypeEnumerator.Like;
- break;
- }
- <div class="user-activity cl">
- <div class="image">
- @{
- var urlProfile1 = "";
- if (!row.IsUserProfile && HttpContext.Current.Request.Url.AbsolutePath.Contains("Home/ActivityWall"))
- {
- if (row.UserAutenticated)
- {
- if (row.TaggedList.Any(x => String.Equals(x.UserId, row.AutenticatedUserId, StringComparison.CurrentCultureIgnoreCase)))
- {
- //IsTagged = true;
- onActivity = true;
- }
- }
- }
- ////If owner of post is watching Wall
- //if (row.UserAutenticated)
- //{
- // if (row.TaggedList.Any(x => String.Equals(x.UserId, row.AutenticatedUserId, StringComparison.CurrentCultureIgnoreCase)))
- // {
- // IsTagged = true;
- // }
- //}
- }
- @if (onActivity)
- {
- if (activityTaggedList.Count > 0 && !string.IsNullOrEmpty(row.AutenticatedUserId) && activityTaggedList.Any(x => x.UserId.ToLower() == row.AutenticatedUserId))
- {
- var temp = activityTaggedList.FirstOrDefault(x => x.UserId.ToLower() == row.AutenticatedUserId.ToLower());
- if (temp != null)
- {
- activityTaggedList.Remove(temp);
- activityTaggedList.Insert(0, temp);
- }
- }
- <a href="@Url.Action("Profile", "Users", new { id = activityTaggedList.FirstOrDefault().Username })" title="@activityTaggedList.FirstOrDefault().FullName" data-tooltip="tooltip" data-original-title="@activityTaggedList.FirstOrDefault().FullName" data-placement="left">
- <img src="@activityTaggedList.FirstOrDefault().ImagePath" onerror="this.src = '/Content/img/empty-user-photo.png' " />
- @if (activityTaggedList.FirstOrDefault().IsSpeaker)
- {
- <span class="is-speaker"></span>
- }
- </a>
- }
- else if (row.GroupAttendees.Any())
- {
- <a href="@Url.Action("Profile", "Users", new {id = row.GroupAttendees.FirstOrDefault().Username})" title="@row.GroupAttendees.FirstOrDefault().FullName" data-tooltip="tooltip" data-original-title="@row.GroupAttendees.FirstOrDefault().FullName" data-placement="left">
- <img src="@row.GroupAttendees.FirstOrDefault().ImagePath" onerror="this.src = '/Content/img/empty-user-photo.png' " />
- @if (@row.GroupAttendees.FirstOrDefault().IsSpeaker)
- {
- <span class="is-speaker"></span>
- }
- </a>
- }
- else
- {
- <a href="@Url.Action("Profile", "Users", new {id = row.UserPost.UserName})" title="@row.UserPost.FullName" data-tooltip="tooltip" data-original-title="@row.UserPost.FullName" data-placement="bottom">
- <img src="@row.UserPost.ImagePath" onerror=" this.src='/Content/img/empty-user-photo.png' " />
- @if (@row.UserPost.IsSpeaker)
- {
- <span class="is-speaker"></span>
- }
- </a>
- }
- </div>
- <div class="info">
- <h3>
- @{
- if (row.IsUserProfile)
- {
- firstUserLink = activityTaggedList.Any() ?
- activityTaggedList[0].ItIsMe && !row.IsUserProfile ?
- Aigenda.You : string.Format(linkUsername, Url.Action("Profile", "Users", new { id = activityTaggedList[0].Username }), activityTaggedList[0].FullName) :
- string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.UserPost.UserName }), row.UserPost.FullName);
- secondUserLink = activityTaggedList.Count() > 1 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = activityTaggedList[1].Username }), activityTaggedList[1].FullName) : "";
- thirdUserLink = activityTaggedList.Count() > 2 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = activityTaggedList[2].Username }), activityTaggedList[2].FullName) : "";
- linkOthers1 = "<a onclick=\"ConferenceCard.displayTaggedInPostDialog('{0}')\">{1}</a>";
- userstoEx = "";
- foreach (var attendeeModel in activityTaggedList.Take(2))
- {
- userstoEx += attendeeModel.UserId.ToString() + ",";
- }
- othersLink1 = Url.Action("GetUsersTaggedInPost", "ActivityWall", new { usersToExclude = userstoEx, mediaId = row.ParentMediaId });
- othersBetter = string.Format(linkOthers1, othersLink1, (activityTaggedList.Count - 2) + " others");
- if (activityTaggedList.Count() == 1)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- else if (activityTaggedList.Count() == 2)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink))
- }
- else if (activityTaggedList.Count() == 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, thirdUserLink))
- }
- else if (activityTaggedList.Count() > 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, othersBetter))
- }
- else
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- }
- else if (row.GroupAttendees.Any() && HttpContext.Current.Request.Url.AbsolutePath.Contains("Home/ActivityWall"))
- {
- linkUsername = "<a href=\"{0}\">{1}</a>";
- firstUserLink = row.GroupAttendees.Any() ?
- row.GroupAttendees[0].ItIsMe && !row.IsUserProfile ?
- Aigenda.You : string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[0].Username }), row.GroupAttendees[0].FullName) :
- ((row.AutenticatedUserId != null && row.UserPost.UserId == Guid.Parse(row.AutenticatedUserId) && !row.UserPost.ViewedOnUserProfile) ? Aigenda.You : string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.UserPost.UserName }), row.UserPost.FullName));
- secondUserLink = row.GroupAttendees.Count() > 1 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[1].Username }), row.GroupAttendees[1].FullName) : "";
- thirdUserLink = row.GroupAttendees.Count() > 2 ? string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.GroupAttendees[2].Username }), row.GroupAttendees[2].FullName) : "";
- linkOthers1 = "<a onclick=\"ConferenceCard.displayTaggedInPostDialog('{0}')\">{1}</a>";
- userstoEx = "";
- foreach (var attendeeModel in activityTaggedList.Take(2))
- {
- userstoEx += attendeeModel.UserId.ToString() + ",";
- }
- othersLink1 = Url.Action("GetUsersTaggedInPost", "ActivityWall", new { usersToExclude = userstoEx, mediaId = row.ParentMediaId });
- othersBetter = string.Format(linkOthers1, othersLink1, (activityTaggedList.Count - 2) + " others");
- if (row.IsShared && row.MediaActivityType == MediaActivityTypeEnumerator.Share)
- {
- owner = string.Format(linkUsername, Url.Action("Profile", "Users", new { id = row.ShareOwnerOfPost.UserName }), row.ShareOwnerOfPost.FullName);
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- else
- {
- if (row.GroupAttendees.Count() == 1)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- else if (row.GroupAttendees.Count() == 2)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink))
- }
- else if (row.GroupAttendees.Count() == 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, thirdUserLink))
- }
- else if (row.GroupAttendees.Count() > 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, othersBetter))
- }
- else
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- }
- }
- else
- {
- if (row.IsShared && row.ActivityType == ActivityWallTypeEnum.UserSharedPost)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- else
- {
- @*@Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))*@
- if (row.GroupAttendees.Count() == 1)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- else if (row.GroupAttendees.Count() == 2)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink))
- }
- else if (row.GroupAttendees.Count() == 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, thirdUserLink))
- }
- else if (row.GroupAttendees.Count() > 3)
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink, secondUserLink, othersBetter))
- }
- else
- {
- @Html.Raw(string.Format(activityTypeTextResource, owner, uploadTypeTag, firstUserLink))
- }
- }
- }
- }
- </h3>
- </div>
- <div class="time">
- <p title="@String.Format("{0:f}",row.PostedOn)">@row.PostedOnFormatted</p>
- </div>
- </div>
- <!-- end USER ACTIVITY -->
- <div class="conference-card clearfix">
- <div class="conference-card-wrapper">
- <span class="conference-type">@uploadTypeTag</span>
- @if (row.IsShared &&
- (row.MediaActivityType == MediaActivityTypeEnumerator.Comment
- || row.MediaActivityType == MediaActivityTypeEnumerator.Like))
- {
- <br />
- <div class="person-image">
- <a href="@Url.Action("Profile", "Users", new { id = row.OwnerOfPost.UserName })" title="@row.OwnerOfPost.FullName" data-tooltip="tooltip" data-placement="bottom">
- <img src="@row.OwnerOfPost.ImagePath" onerror="this.src='/Content/img/empty-user-photo.png' " />
- @if (row.OwnerOfPost.IsSpeaker)
- {
- <span class="is-speaker-small"></span>
- }
- </a>
- </div>
- <div class="post-persons">
- @{
- @Html.Raw(string.Format(sharedTextResource, owner, uploadTypeTag, firstUserLink))
- }
- </div>
- }
- <div class="media media-@(row.MediaUploaded.Count > 4 ? "4" : row.MediaUploaded.Count.ToString()) clearfix">
- @{ long _mediaID = 0;}
- @if (row.MediaUploaded != null && row.MediaUploaded.Count > 0)
- {
- _mediaID = row.MediaUploaded[0].Media.MediaId;
- <div class="media-info" style="margin-left: @margin">
- @if (row.MediaActivityType == MediaActivityTypeEnumerator.Upload
- || row.MediaActivityType == MediaActivityTypeEnumerator.Comment
- || row.MediaActivityType == MediaActivityTypeEnumerator.Like)
- {
- sharedClass = "posted";
- }
- @if (row.IsShared)
- {
- sharedClass = "shared-border";
- }
- @if (!string.IsNullOrEmpty(row.SharedText))
- {
- @*<p class="share-description-post-img">@Html.Raw(row.SharedText)</p>*@
- var hasMoreTextt = row.SharedText.Length > 280 && !row.SharedText.Contains("href");
- <p class="contentshort share-description-post-img" style="@(hasMoreTextt ? "display:inline;" : "display:none;")">
- @*@HttpUtility.HtmlDecode(row.SharedText.TruncateAtWord(280))...*@
- @Html.Raw(EventCybortEvent.WebApp.Areas.Home.Classes.TopicsHelper.TruncateAtWordCustom(row.SharedText.Trim(), row.SharedText.Trim().Length, 280))....
- </p>
- <p class="description share-description-post-img" style="@(!hasMoreTextt ? "display:inline;" : "display:none;")">
- @*@HttpUtility.HtmlDecode(row.SharedText)*@
- @Html.Raw(row.SharedText)
- </p>
- <a href="javascript:void(0)" class="content-more" data-text-swap="@Aigenda.ShowLess" data-text-original="@Aigenda.ShowMore" style="@(hasMoreTextt ? "display:inline-block;" : "display: none;")">@Aigenda.ShowMore</a>
- }
- <div class="@sharedClass">
- @if (!string.IsNullOrEmpty(row.Post.Name))
- {
- <h2><a data-toggle="modal" data-target="#mediaOpen" data-mediaid="@_mediaID" data-typeofmedia="Pictures">@HttpUtility.HtmlDecode(row.Post.Name)</a></h2>
- }
- <p class="description-post">
- @if (!string.IsNullOrEmpty(row.Post.Content))
- {
- <p class="contentshort" style="@(hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(EventCybortEvent.WebApp.Areas.Home.Classes.TopicsHelper.TruncateAtWordCustom(row.Post.Content, row.Post.Content.Length, 280))....
- </p>
- <p class="description" style="@(!hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(HttpUtility.HtmlDecode(row.Post.Content))
- </p>
- <a href="javascript:void(0)" class="content-more" data-text-swap="@Aigenda.ShowLess" data-text-original="@Aigenda.ShowMore" style="@(hasMoreText ? "display:inline-block;" : "display: none;")">@Aigenda.ShowMore</a>
- }
- @if (!string.IsNullOrEmpty(row.Event.EventName))
- {
- <span class="at">@Aigenda.At</span> <a href="@Url.Action("EventDetails", "Conferences", new {id = row.Event.UniqueName})">@row.Event.EventName</a>
- }
- </p>
- @if (!string.IsNullOrEmpty(row.Event.EventLocation))
- {
- <p class="icn-location">@row.Event.EventLocation.Trim()</p>
- }
- <div class="flag-location clearfix">
- @if (!string.IsNullOrEmpty(row.Event.CountryCode))
- {
- <div class="country-flag flag-@row.Event.CountryCode.ToLower()"></div>
- }
- @if (!string.IsNullOrEmpty(row.Event.EventCity))
- {
- <a class="location-link" href="@Url.Action("Index", "Conferences", new { city = row.Event.EventCity.Trim() })">@row.Event.EventCity.Trim()</a>
- }
- @if (!string.IsNullOrEmpty(row.Event.EventCountry))
- {
- if (!string.IsNullOrEmpty(row.Event.EventCity))
- {
- <span></span>
- }
- <a class="location-link" href="@Url.Action("Index", "Conferences", new { country = row.Event.EventCountry.Trim() })">@row.Event.EventCountry.Trim()</a>
- }
- </div>
- @if (row.Post.PostSource == 1)
- {
- <span class="t-source">@Aigenda.SourceTwitter</span>
- }
- @if (row.Event.Topics != null && row.Event.Topics.Any())
- {
- <div class="relevance-media clearfix mediaMargin">
- <p>@Aigenda.TopicsIn</p>
- <div class="media-topics">
- @{
- var i = 6;
- <ul>
- @foreach (var tag in row.Event.Topics)
- {
- if (i == 0)
- {
- break;
- }
- <li class="topicCards">
- <a href="@Url.Action("TopicDetail", "Topics" , new { id=tag.TopicValue })">@HttpUtility.HtmlDecode(tag.TopicValue)</a>
- </li>
- i--;
- }
- </ul>
- }
- </div>
- </div>
- }
- @if (row.Event.Keywords != null && row.Event.Keywords.Any())
- {
- <div class="relevance-media clearfix mediaMargin">
- <p>@Aigenda.Keywords</p>
- <div class="media-topics">
- @{
- var j = 6;
- <ul>
- @foreach (var keywordModel in row.Event.Keywords)
- {
- if (j == 0)
- {
- break;
- }
- <li class="keywordsCards">
- <a href="@Url.Action("KeywordDetail", "Topics", new { id = keywordModel.KeywordId })">@HttpUtility.HtmlDecode(keywordModel.KeywordValue)</a>
- </li>
- j--;
- }
- </ul>
- }
- </div>
- </div>
- }
- @if (row.TaggedList.Any())
- {
- <div class="media-people clearfix">
- @{
- var peopleString = @"People on this picture";
- if (@row.MediaUploaded.Count > 1)
- {
- peopleString = @"People on this pictures";
- }
- }
- <p>@peopleString</p>
- <ul class="people">
- @foreach (var taggedUser in row.TaggedList)
- {
- <li>
- <a href="@Url.Action("Profile", "Users", new {id = taggedUser.Username})" data-tooltip="tooltip" data-placement="top" title="@taggedUser.FullName" data-original-title="@taggedUser.FullName">
- @if (taggedUser.IsSpeaker)
- {
- <div class="icnSpeaker post-is-speaker">
- <span class="is-speaker"></span>
- </div>
- }
- <img src="@taggedUser.ImagePath" onerror="this.src='/Content/img/empty-user-photo.png' " />
- </a>
- </li>
- }
- </ul>
- <div class="clearfix"></div>
- @if (row.HasMoreTaggedList)
- {
- <a class="all" href="javascript:void(0)" data-toggle="modal" onclick="ConferenceCard.displayTaggedDialog('@row.Post.Id') " data-target="#showAllAttendees">@Aigenda.ViewAll</a>
- }
- </div>
- }
- </div>
- </div>
- }
- else if (row.MediaUploaded != null && row.MediaUploaded.Count == 0)
- {
- if ((row.MediaActivityType == MediaActivityTypeEnumerator.Upload
- || row.MediaActivityType == MediaActivityTypeEnumerator.Tag
- || row.MediaActivityType == MediaActivityTypeEnumerator.Comment
- || row.MediaActivityType == MediaActivityTypeEnumerator.Like) && !row.IsShared)
- {
- sharedClass = "posted";
- <div class="media-info" style="margin-left: @margin">
- <div class="@sharedClass">
- <p class="description-post fff">
- @if (!string.IsNullOrEmpty(row.Post.Content))
- {
- var hasMoreTextt = row.Post.Content.Length > 280 && !row.Post.Content.Contains("href");
- <p class="contentshort" style="@(hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(HttpUtility.HtmlDecode(row.Post.Content.TruncateAtWord(280)))...
- </p>
- <p class="description" style="@(!hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(HttpUtility.HtmlDecode(row.Post.Content))
- </p>
- <a href="javascript:void(0)" class="content-more" data-text-swap="@Aigenda.ShowLess" data-text-original="@Aigenda.ShowMore" style="@(hasMoreText ? "display:inline-block;" : "display: none;")">@Aigenda.ShowMore</a>
- }
- @if (!string.IsNullOrEmpty(row.Event.EventName))
- {
- <span class="at">@Aigenda.At</span> <a href="@Url.Action("EventDetails", "Conferences", new {id = row.Event.UniqueName})">@row.Event.EventName</a>
- }
- </p>
- @if (row.Post.PostSource == 1)
- {
- <span class="t-source">@Aigenda.SourceTwitter</span>
- }
- </div>
- </div>
- }
- if (row.IsShared)
- {
- sharedClass = "shared-border";
- if (!string.IsNullOrEmpty(row.SharedText))
- {
- @*<p class="share-description-post">@Html.Raw(row.SharedText)</p>*@
- var hasMoreTextt = row.SharedText.Length > 280 && !row.SharedText.Contains("href");
- <p class="contentshort share-description-post" style="@(hasMoreTextt ? "display:inline;" : "display:none;")">
- @HttpUtility.HtmlDecode(row.SharedText.TruncateAtWord(280))...
- </p>
- <p class="description share-description-post" style="@(!hasMoreTextt ? "display:inline;" : "display:none;")">
- @HttpUtility.HtmlDecode(row.SharedText)
- </p>
- <a href="javascript:void(0)" class="content-more" data-text-swap="@Aigenda.ShowLess" data-text-original="@Aigenda.ShowMore" style="@(hasMoreTextt ? "display:inline-block;" : "display: none;")">@Aigenda.ShowMore</a>
- }
- <div class="media-info" style="margin-left: @margin">
- <div class="@sharedClass">
- <p class="description-post">
- @if (!string.IsNullOrEmpty(row.Post.Content))
- {
- <p class="contentshort" style="@(hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(HttpUtility.HtmlDecode(row.Post.Content.TruncateAtWord(280)))...
- </p>
- <p class="description" style="@(!hasMoreText ? "display:inline;" : "display:none;")">
- @Html.Raw(HttpUtility.HtmlDecode(row.Post.Content))
- </p>
- <a href="javascript:void(0)" class="content-more" data-text-swap="@Aigenda.ShowLess" data-text-original="@Aigenda.ShowMore" style="@(hasMoreText ? "display:inline-block;" : "display: none;")">@Aigenda.ShowMore</a>
- }
- @if (!string.IsNullOrEmpty(row.Event.EventName))
- {
- <span class="at">@Aigenda.At</span> <a href="@Url.Action("EventDetails", "Conferences", new {id = row.Event.UniqueName})">@row.Event.EventName</a>
- }
- </p>
- @if (row.TaggedList.Any())
- {
- <div class="media-people clearfix">
- @{
- var peopleString = @"People on this picture";
- if (@row.MediaUploaded.Count > 1)
- {
- peopleString = @"People on this pictures";
- }
- }
- <p>@peopleString</p>
- <ul class="people">
- @foreach (var taggedUser in row.TaggedList)
- {
- <li>
- <a href="@Url.Action("Profile", "Users", new {id = taggedUser.Username})" data-tooltip="tooltip" data-placement="top" title="@taggedUser.FullName" data-original-title="@taggedUser.FullName">
- @if (taggedUser.IsSpeaker)
- {
- <div class="icnSpeaker">
- <span class="is-speaker"></span>
- </div>
- }
- <img src="@taggedUser.ImagePath" onerror=" this.src='/Content/img/empty-user-photo.png' " />
- </a>
- </li>
- }
- </ul>
- <div class="clearfix"></div>
- @if (row.HasMoreTaggedList)
- {
- <a class="all" href="javascript:void(0)" data-toggle="modal" onclick="ConferenceCard.displayTaggedDialog('@row.Post.Id') " data-target="#showAllAttendees">@Aigenda.ViewAll</a>
- }
- </div>
- }
- @if (row.Post.PostSource == 1)
- {
- <span class="t-source">@Aigenda.SourceTwitter</span>
- }
- </div>
- </div>
- }
- }
- @if (row.MediaUploaded != null && row.MediaUploaded.Count > 0)
- {
- margin = "0px";
- <div class="media-img">
- @{
- var j = 0;
- var linkText = "";
- foreach (var me in row.MediaUploaded)
- {
- if (j > 3)
- {
- break;
- }
- if (me.MediaSourcePath != null)
- {
- _mediaID = me.Media.MediaId;
- string strArr = me.MediaSourcePath.Substring(0, me.MediaSourcePath.LastIndexOf('.'));
- string strArrLast = me.MediaSourcePath.Split('.').Last();
- string pathToThumb = strArr + "_mediumthumb." + strArrLast;
- linkText += "<a data-toggle='modal' data-ArrowsShow='True' data-target='#mediaOpen' data-mediaid='" + me.Media.MediaId + "' data-typeofmedia='Pictures'" + "style='background-image: url(" + Uri.EscapeUriString(pathToThumb) + ")'>";
- if (j == 3 && row.MediaUploaded.Count > 4)
- {
- linkText += "<div class='rest-of-pic'><h3>+ " + (row.MediaUploaded.Count - 4) + "</h3></div>";
- }
- linkText += "</a>";
- }
- j++;
- }
- }
- @Html.Raw(linkText)
- </div>
- }
- </div>
- </div>
- <!-- start CONFERENCE ACTIONS -->
- <div class="conference-actions clearfix js-MediaContent">
- @Html.Partial("_BottomActionSection", row)
- <div class="jsCommentSection">
- @Html.Partial("../Shared/CommentsSection", row.Event)
- </div>
- </div>
- <!-- end CONFERENCE ACTIONS -->
- </div>
- }
- </div>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement