Browse Source

Refactor comments, fix template

imwald
Nuša Pukšič 3 months ago
parent
commit
baa1a9326e
  1. 12
      templates/components/Organisms/Comments.html.twig

12
templates/components/Organisms/Comments.html.twig

@ -1,11 +1,9 @@
{% set existing = attributes.all()['data-controller'] ?? '' %}
{% set merged = (existing ? existing ~ ' ' : '') ~ 'comments-mercure' %}
<div <div
{{ attributes.add('data-controller', merged) }} {{ attributes
data-comments-mercure-coordinate-value="{{ current }}" .add(stimulus_controller('comments-mercure', { coordinate: current }))
data-comments-mercure-target="loading" .add(stimulus_target('comments-mercure', 'loading'))
data-comments-mercure-target="list" .add(stimulus_target('comments-mercure', 'list'))
}}
id="comments-{{ current|e('html_attr') }}" id="comments-{{ current|e('html_attr') }}"
class="comments" class="comments"
> >

Loading…
Cancel
Save