show note if no entries exist for a listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Froxlor\UI;
|
||||
|
||||
use Froxlor\UI\Panel\UI;
|
||||
@@ -32,6 +33,7 @@ class Listing
|
||||
'tr' => self::generateTableRows($collection['data']['list'], $tabellisting),
|
||||
],
|
||||
'pagination' => $collection['pagination'],
|
||||
'empty_msg' => $tabellisting['empty_msg'] ?? null
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ return [
|
||||
'domain_list' => [
|
||||
'title' => $lng['admin']['domains'],
|
||||
'icon' => 'fa-solid fa-user',
|
||||
'empty_msg' => $lng['admin']['domain_nocustomeraddingavailable'],
|
||||
'columns' => [
|
||||
'd.domain_ace' => [
|
||||
'label' => $lng['domains']['domainname'],
|
||||
|
||||
@@ -2146,3 +2146,4 @@ $lng['ssl_certificates']['certificate_for'] = 'Certificate for';
|
||||
$lng['ssl_certificates']['valid_from'] = 'Valid from';
|
||||
$lng['ssl_certificates']['valid_until'] = 'Valid until';
|
||||
$lng['ssl_certificates']['issuer'] = 'Issuer';
|
||||
$lng['panel']['listing_empty'] = 'No entries found';
|
||||
|
||||
@@ -1788,3 +1788,4 @@ $lng['serversettings']['acmeshpath']['description'] = 'Installationspfad zu acme
|
||||
|
||||
$lng['panel']['usage_statistics'] = 'Resourcen-Verbrauch';
|
||||
$lng['panel']['security_question'] = 'Sicherheitsabfrage';
|
||||
$lng['panel']['listing_empty'] = 'Keine Einträge gefunden';
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if listing.table.tr|length == 0 %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h4 class="alert-heading">{{ lng('admin.note') }}</h4>
|
||||
<p>{{ listing.empty_msg|default(lng('panel.listing_empty'))|raw }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card table-responsive">
|
||||
<table class="table table-borderless table-striped table-sm mb-0 px-3">
|
||||
<thead>
|
||||
@@ -24,7 +30,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tr in listing.table.tr %}
|
||||
<tr {% if tr.class is defined %}class="{{ tr.class }}"{% endif %}>
|
||||
<tr {% if tr.class is defined %} class="{{ tr.class }}" {% endif %}>
|
||||
{% for td in tr.td %}
|
||||
<td class="px-3{% if td.class is defined %} {{ td.class }}{% endif %}">
|
||||
{% if td.data is iterable %}
|
||||
@@ -56,6 +62,7 @@
|
||||
{{ pagination.paging(listing.pagination) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user