{% extends "../_todo_dashboard_row.html" %}
{% load i18n %}
{% block todo_dashboard_icon %}
    link
{% endblock todo_dashboard_icon %}
{% block todo_dashboard_title_link %}
    {% url 'linkcheck' region_slug=request.region.slug url_filter='invalid' %}
{% endblock todo_dashboard_title_link %}
{% block todo_dashboard_title %}
    {% translate "Broken links" %}
{% endblock todo_dashboard_title %}
{% block todo_dashboard_number %}
    {% with total=broken_links|length %}
        {{ block.super }}
    {% endwith %}
{% endblock todo_dashboard_number %}
{% block todo_dashboard_description %}
    {% if broken_links %}
        {% blocktranslate trimmed %}
            The page <b>{{ relevant_translation }}</b> has a broken link. Please replace it by a functional link.
        {% endblocktranslate %}
    {% else %}
        {% blocktranslate trimmed %}
            At the moment there are no broken links. Good job!
        {% endblocktranslate %}
    {% endif %}
{% endblock todo_dashboard_description %}
{% block todo_dashboard_button_link %}
    {% if broken_links %}
        <a class="btn !rounded-full"
           href="{% url 'edit_url' region_slug=request.region.slug url_filter='invalid' url_id=relevant_url.id %}#replace-url">
            {% translate "Go to link" %}
        </a>
    {% else %}
        <i class="h-8 w-8 text-green-500" icon-name="check-circle-2"></i>
    {% endif %}
{% endblock todo_dashboard_button_link %}
