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:
Joseph Nuthalapati 2019-11-20 05:02:48 +05:30
parent 6f975a159c
commit c2412621b3
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

View File

@ -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 %}