Update settings.html (#938)
The “settings.html” template has an else branch that shows Outlook Mail. That link assumes the Outlook integration app/urls are installed. Incase they aren’t, the reverse fails.
Using {% url 'outlook_view_records' as outlook_url %} makes the {% url %} tag not raise if the name doesn’t exist; it just sets an empty string. Then the {% if outlook_url %} hides the link.
This commit is contained in:
@@ -120,14 +120,17 @@
|
||||
>
|
||||
</div>
|
||||
{% else %}
|
||||
{% url 'outlook_view_records' as outlook_url %} <!-- Added this to gracefully handle exceptions -->
|
||||
{% if outlook_url %}
|
||||
<div class="oh-input-group">
|
||||
<a
|
||||
id="date"
|
||||
href="{% url 'outlook_view_records' %}"
|
||||
href="{{ outlook_url }}"
|
||||
class="oh-inner-sidebar__link oh-dropdown__link"
|
||||
>{% trans "Outlook Mail" %}</a
|
||||
>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="oh-input-group">
|
||||
{% if perms.horilla_backup.view_googledrivebackup %}
|
||||
@@ -641,3 +644,4 @@
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user