Add button when there are no servers

This commit is contained in:
TimZ99 2019-05-18 01:25:13 +02:00
parent 5511cd5579
commit 5b0fba63aa
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
2 changed files with 6 additions and 2 deletions

View File

@ -62,6 +62,8 @@ class StatusController extends AbstractServerController {
'label_rtime' => psm_get_lang('servers', 'latency'),
'block_layout_active' => ($layout == 0) ? 'active' : '',
'list_layout_active' => ($layout != 0) ? 'active' : '',
'label_add_server' => psm_get_lang('system', 'add_new'),
'url_save' => psm_build_url(array('mod' => 'server', 'action' => 'edit')),
);
$this->setHeaderAccessories($this->twig->render('module/server/status/header.tpl.html', $layout_data));

View File

@ -36,7 +36,8 @@
{% endfor %}
{% if not servers_offline and not servers_online %}
{{ label_none }}
<!-- TODO knop om nieuwe server toe te voegen -->
<div class="w-100"></div>
<button class="btn btn-primary" onclick="window.location.href='{{ url_save|raw }}'">{{ label_add_server }}</button>
{% endif %}
</div>
</div>
@ -87,7 +88,8 @@
</table>
{% else %}
{{ label_none }}
<!-- TODO knop om nieuwe server toe te voegen -->
<div class="w-100"></div>
<button class="btn btn-primary" onclick="window.location.href='{{ url_save|raw }}'">{{ label_add_server }}</button>
{% endif %}
</div>
</div>