Adds the ability to create a dynamic calendar in the first post of a topic.
Go to file
Shaun d31e07c01c
Allow admins to enable and disable holidays (#283)
* 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.
2022-06-28 19:43:20 -03:00
.github/workflows DEV: Update CI workflows (#289) 2022-06-17 21:33:43 +02:00
app Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
assets Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
config Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
db Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
jobs Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
lib SECURITY: correctly escape event name (#280) 2022-06-13 11:13:56 -06:00
public/javascripts DEV: more explicit filename 2018-12-27 19:48:30 +01:00
spec Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
test/javascripts Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
vendor/holidays FEATURE: Add Indonesia holidays (#291) 2022-06-24 11:42:15 +08:00
.discourse-compatibility DEV: Use 6.1 migration for compatibility (#286) 2022-06-15 12:02:33 -06:00
.eslintrc DEV: adds eslint config support 2019-12-30 15:24:06 +01:00
.gitignore DEV: apply coding standards (#59) 2020-09-04 13:22:32 +02:00
.prettierignore DEV: Fix path 2020-09-25 12:00:01 -05:00
.prettierrc DEV: apply coding standards (#59) 2020-09-04 13:22:32 +02:00
.rubocop.yml DEV: Move to rubocop-discourse. 2020-05-06 17:56:08 +02:00
.template-lintrc.js DEV: apply coding standards (#59) 2020-09-04 13:22:32 +02:00
Gemfile DEV: Move to rubocop-discourse. 2020-05-06 17:56:08 +02:00
Gemfile.lock Build(deps): Bump rexml from 3.2.4 to 3.2.5 (#127) 2021-05-02 17:10:30 +02:00
LICENSE first commit 2018-06-06 15:24:56 +02:00
README.md Fix path for definitions file syntax. 2021-06-07 12:45:46 +08:00
package.json DEV: Fix imports (#242) 2022-03-06 21:16:50 +01:00
plugin.rb Allow admins to enable and disable holidays (#283) 2022-06-28 19:43:20 -03:00
translator.yml DEV: Add Crowdin support (#84) 2020-12-22 13:08:54 +01:00
yarn.lock Build(deps): Bump async from 2.6.3 to 2.6.4 (#258) 2022-04-29 18:01:28 +02:00

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_start this DiscourseEvent will be triggered one hour before an event starts
  • discourse_post_event_event_started this DiscourseEvent will be triggered when an event starts
  • discourse_post_event_event_ended this 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.