Added:
- Monitoring chapters - possibilities for ToolBarButton.html.twig to have tailwind classes see ChapterListToolbar.php - Makefile scheduler command - Makefile make:message command
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
{# templates/components/ToolbarButton.html.twig #}
|
||||
{% set buttonAttributes = {} %}
|
||||
|
||||
{% set buttonClass = 'text-white' %}
|
||||
{% if data is defined and data is not empty %}
|
||||
{% for key, value in data %}
|
||||
{% set dataAttribute = 'data-' ~ key|replace({'_': '-'})|lower ~ '=' ~ value %}
|
||||
{% set buttonAttributes = buttonAttributes|merge({dataAttribute}) %}
|
||||
{% set dataKey = 'data-' ~ key|replace({'_': '-'})|lower %}
|
||||
{% set buttonAttributes = buttonAttributes|merge({ (dataKey): value }) %}
|
||||
{% endfor %}
|
||||
{% if data['buttonClass'] is defined %}
|
||||
{% set buttonClass = data['buttonClass'] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div {{ attributes }}>
|
||||
<button class="flex flex-col justify-around min-h-14 w-min ml-4 items-center text-white group"
|
||||
{% if action %}
|
||||
<button class="flex flex-col justify-around min-h-14 w-min ml-4 items-center group {{ buttonClass }}"
|
||||
data-controller="{{ controller }}"
|
||||
data-action="{{ action }}"
|
||||
{% endif %}
|
||||
{{ buttonAttributes|join(' ') }}
|
||||
{% for attrName, attrValue in buttonAttributes %}
|
||||
{{ attrName }}="{{ attrValue }}"
|
||||
{% endfor %}
|
||||
>
|
||||
<i data-toolbar-target="icon" class="fas fa-{{ icon }} text-xl group-hover:text-green-500"></i>
|
||||
<span class="text-xs">{{ text }}</span>
|
||||
<i data-{{ controller }}-target="icon" class="fas fa-{{ icon }} text-xl group-hover:text-green-500"></i>
|
||||
<span data-{{ controller }}-target="text" class="text-xs">{{ text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user