Composant de thème pour utiliser les "Category icons" dans le calendrier du plugin "Events plugin"

Icônes de calendrier pour les événements Discourse

Répertoire : https://framagit.org/oca/discourse-events-calendar-icons.git

Ce composant nécessite à la fois :

Avant/Après

Il supprime le point dans la vue calendrier et le remplace par l’icône de catégorie définie dans les paramètres du [composant Icônes de catégorie]. S’il n’y a pas d’icône de catégorie, le point est tout de même supprimé, comme on peut le voir pour Vendredi 3.

Paramètres

  • show locked category icon : ajoute l’icône de verrouillage pour les catégories privées

Comment installer

Répertoire : https://framagit.org/oca/discourse-events-calendar-icons.git

13 « J'aime »

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 « J'aime »

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 « J'aime »

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

2 « J'aime »