{% extends 'generic/object_list.html' %} {% load helpers i18n %} {% comment %} Canvas list as tiles (picture, name, description, site, nodes, updated) with a toggle to NetBox's regular table (?view=table), which keeps bulk edit, export and table configuration. Filters work in both views. {% endcomment %} {% block extra_controls %}
{% trans "Tiles" %} {% trans "Table" %}
{% endblock extra_controls %} {% block content %} {% if request.GET.view == 'table' %} {{ block.super }} {% else %}
{% if filter_form %} {% applied_filters model filter_form request.GET %} {% endif %}
{% for row in table.page.object_list %} {% with canvas=row.record %}
{% url 'plugins:netbox_service_canvas:canvas_thumbnail' pk=canvas.pk as thumb %} {{ canvas.name }} {{ canvas.name }}

{{ canvas.name }} {% if canvas.share_key %}{% endif %}

{% if canvas.description %}
{{ canvas.description|truncatechars:140 }}
{% endif %}
{% if canvas.site %} {{ canvas.site }} · {% endif %} {% blocktrans count count=canvas.node_count %}{{ count }} node{% plural %}{{ count }} nodes{% endblocktrans %} · {% trans "updated" %} {{ canvas.last_updated|timesince }} {% trans "ago" %}
{% endwith %} {% empty %}
{% trans "No canvases found." %}
{% endfor %}
{% if table.page.has_other_pages %}
{% blocktrans with start=table.page.start_index end=table.page.end_index total=table.page.paginator.count %}{{ start }}–{{ end }} of {{ total }}{% endblocktrans %}
{% if table.page.has_previous %} {% trans "Previous" %}{% endif %} {% if table.page.has_next %}{% trans "Next" %} {% endif %}
{% endif %}
{% if filter_form %}
{% include 'inc/filter_list.html' %}
{% endif %} {% endif %} {% endblock content %}