mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-10 11:00:22 +00:00
pagekite: Show existing services only if there are any
Reduces visual noise on the page. Some formatting changes Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
parent
6f975a159c
commit
c2412621b3
@ -40,23 +40,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block configuration %}
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
|
||||
<h3>{% trans "Custom Services" %}</h3>
|
||||
<h3>{% trans "Custom Services" %}</h3>
|
||||
|
||||
<a href="{% url 'pagekite:add-custom-service' %}" class="btn btn-primary"
|
||||
role="button" title="{% trans 'Add Custom Service' %}">
|
||||
<span class="fa fa-plus" aria-hidden="true"></span>
|
||||
{% trans 'Add Custom Service' %}
|
||||
</a>
|
||||
<a href="{% url 'pagekite:add-custom-service' %}" class="btn btn-primary"
|
||||
role="button" title="{% trans 'Add Custom Service' %}">
|
||||
<span class="fa fa-plus" aria-hidden="true"></span>
|
||||
{% trans 'Add Custom Service' %}
|
||||
</a>
|
||||
|
||||
{% if custom_services %}
|
||||
<div>
|
||||
<h4>{% trans "Existing custom services" %}</h4>
|
||||
|
||||
{% if not custom_services %}
|
||||
<i>{% trans "You don't have any Custom Services enabled" %}</i>
|
||||
{% endif %}
|
||||
|
||||
<div class="list-group">
|
||||
{% for service in custom_services %}
|
||||
{% create_pagekite_service_url service kite_name as service_url %}
|
||||
@ -84,11 +81,12 @@
|
||||
title="{% trans "Delete this service" %}">
|
||||
<span class="fa fa-trash-o" aria-hidden="true">
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user