Improvements for home page and formatting
This commit is contained in:
@@ -1,49 +1,34 @@
|
||||
@using WebApp.Models
|
||||
@*
|
||||
<MudTooltip Text="Level of Effort">@AppIcons.LevelOfEffortIcon(EventDefinition.LevelOfEffort)</MudTooltip>
|
||||
|
||||
@if(EventDefinition.EventFormat == EventFormat.Individual) {
|
||||
<MudTooltip Text="Individual">@AppIcons.IndividualEvent</MudTooltip>
|
||||
}
|
||||
@if (EventDefinition.OnSiteActivity)
|
||||
{
|
||||
<MudTooltip Text="On-site Activity"> @AppIcons.OnSiteActivity</MudTooltip>
|
||||
}
|
||||
|
||||
@if (EventDefinition.RegionalEvent)
|
||||
{
|
||||
<MudTooltip Text="Regional Event">@AppIcons.RegionalEvent</MudTooltip>
|
||||
}
|
||||
|
||||
@if (EventDefinition.Presubmission)
|
||||
{
|
||||
<MudTooltip Text="Presubmission Event">@AppIcons.PresubmissionEvent</MudTooltip>
|
||||
} *@
|
||||
|
||||
|
||||
@AppIcons.LevelOfEffortIcon(EventDefinition.LevelOfEffort)
|
||||
|
||||
@if (EventDefinition.EventFormat == EventFormat.Individual)
|
||||
{
|
||||
@AppIcons.IndividualEvent
|
||||
}
|
||||
@if (EventDefinition.OnSiteActivity)
|
||||
{
|
||||
@AppIcons.OnSiteActivity
|
||||
}
|
||||
|
||||
@if (EventDefinition.RegionalEvent)
|
||||
{
|
||||
@AppIcons.RegionalEvent
|
||||
}
|
||||
|
||||
@if (EventDefinition.Presubmission)
|
||||
{
|
||||
@AppIcons.PresubmissionEvent
|
||||
}
|
||||
<MudText Style="font-family: monospace; white-space: pre;">
|
||||
@foreach (var charStr in _attributes.Select(c => c.ToString()))
|
||||
{
|
||||
if (AppIcons.IconTooltips.TryGetValue(charStr, out var tooltip))
|
||||
{
|
||||
<MudTooltip Text="@tooltip">@charStr</MudTooltip>
|
||||
}
|
||||
else
|
||||
{
|
||||
@charStr
|
||||
}
|
||||
}
|
||||
</MudText>
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public EventDefinition EventDefinition { get; set; }
|
||||
|
||||
private string _attributes;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
_attributes = AppIcons.LevelOfEffortIcon(EventDefinition.LevelOfEffort);
|
||||
_attributes += " ";
|
||||
_attributes += EventDefinition.EventFormat == EventFormat.Individual ? AppIcons.IndividualEvent : " ";
|
||||
_attributes += EventDefinition.OnSiteActivity ? AppIcons.OnSiteActivity : " ";
|
||||
_attributes += EventDefinition.RegionalEvent ? AppIcons.RegionalEvent : " ";
|
||||
_attributes += EventDefinition.InterviewOrPresentation ? AppIcons.PresentationEvent : " ";
|
||||
_attributes += EventDefinition.Presubmission ? AppIcons.PresubmissionEvent : " ";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user