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:
@@ -6,7 +6,7 @@
|
||||
text="{{ text }}"
|
||||
action="dropdown#toggle"
|
||||
data-dropdown-target="button"
|
||||
controller="dropdown"
|
||||
controller=""
|
||||
/>
|
||||
<div class="absolute left-0 mt-2 w-max z-10 bg-gray-800 rounded-sm shadow-lg hidden"
|
||||
data-dropdown-target="menu">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
<div class="flex mr-2 items-center">
|
||||
{% for element in toolbar.leftGroup %}
|
||||
{% if element.type == 'button' %}
|
||||
{% set actionParts = element.action|split('#') %}
|
||||
<twig:ToolBarButton
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
controller="{{ actionParts[0] }}"
|
||||
data="{{ element.additionalProperties.data }}"
|
||||
/>
|
||||
{% elseif element.type == 'divider' %}
|
||||
@@ -25,10 +27,12 @@
|
||||
<div class="flex mr-2 items-center">
|
||||
{% for element in toolbar.rightGroup %}
|
||||
{% if element.type == 'button' %}
|
||||
{% set actionParts = element.action|split('#') %}
|
||||
<twig:ToolBarButton
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
controller="{{ actionParts[0] }}"
|
||||
data="{{ element.additionalProperties.data }}"
|
||||
/>
|
||||
{% elseif element.type == 'divider' %}
|
||||
|
||||
Reference in New Issue
Block a user