Theme component to use "Category icons" in "Events plugin" calendar

Discourse-events-calendar-icons

Repository: https://framagit.org/oca/discourse-events-calendar-icons.git

This component requires both:

After/Before

It removes the bullet in the calendar view and replaces it with the category icon defined in the [Category icons component] settings. If there is no category icon, the bullet is still removed as one can see for Vendredi (Friday) 3rd.

Settings

  • show locked category icon : add the lock icon for private categories

How to install

Repository: https://framagit.org/oca/discourse-events-calendar-icons.git

12 Likes

Nice work @oca!

I think you can avoid the hack with the category icons component by including the {{category-link}} helper instead of mounting the category-icons widget. I tried locally with

{{category-link event.topic.category hideParent="true"}}

and it works well, it needs some styling adjustments to hide the category label, but otherwise, the icons show up for parent and non-parent categories.

4 Likes

I’ve applied the hack you suggested.
The display is almost equivalent and do not require the extra step.
By the way, I’ve used the lock icon from category-link in a theme setting.

I can’t modify the top post removing the instruction. Can someone wiki the post or give me the right to amend it ? Thanks in advance.

1 Like

Great, I have updated the topic to make the original post a wiki so you can edit.

2 Likes