{% extends "structure/base.html" %} {% from 'crud/_macros.html' import render_field, render_layout %} {% from 'crud/_actions.html' import action_control %} {% block title %}{{ construct.compose_title(construct.t("crud-view-rec", {'recname': construct.t(view.name, {'count': 1})})) }}{% endblock %} {# This view renders its own visible

, so suppress the layout default. #} {% block page_heading %}{% endblock %} {% block content %} {# Deliberately no
, no tabs and no save control: the fields arrive already forced readonly, and a form wrapper around them would only invite a POST this page has no route for. #} {# Nothing here can be edited, so there is no work to lose: the record is simply shown as it now is. If it has been deleted the refresh fails and the marker says "not updating". #} {% if view.refreshes('view') %}{{ live_refresh(topics=view.get_refresh_topics()) }}{% endif %}
{{ icon("back", label=construct.t("crud-back-button")) }}

{{ construct.t('crud-view-rec', {'recname': construct.t(view.name, {'count': 1}) }) }}

{% if edit_actions or history_url %}
{% for action in edit_actions %} {{ action_control(construct, action, url_for(view.endpoint + '.' + action.endpoint, id=data[primary_key]), action.variant or "icon", target="#main-content") }} {% endfor %} {% if history_url %} {{ icon("history", size="sm") }} {{ construct.t("audit-history-tab") }} {% endif %}
{% endif %}
{% block view_body %}
{% block presence %}{% if view.presence_in("view") %}{{ presence_notice(view.presence_key(data[primary_key]), "viewing") }}{% endif %}{% endblock %} {% call(field, type) render_layout(construct, form_layout | default(none), fields) %} {{ render_field(construct, field, type, view, data, ds) }} {% endcall %}
{% endblock %}
{% endblock %}