mirror of https://github.com/abpframework/eventhub
10 changed files with 174 additions and 119 deletions
@ -1,14 +1,8 @@ |
|||
@model EventHub.Web.Pages.Events.Components.AttendeesArea.AttendeesAreaViewComponent.AttendeesAreaViewComponentModel |
|||
<abp-card class="mb-3" data-event-id="@Model.EventId"> |
|||
<abp-card-body> |
|||
<abp-card-title>Attendees (@Model.TotalCount)</abp-card-title> |
|||
<abp-card-text> |
|||
<ul id="EventAttendeeList"> |
|||
@foreach (var attendee in Model.Attendees) |
|||
{ |
|||
<li class="border p-2 mb-2"><i class="fas fa-user"></i> @Model.GetAttendeeName(attendee)</li> |
|||
} |
|||
</ul> |
|||
</abp-card-text> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
<h5 class="detail-head mt-5 font-weight-bold" data-event-id="@Model.EventId">Attendees (@Model.TotalCount)</h5> |
|||
<div> |
|||
@foreach (var attendee in Model.Attendees) |
|||
{ |
|||
<img gravatar-email="@attendee.Email" default-image="Wavatar" gravatar-size="60" class="org-avatar rounded-circle"/> |
|||
} |
|||
</div> |
|||
@ -1,10 +1 @@ |
|||
#EventAttendeeList |
|||
{ |
|||
list-style: none; |
|||
padding: 0; |
|||
} |
|||
|
|||
#EventAttendeeList li |
|||
{ |
|||
|
|||
} |
|||
|
|||
@ -1,45 +1,42 @@ |
|||
@using EventHub.Localization |
|||
@using EventHub.Web.Pages.Events |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@inject IHtmlLocalizer<EventHubResource> L |
|||
@model EventHub.Web.Pages.Events.Components.LocationArea.LocationAreaViewComponent.LocationAreaViewComponentModel |
|||
<abp-card class="mb-3" data-event-id="@Model.EventId"> |
|||
<abp-card-body> |
|||
<abp-card-title>@L["Location"] <i class="fas fa-map-marker-alt"></i></abp-card-title> |
|||
|
|||
@if (Model.IsRegistered) |
|||
<div data-event-id="@Model.EventId"> |
|||
@if (Model.IsRegistered) |
|||
{ |
|||
if (Model.IsOnline) |
|||
{ |
|||
if (Model.IsOnline) |
|||
if (Model.OnlineLink != null) |
|||
{ |
|||
if (Model.OnlineLink != null) |
|||
{ |
|||
<a href="@Model.OnlineLink">@L["GoToEventAddress"]</a> |
|||
} |
|||
else |
|||
{ |
|||
<p>@L["LocationHasNotSpecifiedYet", "URL"]</p> |
|||
} |
|||
}else |
|||
<a class="detail-pin" href="@Model.OnlineLink"><img src="/assets/pin.svg"> @L["GoToEventAddress"]</a> |
|||
} |
|||
else |
|||
{ |
|||
if (Model.Country != null && Model.City != null) |
|||
{ |
|||
<p>@Model.Country/@Model.City</p> |
|||
} |
|||
else |
|||
{ |
|||
<p>@L["LocationHasNotSpecifiedYet", "location"]</p> |
|||
} |
|||
<span>@L["LocationHasNotSpecifiedYet", "URL"]</span> |
|||
} |
|||
} |
|||
else |
|||
}else |
|||
{ |
|||
if (Model.IsOnline) |
|||
if (Model.Country != null && Model.City != null) |
|||
{ |
|||
<p>@L["AttendeesCanSeeEventLocation", "URL"]</p> |
|||
<span class="detail-pin"><img src="/assets/pin.svg"> @EventDateHelper.GetLocationInfo(Model.IsOnline, Model.City, Model.Country, ", ")</span> |
|||
} |
|||
else |
|||
{ |
|||
<p>@L["AttendeesCanSeeEventLocation", "location"]</p> |
|||
<span class="detail-pin">@L["LocationHasNotSpecifiedYet", "location"]</span> |
|||
} |
|||
} |
|||
</abp-card-body> |
|||
</abp-card> |
|||
} |
|||
else |
|||
{ |
|||
if (Model.IsOnline) |
|||
{ |
|||
<span class="detail-pin">@L["AttendeesCanSeeEventLocation", "URL"]</span> |
|||
} |
|||
else |
|||
{ |
|||
<span class="detail-pin">@L["AttendeesCanSeeEventLocation", "location"]</span> |
|||
} |
|||
} |
|||
</div> |
|||
|
|||
@ -1,59 +1,104 @@ |
|||
@page "/events/{url}" |
|||
@inject IHtmlLocalizer<EventHubResource> L |
|||
@using System.Globalization |
|||
@using EventHub.Localization |
|||
@using EventHub.Web.Pages.Events |
|||
@using EventHub.Web.Pages.Events.Components.AttendeesArea |
|||
@using EventHub.Web.Pages.Events.Components.EventsArea |
|||
@using EventHub.Web.Pages.Events.Components.LocationArea |
|||
@using EventHub.Web.Pages.Events.Components.RegistrationArea |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.Timing |
|||
@using Volo.Abp.Users |
|||
@inject ICurrentUser CurrentUser |
|||
@inject IClock Clock |
|||
@model EventHub.Web.Pages.Events.DetailPageModel |
|||
<abp-row> |
|||
<abp-column size-lg="_8" size-md="_6"> |
|||
<abp-card class="mb-3"> |
|||
@if (Model.Event.CoverImageContent is null) |
|||
{ |
|||
<img abp-card-image="Top" src="https://picsum.photos/seed/@Model.Event.Id.ToString()/400/160?blur=8" alt="@Model.Event.Title"/> |
|||
} |
|||
else |
|||
{ |
|||
<img abp-card-image="Top" style="max-height: 400px; min-height: 160px;" src="@($"data:image/png;base64,{Convert.ToBase64String(Model.Event.CoverImageContent)}")" alt="@Model.Event.Title"/> |
|||
} |
|||
<abp-card-body> |
|||
<abp-card-title> |
|||
@if (Model.IsEventOwner) |
|||
<div class="bg-white py-5"> |
|||
<div class="container detail-page pb-4"> |
|||
<div class="row"> |
|||
<div class="col-md-7"> |
|||
<div class="detail-image"> |
|||
@if (Model.Event.CoverImageContent == null) |
|||
{ |
|||
<div class="row"> |
|||
<div class="col-9"> |
|||
<h2>@Model.Event.Title</h2> |
|||
</div> |
|||
<div class="col-3 text-right"> |
|||
<a href="/event/edit/@Model.Event.Url" class="btn btn-primary text-white">@L["Edit"] <i class="far fa-edit"></i></a> |
|||
</div> |
|||
</div> |
|||
<img src="/assets/detail.png" alt="@Model.Event.Title"> |
|||
} |
|||
else |
|||
{ |
|||
<h2>@Model.Event.Title</h2> |
|||
<img src="@($"data:image/png;base64,{Convert.ToBase64String(Model.Event.CoverImageContent)}")" alt="@Model.Event.Title"> |
|||
} |
|||
</abp-card-title> |
|||
<abp-card-subtitle> |
|||
@EventDateHelper.GetDateRangeText(Model.Event.StartTime, Model.Event.EndTime) <br/> |
|||
<span class="text-muted">@L["OrganizedBy"]</span> <a href="@Url.Page("/Organizations/Profile", new {name = Model.Event.OrganizationName})">@Model.Event.OrganizationDisplayName</a> |
|||
@if (!Model.Event.Language.IsNullOrWhiteSpace()) |
|||
{ |
|||
<p>@L["Language"]: <span class="text-muted"> @CultureInfo.GetCultureInfo(Model.Event.Language).EnglishName</span></p> |
|||
} |
|||
</abp-card-subtitle> |
|||
<abp-card-text class="mt-3"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-md-5 pl-md-5"> |
|||
@if (Model.IsEventOwner) |
|||
{ |
|||
<h1 class="mt-4 mt-md-0"> |
|||
@Model.Event.Title |
|||
<a href="/event/edit/@Model.Event.Url" class="btn btn-primary text-white"> |
|||
<i class="far fa-edit"></i> |
|||
</a> |
|||
</h1> |
|||
} |
|||
else |
|||
{ |
|||
<h1 class="mt-4 mt-md-0">@Model.Event.Title</h1> |
|||
} |
|||
@await Component.InvokeAsync(typeof(LocationAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
|
|||
<h5 class="detail-head mt-4">Organizers</h5> |
|||
<div> |
|||
<img src="/assets/avatar2.png" class="org-avatar"> |
|||
<img src="/assets/avatar3.png" class="org-avatar"> |
|||
<img src="/assets/avatar4.png" class="org-avatar"> |
|||
</div> |
|||
@await Component.InvokeAsync(typeof(RegistrationAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-md-7"> |
|||
<h5 class="detail-head mt-5 font-weight-bold">Event Description</h5> |
|||
<p> |
|||
@Model.Event.Description |
|||
</abp-card-text> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
</abp-column> |
|||
<abp-column size-lg="_4" size-md="_6"> |
|||
@await Component.InvokeAsync(typeof(RegistrationAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
@await Component.InvokeAsync(typeof(AttendeesAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
@await Component.InvokeAsync(typeof(LocationAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
</abp-column> |
|||
</abp-row> |
|||
</p> |
|||
|
|||
<h5 class="detail-head mt-5 font-weight-bold">Date</h5> |
|||
<p> |
|||
@EventDateHelper.GetDateRangeText(Model.Event.StartTime, Model.Event.EndTime) |
|||
</p> |
|||
|
|||
@await Component.InvokeAsync(typeof(AttendeesAreaViewComponent), new {eventId = Model.Event.Id}) |
|||
|
|||
</div> |
|||
|
|||
<div class="col-md-5 pl-md-5"> |
|||
<h5 class="detail-head mt-5 font-weight-bold">Share Event</h5> |
|||
<div class="share-container"> |
|||
<a href="#"> |
|||
<img src="/assets/twitter2.svg"> |
|||
</a> |
|||
<a href="#"> |
|||
<img src="/assets/in2.svg"> |
|||
</a> |
|||
<a href="#"> |
|||
<img src="/assets/facebook2.png"> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="container pt-5"> |
|||
<div class="row py-4"> |
|||
<div class="col-md"> |
|||
<h2>Events You Will Enjoy</h2> |
|||
</div> |
|||
</div> |
|||
|
|||
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new |
|||
{ |
|||
minDate = Clock.Now.ClearTime(), |
|||
MaxResultCount = 6, |
|||
isPagination = false |
|||
}) |
|||
</div> |
|||
Loading…
Reference in new issue