If the project has no integrations, show an appropriate message in the Details page, "Notification Methods" section.

This commit is contained in:
Pēteris Caune 2020-03-09 12:57:24 +02:00
parent c8ebf73058
commit 26ad94d068
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 11 additions and 1 deletions

View File

@ -100,7 +100,7 @@
color: #888; color: #888;
} }
.alert.no-events { .alert.no-events, .alert.no-channels {
border: #ddd; border: #ddd;
background: #F5F5F5; background: #F5F5F5;
color: #444; color: #444;

View File

@ -191,6 +191,7 @@
<div class="details-block"> <div class="details-block">
<h2>Notification Methods</h2> <h2>Notification Methods</h2>
{% if channels %}
<table id="details-integrations" class="table"> <table id="details-integrations" class="table">
{% for channel in channels %} {% for channel in channels %}
<tr data-url="{% url 'hc-switch-channel' check.code channel.code %}" {% if channel in enabled_channels %}class="on"{% endif %}> <tr data-url="{% url 'hc-switch-channel' check.code channel.code %}" {% if channel in enabled_channels %}class="on"{% endif %}>
@ -206,6 +207,15 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% else %}
<div class="alert no-channels">
No notification methods set up yet.
<br />
Set up your preferred methods of notification in the
<a href="{% url 'hc-p-channels' project.code %}">Integrations</a>
page.
</div>
{% endif %}
</div> </div>
<div class="details-block"> <div class="details-block">