예제 #1
0
    }
    if (array_key_exists('weekdays', $repeat)) {
        $repeat_weekdays_ = array();
        $days = OC_Calendar_App::getWeeklyOptions();
        foreach ($repeat['weekdays'] as $weekday) {
            $repeat_weekdays_[] = $days[$weekday];
        }
        $repeat['weekdays'] = $repeat_weekdays_;
    }
} else {
    $repeat['repeat'] = 'doesnotrepeat';
}
$calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
$category_options = OC_Calendar_App::getCategoryOptions();
$repeat_options = OC_Calendar_App::getRepeatOptions();
$repeat_end_options = OC_Calendar_App::getEndOptions();
$repeat_month_options = OC_Calendar_App::getMonthOptions();
$repeat_year_options = OC_Calendar_App::getYearOptions();
$repeat_weekly_options = OC_Calendar_App::getWeeklyOptions();
$repeat_weekofmonth_options = OC_Calendar_App::getWeekofMonth();
$repeat_byyearday_options = OC_Calendar_App::getByYearDayOptions();
$repeat_bymonth_options = OC_Calendar_App::getByMonthOptions();
$repeat_byweekno_options = OC_Calendar_App::getByWeekNoOptions();
$repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
if ($permissions & OCP\Share::PERMISSION_UPDATE) {
    $tmpl = new OCP\Template('calendar', 'part.editevent');
} elseif ($permissions & OCP\Share::PERMISSION_READ) {
    $tmpl = new OCP\Template('calendar', 'part.showevent');
}
$tmpl->assign('eventid', $id);
$tmpl->assign('permissions', $permissions);