fixes the calendar choice

This commit is contained in:
Paul Schneider 2017-07-05 11:29:15 +02:00
commit c19441f786
12 changed files with 225 additions and 234 deletions

View file

@ -5,16 +5,16 @@
}
<form asp-action="SetGoogleCalendar">
@{ var entryNum=0; }
@foreach (var calendar in ViewBag.Calendars?.items)
@foreach (var calendar in Model.Calendars.Items)
{
entryNum++;
@if (calendar.accessRole=="owner") {
@if (calendar.AccessRole=="owner") {
<label >
<input type="radio" name="GoogleCalendarId" value="@calendar.id" id="cal@entryNum">
<input type="radio" name="GoogleCalendarId" value="@calendar.Id" id="cal@entryNum">
<span style="background-color: @calendar.backgroundColor; foreground-color: @calendar.foregroundColor;">
@calendar.summary </span>
<i>"@calendar.description"</i>
<span style="background-color: @calendar.BackgroundColor; foreground-color: @calendar.ForegroundColor;">
@calendar.Summary </span>
<i>"@calendar.Description"</i>
</label>
}

View file

@ -49,4 +49,3 @@
@inject IOptions<GoogleAuthSettings> GoogleSettings
@inject IOptions<SiteSettings> SiteSettings
@inject IHostingEnvironment HostingEnvironment
@inject ICalendarManager CalendarManager;