Skip to content

Conversation

@gloriafolaron
Copy link
Contributor

Summary

  • Adds extensible Connect Calendar modal for connecting external calendars
  • Adds extensible Calendar Settings modal for managing calendar integrations
  • Provides filter hooks for plugins to inject their own calendar providers and settings sections

Changes

New Controllers

  • ConnectCalendar.php - Modal for connecting external calendars with filter connectOptions.providers
  • CalendarSettings.php - Modal for calendar settings with filter calendarSettings.sections

New Templates

  • connectCalendar.blade.php - Extensible modal with built-in iCal URL import
  • calendarSettings.blade.php - Settings modal showing connected calendars and plugin sections

Plugin Integration

Plugins can register their calendar providers via filters:

// Add to Connect Calendar modal
EventDispatcher::add_filter_listener(
    'leantime.domain.calendar.controllers.connectcalendar.run.connectOptions.providers',
    function (array $providers) {
        $providers[] = [
            'id' => 'myplugin',
            'icon' => 'fa fa-calendar',
            'title' => 'My Calendar',
            'description' => 'Connect your calendar',
            'actionUrl' => '/myplugin/connect',
            'actionLabel' => 'Connect',
        ];
        return $providers;
    }
);

// Add to Calendar Settings modal
EventDispatcher::add_filter_listener(
    'leantime.domain.calendar.controllers.calendarsettings.get.calendarSettings.sections',
    function (array $sections) {
        $sections[] = [
            'id' => 'myplugin',
            'title' => 'My Calendar Settings',
            'content' => '<p>Settings content here</p>',
        ];
        return $sections;
    }
);

Related

Test plan

  • Click "Connect Calendar" in calendar sidebar - modal should open with iCal option
  • With Google Calendar plugin enabled, modal should show Google Calendar option
  • Calendar Settings modal shows connected external calendars
  • Plugin sections appear in Calendar Settings when plugins are enabled

cc @marcelfolaron

🤖 Generated with Claude Code

gloriafolaron and others added 2 commits January 26, 2026 11:25
… modals

- Add ConnectCalendar controller with plugin filter hook for providers
- Add CalendarSettings controller with plugin filter hook for sections
- Add connectCalendar.blade.php modal with embedded iCal form
- Add calendarSettings.blade.php modal for managing connected calendars
- Update showMyCalendar sidebar with Connect Calendar and Settings links
- Add language strings for calendar connection UI

Plugins can register calendar providers via filter:
leantime.domain.calendar.controllers.connectcalendar.run.connectOptions.providers

Plugins can register settings sections via filter:
leantime.domain.calendar.controllers.calendarsettings.get.calendarSettings.sections

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace tailwind classes with standard Leantime modal styling
- Use widgettitle title-light for headers
- Use boxedContent class for sections
- Use standard form layout with labels and br breaks
- Use subtitle class for section headers
- Consistent with importGCal.blade.php and other system modals

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@gloriafolaron gloriafolaron requested a review from a team as a code owner January 26, 2026 20:10
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants