fixes the calendar choice

This commit is contained in:
2017-07-05 11:29:15 +02:00
parent 0952e80d4a
commit 13297a04ed
12 changed files with 218 additions and 227 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;