mirror of https://github.com/abpframework/eventhub
16 changed files with 236 additions and 44 deletions
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EventHub.Events; |
|||
|
|||
public class SessionDto : EntityDto<Guid> |
|||
{ |
|||
public Guid TrackId { get; set; } |
|||
|
|||
public string Title { get; set; } |
|||
|
|||
public DateTime StartTime { get; set; } |
|||
|
|||
public DateTime EndTime { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
|
|||
public string Language { get; set; } |
|||
|
|||
public List<SpeakerDto> Speakers { get; set; } |
|||
|
|||
public SessionDto() |
|||
{ |
|||
Speakers = new List<SpeakerDto>(); |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EventHub.Events; |
|||
|
|||
public class SpeakerDto : EntityDto<Guid> |
|||
{ |
|||
public Guid SessionId { get; set; } |
|||
|
|||
public Guid UserId { get; set; } |
|||
|
|||
public string UserName { get; set; } |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace EventHub.Events; |
|||
|
|||
public class UpdateTrackDto |
|||
{ |
|||
[Required] |
|||
[StringLength(TrackConsts.MaxNameLength)] |
|||
public string Name { get; set; } |
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
@using EventHub.Web.Pages.Events |
|||
@using EventHub.Web.Pages.Events.Components.CreateEventArea |
|||
@model List<EventHub.Events.TrackDto> |
|||
|
|||
<partial name="_progressSection.cshtml" model="@CreateEventAreaViewComponent.ProgressStepType.NewSession"/> |
|||
|
|||
@if (Model is not null) |
|||
{ |
|||
<div class="row"> |
|||
<div class="col-md-10 mx-auto"> |
|||
<div class="card"> |
|||
<div class="card-body profile-content p-5" style="min-height: 480px;"> |
|||
<h2 class="mb-4">Add Session</h2> |
|||
<table class="table"> |
|||
<thead> |
|||
<tr> |
|||
@foreach (var track in Model) |
|||
{ |
|||
<th class="text-center" width="25%">@track.Name</th> |
|||
} |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
@foreach (var track in Model) |
|||
{ |
|||
<td> |
|||
@foreach (var session in track.Sessions) |
|||
{ |
|||
<div class="track-item"> |
|||
<span class="track-name">@session.Title</span> |
|||
<small class="text-primary d-block my-2">@EventDateHelper.GetTimeRangeText(TimeOnly.FromDateTime(session.StartTime), TimeOnly.FromDateTime(session.EndTime)) | @session.Language</small> |
|||
@foreach (var speaker in session.Speakers) |
|||
{ |
|||
<span class="d-block mb-2">@speaker.UserName</span> |
|||
} |
|||
<a href="javascript:;" data-bs-toggle="modal" data-bs-target="#editSessionModal" class="mt-3 d-block text-info"> |
|||
<small><i class="fa fa-edit me-1"></i>Edit</small> |
|||
</a> |
|||
</div> |
|||
} |
|||
<div class="big-square-btn text-center"> |
|||
<a href="javascript:;" data-bs-toggle="modal" data-bs-target="#addSessionModal" class="btn btn-outline-secondary d-block px-2 py-5"><i class="fa fa-plus mb-3"></i><br>Add New Session</a> |
|||
</div> |
|||
</td> |
|||
} |
|||
</tr> |
|||
|
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="card-footer bg-white border-0 p-5 pt-1"> |
|||
<div class="row"> |
|||
<div class="col-6"> |
|||
<button id="PreviousStepButtonInSessionSection" data-target-step="@CreateEventAreaViewComponent.ProgressStepType.NewTrack" class="btn btn-secondary step-transition"><i class="fa fa-arrow-left me-2"></i> Previous Step </button> |
|||
</div> |
|||
<div class="col-6 text-end"> |
|||
<button href="#" class="btn btn-success">Publish <i class="fa fa-arrow-right ms-2"></i></button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
Loading…
Reference in new issue