templates are now colapsable
This commit is contained in:
parent
7318ae24a2
commit
cf8983fd0b
2 changed files with 73 additions and 60 deletions
|
@ -10,66 +10,71 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h5>@_template.Title</h5>
|
<div @onclick="() => _isCollapsed = !_isCollapsed">
|
||||||
|
<h5>@_template.Title</h5>
|
||||||
|
|
||||||
<label style="white-space: pre-line">@_template.Description</label>
|
<label style="white-space: pre-line">@_template.Description</label>
|
||||||
|
|
||||||
<div >
|
<span class="timesblock">
|
||||||
<div class="times">
|
<div class="times">
|
||||||
<h5>Date</h5>
|
<h5>Date</h5>
|
||||||
<p>@_template.StartTime.ToLongDateString()</p>
|
<p>@_template.StartTime.ToLongDateString()</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="times">
|
<div class="times">
|
||||||
<h5>Time</h5>
|
<h5>Time</h5>
|
||||||
<p>from: @_template.StartTime.ToShortTimeString() to: @_template.EndTime.ToShortTimeString()</p>
|
<p>from: @_template.StartTime.ToShortTimeString() to: @_template.EndTime.ToShortTimeString()</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="times">
|
<div class="times">
|
||||||
<h5>TimeZone</h5>
|
<h5>TimeZone</h5>
|
||||||
<p>@_template.TimeZone</p>
|
<p>@_template.TimeZone</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="times">
|
||||||
|
<h5>Type</h5>
|
||||||
|
<p>@_template.EventType</p>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
@if (!_isCollapsed)
|
||||||
<div class="details">
|
{
|
||||||
<h5>Organizer</h5>
|
|
||||||
<p>@_template.Organizer</p>
|
|
||||||
</div>
|
|
||||||
<div class="details">
|
|
||||||
<h5>Guild</h5>
|
|
||||||
<p>@_template.Guild</p>
|
|
||||||
</div>
|
|
||||||
<div class="details">
|
|
||||||
<h5>Voice chat</h5>
|
|
||||||
<p>@_template.VoiceChat</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="times">
|
<div>
|
||||||
<h5>Type</h5>
|
<div class="details">
|
||||||
<p>@_template.EventType</p>
|
<h5>Organizer</h5>
|
||||||
</div>
|
<p>@_template.Organizer</p>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
<div>
|
<h5>Guild</h5>
|
||||||
<table class="table">
|
<p>@_template.Guild</p>
|
||||||
<tbody>
|
</div>
|
||||||
@foreach (var role in _template.Roles.OrderBy(r => r.RaidRoleId))
|
<div class="details">
|
||||||
{
|
<h5>Voice chat</h5>
|
||||||
<tr>
|
<p>@_template.VoiceChat</p>
|
||||||
<td><Label> <b>@role.Name</b> (@role.Spots) <br> @role.Description </Label></td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<AuthorizeView>
|
<div>
|
||||||
@if (_template.RaidOwnerId == _user.Id || _user.RoleAssignments.Max(a => a.LiebRole.Level) >= Constants.RaidEditPowerLevel)
|
<table class="table">
|
||||||
{
|
<tbody>
|
||||||
<button class="controlButton raidButton" @onclick="() => EditClicked()">Edit</button>
|
@foreach (var role in _template.Roles.OrderBy(r => r.RaidRoleId))
|
||||||
}
|
{
|
||||||
</AuthorizeView>
|
<tr>
|
||||||
|
<td><Label> <b>@role.Name</b> (@role.Spots) <br> @role.Description </Label></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<AuthorizeView>
|
||||||
|
@if (_template.RaidOwnerId == _user.Id || _user.RoleAssignments.Max(a => a.LiebRole.Level) >= Constants.RaidEditPowerLevel)
|
||||||
|
{
|
||||||
|
<button class="controlButton raidButton" @onclick="() => EditClicked()">Edit</button>
|
||||||
|
}
|
||||||
|
</AuthorizeView>
|
||||||
|
}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
@ -78,6 +83,8 @@
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public LiebUser? _user { get; set; }
|
public LiebUser? _user { get; set; }
|
||||||
|
|
||||||
|
bool _isCollapsed = true;
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
background-color: rgb(38 38 38);
|
background-color: rgb(38 38 38);
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
width: 700px;
|
/*width: 700px;*/
|
||||||
/*width: fit-content;*/
|
/*width: fit-content;*/
|
||||||
|
width: stretch;
|
||||||
color: lightgray;
|
color: lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,18 +12,23 @@ h5 {
|
||||||
color: lightgrey;
|
color: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.timesblock {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.times {
|
.times {
|
||||||
float: left;
|
display: inline-block;
|
||||||
display: inline;
|
width: 250px;
|
||||||
width: 33%;
|
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detailsblock {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.details {
|
.details {
|
||||||
float: left;
|
display: inline-block;
|
||||||
display: inline;
|
width: 250px;
|
||||||
width: 33%;
|
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue