-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathTalkEntry.razor
More file actions
55 lines (49 loc) · 1.4 KB
/
Copy pathTalkEntry.razor
File metadata and controls
55 lines (49 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@using LinkDotNet.Blog.Domain
<li class="pb-1">
<div class="row">
<div class="col-10" id="talk-display-content">
<p class="text-body-secondary mb-0 small">@Talk.PublishedDate.ToShortDateString()</p>
<strong class="fs-5">@Talk.PresentationTitle</strong>
<p id="talk-place" class="text-body-secondary">@Talk.Place</p>
<div id="talk-description">
@MarkdownConverter.ToMarkupString(Talk.Description)
</div>
</div>
<div class="col-2">
@if (ShowAdminActions)
{
<button id="talk-delete" type="button" class="btn btn-outline-secondary" aria-label="Delete Talk" @onclick="() => TalkDeleted.InvokeAsync()">
<i class="bin2" aria-hidden="true"></i>
</button>
}
</div>
</div>
</li>
<hr class="m-0" />
@code {
[Parameter]
public bool ShowAdminActions { get; set; }
[Parameter]
public EventCallback TalkDeleted { get; set; }
[Parameter, EditorRequired]
public required Talk Talk { get; set; }
public override Task SetParametersAsync(ParameterView parameters)
{
foreach (var parameter in parameters)
{
switch (parameter.Name)
{
case nameof(Talk):
Talk = (Talk)parameter.Value;
break;
case nameof(ShowAdminActions):
ShowAdminActions = (bool)parameter.Value;
break;
case nameof(TalkDeleted):
TalkDeleted = (EventCallback)parameter.Value;
break;
}
}
return base.SetParametersAsync(ParameterView.Empty);
}
}