Event status styling & render description as MarkupString

This commit is contained in:
Konstantin Hintermayer
2025-06-22 12:00:13 +02:00
parent 16cfe54fed
commit 939b42a90d

View File

@ -11,9 +11,9 @@
<h3>Anmeldung zum Event</h3>
<p>Willst du am Event (@_name) teilnehmen?</p>
<span>@_eventDate - @_location</span>
<span class="mb-6">@_eventDate.ToLocalTime() - @_location</span>
<div>
<p>@_description</p>
@((MarkupString)_description)
</div>
@if (PageState.User != null) {
@ -23,11 +23,11 @@
<p class="mt-3"><strong>Status:</strong>
@if (Status == true)
{
@Localizer["Zusage"]
@Localizer["Zusage"]<br />
<button class="btn btn-danger" @onclick="Absage">@Localizer["Absagen"]</button>
} else
{
@Localizer["Absage"]
@Localizer["Absage"]<br />
<button class="btn btn-success" @onclick="Zusage">@Localizer["Zusagen"]</button>
}
</p>
@ -63,11 +63,6 @@
private DateTime _eventDate;
private string _location;
private string _createdby;
private DateTime _createdon;
private string _modifiedby;
private DateTime _modifiedon;
private Response _response;
private bool? Status;
@ -112,12 +107,8 @@
{
_name = currentEvent.Name;
_description = currentEvent.Description;
_eventDate = currentEvent.EventDate.ToLocalTime();
_eventDate = currentEvent.EventDate;
_location = currentEvent.Location;
_createdby = currentEvent.CreatedBy;
_createdon = currentEvent.CreatedOn.ToLocalTime();
_modifiedby = currentEvent.ModifiedBy;
_modifiedon = currentEvent.ModifiedOn.ToLocalTime();
}
if(rsvp != null)