{% extends "base.html" %} {% from "icons.html" import icon, sep %} {% block title %}{{ _("Health") }} · {{ space.name }} · Synaptane{% endblock %} {% block crumbs %}{{ sep() }}{{ org.name }}{{ sep() }}{{ space.name }}{{ sep() }}{{ _("Health") }}{% endblock %} {% block content %} {% set space_tab = "health" %}{% include "space-tabs.html" %} {% set base = '/o/' ~ org.slug ~ '/' ~ space.slug %} {% set shown = 200 %} {% macro page_link(path) -%}{{ path }}{%- endmacro %} {% macro edit_link(path) -%}{% if contribute %}{{ _("Edit") }}{% endif %}{%- endmacro %} {# Column of the "Edit" button: narrow, aligned right. #} {% macro more(items) -%}{% if items|length > shown %}

{{ _("and {count} more", count=items|length - shown) }}

{% endif %}{%- endmacro %}

{{ _("Wiki health") }}

{{ _("Check without AI, at the latest commit: broken links, pages with no incoming link, empty or untitled pages, pages to review, pages not modified for a long time.") }}

{% if report is none %}
{{ _("The space has not been synchronized yet: nothing to check for now.") }}
{% else %}

{{ _(pl(report.pages, "{n} page checked", "{n} pages checked"), n=report.pages) }} · {% if report.problems %}{{ _(pl(report.problems, "{n} item to check", "{n} items to check"), n=report.problems) }}{% else %}{{ _("Nothing to check.") }}{% endif %}{% if report.commit %} · {{ report.commit[:10] }}{% endif %}

{{ _("Broken links") }} {{ report.broken|length }}

{% if report.broken %}
{% if contribute %}{% endif %}{% for item in report.broken[:shown] %}{% if contribute %}{% endif %}{% endfor %}
{{ _("Page") }}{{ _("Link") }}{{ _("Suggestion") }}{{ _("Actions") }}
{{ page_link(item.page) }}{{ item.link }}{% if item.suggestion %}{{ item.suggestion }}{% else %}—{% endif %}{{ edit_link(item.page) }}
{{ more(report.broken) }} {% else %}

{{ _("No broken links.") }}

{% endif %}

{{ _("Orphan pages") }} {{ report.orphans|length }}

{{ _("No other page links to them (folder home pages are not counted). Add a link from the folder index or from a page about the same topic.") }}

{% if report.orphans %}
{% for path in report.orphans[:shown] %}{% if contribute %}{% endif %}{% endfor %}
{{ page_link(path) }}{{ edit_link(path) }}
{{ more(report.orphans) }} {% endif %}

{{ _("Empty or untitled pages") }} {{ report.empty|length + report.untitled|length }}

{% if report.empty or report.untitled %}
{% for path in report.empty[:shown] %}{% if contribute %}{% endif %}{% endfor %} {% for path in report.untitled[:shown] %}{% if contribute %}{% endif %}{% endfor %}
{{ page_link(path) }}{{ _("Empty") }}{{ edit_link(path) }}
{{ page_link(path) }}{{ _("No level-1 heading") }}{{ edit_link(path) }}
{{ more(report.empty) }}{{ more(report.untitled) }} {% else %}

{{ _("Every page has a title and some content.") }}

{% endif %}

{{ _("Reported as outdated") }} {{ reported|length }}

{% if reported %}

{{ _("Readers say these pages no longer hold. Reread each one: “Mark as verified” closes its reports.") }}

{% for path, items in reported[:shown] %}{% endfor %}
{{ _("Page") }}{{ _("Latest report") }}
{{ page_link(path) }}{% if items|length > 1 %} {{ items|length }}{% endif %}{{ items[0].by or _("a former member") }} · · {{ _("“{reason}”", reason=items[0].reason) }}
{{ more(reported) }} {% else %}

{{ _("No page reported.") }}

{% endif %}

{{ _("Pages to review") }} {{ report.due|length }}

{{ _(pl(report.verified, "{n} verified, up-to-date page.", "{n} verified, up-to-date pages."), n=report.verified) }} {% if report.review_every %}{{ _("Space review period: {period}.", period=period_label(report.review_every)) }}{% else %}{{ _("With no review period set for the space, only pages that have their own (review_every) become due for review.") }}{% endif %}{% if can(actor.access, Action.MANAGE_ORG, org_id=space.org_id) %} {{ _("Change", context="link") }}{% endif %}

{% if report.due %}
{% for item in report.due[:shown] %}{% endfor %}
{{ _("Page") }}{{ _("Owner") }}{{ _("Due since") }}
{{ page_link(item.path) }}{% if item.owner %}{{ owner_label(item.owner) }}{% else %}—{% endif %}
{{ more(report.due) }} {% else %}

{{ _("No page to review.") }}

{% endif %} {% if report.unowned %}

{{ _("Verified, without an owner") }} {{ report.unowned|length }}

{{ _("Nobody answers for them: choose an owner in the page's ⋮ menu.") }}

{% for path in report.unowned[:shown] %}{% endfor %}
{{ page_link(path) }}
{{ more(report.unowned) }} {% endif %}

{{ _(pl(report.months, "Not changed for {n} months", "Not changed for {n} months"), n=report.months) }} {{ report.stale|length }}

{% if report.stale %}
{% if contribute %}{% endif %}{% for item in report.stale[:shown] %}{% if contribute %}{% endif %}{% endfor %}
{{ _("Page") }}{{ _("Last changed") }}{{ _("Actions") }}
{{ page_link(item.path) }}{{ edit_link(item.path) }}
{{ more(report.stale) }} {% else %}

{{ _("No page that old.") }}

{% endif %}
{% endif %} {% endblock %}