{% extends "admin/_layout.html" %} {% from "_macros.html" import icon %} {% set section = "tools" %} {% block title %}{{ t("Tools") }} - {{ brand.name }}{% endblock %} {% block heading %}{{ t("Tools") }}{% endblock %} {% block admin_content %}

{{ tm("HTTP calls a model can make while it answers. Each one is offered to models marked %(custom)s, to people who have the permission, and — if it is restricted — only to the groups you choose. The model decides when to call it from the description you write, so write that as if explaining to a colleague what the tool is for.", custom=t("Custom tools")) }}

{% if saved %}
{{ icon("check", "icon--sm") }} {{ saved }}
{% endif %} {% if not total %}
{{ icon("link", "empty__mark") }}

{{ tm("No tools yet. Define one — a name, a description, and a URL with {{placeholders}} in it.") }}

{% else %} {# Filters are links, so a filtered view is a real URL you can keep or share. #}
{% for key, label in filters.items() %} {{ label }} {{ counts[key] }} {% endfor %}
{% if q or active_filter != "all" %} {{ t("Clear") }} {% endif %} {{ icon("plus", "icon--sm") }} {{ t("New tool") }}
{% if not tools %}

{{ t("Nothing matches that filter.") }}

{% else %} {#- In order by dragging the number, or by focusing it and pressing the arrow keys (js/dnd.js, api/ordering.py). The order is the order a model is offered the tools in. -#}
{% for tool in tools %}
{{ tool.name }} {% if not tool.enabled %}{{ t("disabled") }}{% endif %} {% if not tool.public %}{{ t("restricted") }}{% endif %} {% if tool.allow_private %}{{ t("private network") }}{% endif %} {% if tool.last_error %}{{ t("last call failed") }}{% endif %}
{{ tool.slug }} · {{ tool.method }} {{ tool.url_template }}
{% endfor %}
{% endif %} {% endif %} {% endblock %}