Skip to content

Commit f07208a

Browse files
author
Till Brehm
committed
Merge branch '6512-hide-empty-dashlets' into 'develop'
Only display a dashlet table if there is content for it, #6512 See merge request ispconfig/ispconfig3!1749
2 parents 756531b + d6a86bf commit f07208a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

interface/web/dashboard/dashlets/databasequota.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ function show($limit_to_client_id = null) {
4141
$databases = $app->functions->htmlentities($databases);
4242
$tpl->setloop('databasequota', $databases);
4343
$has_databasequota = isset($databases[0]['used']);
44+
45+
$tpl->setVar('has_databasequota', $has_databasequota);
46+
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
47+
48+
return $tpl->grab();
4449
}
45-
$tpl->setVar('has_databasequota', $has_databasequota);
46-
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
47-
48-
return $tpl->grab();
4950
}
5051

5152
}

interface/web/dashboard/dashlets/mailquota.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ function show($limit_to_client_id = null) {
3737
//$emails = $app->functions->htmlentities($emails);
3838
$tpl->setloop('mailquota', $emails);
3939
$has_mailquota = isset($emails[0]['used']);
40-
}
41-
$tpl->setVar('has_mailquota', $has_mailquota);
42-
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
4340

44-
return $tpl->grab();
41+
$tpl->setVar('has_mailquota', $has_mailquota);
42+
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
43+
44+
return $tpl->grab();
45+
}
4546
}
4647

4748
}

interface/web/dashboard/dashlets/quota.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ function show($limit_to_client_id = null) {
4545
$sites = $app->functions->htmlentities($sites);
4646
$tpl->setloop('quota', $sites);
4747
$has_quota = isset($sites[0]['used']);
48-
}
49-
$tpl->setVar('has_quota', $has_quota);
50-
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
51-
52-
return $tpl->grab();
5348

49+
$tpl->setVar('has_quota', $has_quota);
50+
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
5451

52+
return $tpl->grab();
53+
}
5554
}
5655

5756
}

0 commit comments

Comments
 (0)