* DEV: Add backend functionality to enable/disable holidays This will add two backend endpoints, one to disable holidays and another to enable holidays. I also introduced a new `Holiday` service that is responsible for getting the holidays and attaching a new `disabled` attribute to the holidays. The `#index` action has been updated to use this new service, so it will return this new `disabled` attribute. * DEV: Only add enabled holidays to the calendar I updated this job so that it will use the new `Holiday` service, which will return the holidays like before but with a new `disabled` field, which this job will use to only add enabled holidays to the calendar. * FEATURE: Allow admins to disable/enable holidays The main thing I added here is a new component `admin-holiday-list-item` that is responsible for displaying a holiday, and an enable or disable button and the corresponding functionality. |
||
|---|---|---|
| .github/workflows | ||
| app | ||
| assets | ||
| config | ||
| db | ||
| jobs | ||
| lib | ||
| public/javascripts | ||
| spec | ||
| test/javascripts | ||
| vendor/holidays | ||
| .discourse-compatibility | ||
| .eslintrc | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| .rubocop.yml | ||
| .template-lintrc.js | ||
| Gemfile | ||
| Gemfile.lock | ||
| LICENSE | ||
| README.md | ||
| package.json | ||
| plugin.rb | ||
| translator.yml | ||
| yarn.lock | ||
README.md
Discourse Calendar
Adds the ability to create a dynamic calendar in the first post of a topic.
Topic discussing the plugin itself can be found here: https://meta.discourse.org/t/discourse-calendar/97376
Customisation
Plugins
Events
discourse_post_event_event_will_startthis DiscourseEvent will be triggered one hour before an event startsdiscourse_post_event_event_startedthis DiscourseEvent will be triggered when an event startsdiscourse_post_event_event_endedthis DiscourseEvent will be triggered when an event ends
Custom Fields
Custom fields can be set in plugin settings. Once added a new form will appear on event UI. These custom fields are available when a plugin event is triggered.
Holidays
To add/remove/correct a holiday, edit the relevant definition files and run rake generate:definitions in the vendor/holidays
directory. Syntax of definition files can be found in vendor/holidays/definitions/doc/SYNTAX.md.