<commit_before>@using System.Collections.Generic
@using Microsoft.AspNetCore.Identity
@using scheduler.Models
@using scheduler.Models.SchedulerViewModels

@inject UserManager<ApplicationUser> UserManager

@model List<CalendarEventViewModel>

@{
    ViewData["Title"] = "Your Calendar";
}

<div class="mdl-grid calendar-header">
    <div class="mdl-typography--display-2-color-contrast mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone header">@ViewData["Title"]</div>
    <a class="mdl-cell mdl-cell--4-offset-desktop mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone" asp-controller="Scheduler" asp-action="Index">
        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Create a new event</button>
    </a>
</div>

<div class="mdl-grid">
@foreach (var calendarEvent in Model)
{
    <div class="mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone calendar-event">
        <div class="mdl-card mdl-shadow--2dp event-info">
            <div class="mdl-card__title mdl-card--border event-name">
                <h2 class="mdl-card__title-text">@calendarEvent.EventTitle</h2>
            </div>
            <div class="mdl-card__supporting-text mdl-card--border event-desc">@calendarEvent.EventDescription</div>
            <div class="mdl-card__supporting-text mdl-card--border event-time">
                <div><strong>Start:</strong> @calendarEvent.StartDateTime</div>
                <div><strong>End:</strong> @calendarEvent.EndDateTime</div>
            </div>
            <div class="mdl-card__supporting-text mdl-card--border event-invitees">
                @if (calendarEvent.InviteeEmails.Count() == 0)
                {
                    <div>No invitees!</div>
                }
                else {
                    <ul class="mdl-list">
                        @foreach (var email in calendarEvent.InviteeEmails)
                        {
                            <li class="mdl-list__item">@email</li>
                        }
                    </ul>
                }
            </div>
            <div class="mdl-card__supporting-text event-footer">
                @if (calendarEvent.CreatedById == @UserManager.GetUserId(User))
                {
                    <a asp-controller="Scheduler" asp-action="EditEvent" asp-route-eventId="@calendarEvent.EventId">
                        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Edit</button>
                    </a>
                    <a asp-controller="Scheduler" asp-action="RemoveEvent" asp-route-eventId="@calendarEvent.EventId">
                        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button">Remove</button>
                    </a>
                }
                else {
                    @calendarEvent.CreatedByEmail
                }
            </div>
        </div>
    </div>
}
</div>
@if (Model.Count() == 0)
{
    <div class="mdl-typography--display-3-color-contrast">You don't seem to have any events to show!</div>
}<commit_msg>fix giant no events text<commit_after>@using System.Collections.Generic
@using Microsoft.AspNetCore.Identity
@using scheduler.Models
@using scheduler.Models.SchedulerViewModels

@inject UserManager<ApplicationUser> UserManager

@model List<CalendarEventViewModel>

@{
    ViewData["Title"] = "Your Calendar";
}

<div class="mdl-grid calendar-header">
    <div class="mdl-typography--display-2-color-contrast mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone header">@ViewData["Title"]</div>
    <a class="mdl-cell mdl-cell--4-offset-desktop mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone" asp-controller="Scheduler" asp-action="Index">
        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Create a new event</button>
    </a>
</div>

<div class="mdl-grid">
@foreach (var calendarEvent in Model)
{
    <div class="mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone calendar-event">
        <div class="mdl-card mdl-shadow--2dp event-info">
            <div class="mdl-card__title mdl-card--border event-name">
                <h2 class="mdl-card__title-text">@calendarEvent.EventTitle</h2>
            </div>
            <div class="mdl-card__supporting-text mdl-card--border event-desc">@calendarEvent.EventDescription</div>
            <div class="mdl-card__supporting-text mdl-card--border event-time">
                <div><strong>Start:</strong> @calendarEvent.StartDateTime</div>
                <div><strong>End:</strong> @calendarEvent.EndDateTime</div>
            </div>
            <div class="mdl-card__supporting-text mdl-card--border event-invitees">
                @if (calendarEvent.InviteeEmails.Count() == 0)
                {
                    <div>No invitees!</div>
                }
                else {
                    <ul class="mdl-list">
                        @foreach (var email in calendarEvent.InviteeEmails)
                        {
                            <li class="mdl-list__item">@email</li>
                        }
                    </ul>
                }
            </div>
            <div class="mdl-card__supporting-text event-footer">
                @if (calendarEvent.CreatedById == @UserManager.GetUserId(User))
                {
                    <a asp-controller="Scheduler" asp-action="EditEvent" asp-route-eventId="@calendarEvent.EventId">
                        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Edit</button>
                    </a>
                    <a asp-controller="Scheduler" asp-action="RemoveEvent" asp-route-eventId="@calendarEvent.EventId">
                        <button class="mdl-button mdl-js-button mdl-button--raised mdl-button">Remove</button>
                    </a>
                }
                else {
                    @calendarEvent.CreatedByEmail
                }
            </div>
        </div>
    </div>
}
</div>
@if (Model.Count() == 0)
{
    <div class="mdl-typography--headline-color-contrast header">You don't seem to have any events to show!</div>
}
{'fraction_non_alphanumeric': 0.14322705939472408, 'fraction_numerical': 0.005340670011328694, 'mean_word_length': 1.9985443959243085, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '109603', 'n_tokens_mistral': 1907, 'n_tokens_neox': 1835, 'n_words': 299}