Commit cf9648d0 authored by Michal Čihař's avatar Michal Čihař

Indicate severity of an error

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 0a7045c6
...@@ -353,22 +353,22 @@ ...@@ -353,22 +353,22 @@
<tr><th>{% trans "Monthly price" %}</th><td>{{ plan.price }} EUR</td><td></td></tr> <tr><th>{% trans "Monthly price" %}</th><td>{{ plan.price }} EUR</td><td></td></tr>
<tr><th>{% trans "Yearly price" %}</th><td>{{ plan.yearly_price }} EUR</td><td></td></tr> <tr><th>{% trans "Yearly price" %}</th><td>{{ plan.yearly_price }} EUR</td><td></td></tr>
<tr><th>{% trans "Strings limit" %}</th> <tr><th>{% trans "Strings limit" %}</th>
{% with plan.display_limit_strings as total and billing.count_strings as used %} {% with plan.limit_strings as max and plan.display_limit_strings as total and billing.count_strings as used %}
{% include "billing-used.html" %} {% include "billing-used.html" %}
{% endwith %} {% endwith %}
</tr> </tr>
<tr><th>{% trans "Languages limit" %}</th> <tr><th>{% trans "Languages limit" %}</th>
{% with plan.display_limit_languages as total and billing.count_languages as used %} {% with plan.limit_languages as max and plan.display_limit_languages as total and billing.count_languages as used %}
{% include "billing-used.html" %} {% include "billing-used.html" %}
{% endwith %} {% endwith %}
</tr> </tr>
<tr><th>{% trans "Repositories limit" %}</th> <tr><th>{% trans "Repositories limit" %}</th>
{% with plan.display_limit_repositories as total and billing.count_repositories as used %} {% with plan.limit_repositories as max and plan.display_limit_repositories as total and billing.count_repositories as used %}
{% include "billing-used.html" %} {% include "billing-used.html" %}
{% endwith %} {% endwith %}
</tr> </tr>
<tr><th>{% trans "Projects limit" %}</th> <tr><th>{% trans "Projects limit" %}</th>
{% with plan.display_limit_projects as total and billing.projects.count as used %} {% with plan.limit_projects as max and plan.display_limit_projects as total and billing.projects.count as used %}
{% include "billing-used.html" %} {% include "billing-used.html" %}
{% endwith %} {% endwith %}
</tr> </tr>
......
...@@ -13,11 +13,15 @@ ...@@ -13,11 +13,15 @@
{% if total == 0 %} {% if total == 0 %}
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div>
{% else %} {% else %}
{% if used > max %}
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div>
{% else %}
{% if used > total %} {% if used > total %}
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div> <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"></div>
{% else %} {% else %}
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ used }}" aria-valuemin="0" aria-valuemax="{{ total }}" style="width: {% widthratio used total 100 %}%;"></div> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ used }}" aria-valuemin="0" aria-valuemax="{{ total }}" style="width: {% widthratio used total 100 %}%;"></div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
</div> </div>
</td> </td>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment