fix titles

This commit is contained in:
envoyr
2022-02-22 19:10:53 +01:00
parent 8f7876b850
commit 4af1dff6fd
3 changed files with 8 additions and 6 deletions

View File

@@ -44,6 +44,8 @@ class Listing
} }
return [ return [
'title' => $tabellisting['title'],
'icon' => $tabellisting['icon'],
'table' => $table, 'table' => $table,
'pagination' => null, // TODO: write some logic 'pagination' => null, // TODO: write some logic
]; ];

View File

@@ -1,12 +1,12 @@
{% macro table(listing, action, title = "") %} {% macro table(listing) %}
<form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form"> <form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
{% if title is not empty %} {% if listing.title is not empty %}
<h3 class="page-header"> <h3 class="page-header">
{% if table_options.icon is not empty %} {% if listing.icon is not empty %}
<i class="{{ table_options.icon }}"></i> <i class="{{ listing.icon }}"></i>
{% endif %} {% endif %}
{{ title }} {{ listing.title }}
</h3> </h3>
{% endif %} {% endif %}

View File

@@ -4,6 +4,6 @@
{% import "Froxlor/table/table.html.twig" as table %} {% import "Froxlor/table/table.html.twig" as table %}
{{ table.table(listing, table_options.title) }} {{ table.table(listing) }}
{% endblock %} {% endblock %}