{% extends "structure/base.html" %} {% from 'crud/_macros.html' import render_field, render_layout %} {% from 'crud/_actions.html' import action_control %} {% from 'components/_page_header.html' import page_header %} {% 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 %} {% call page_header(construct.t('crud-view-rec', {'recname': construct.t(view.name, {'count': 1}) }), back_url=next_url(view.url), back_label=construct.t('crud-back-button'), back_target="#main-content", css_class="fcu-crud-header") %} {%- for action in edit_actions or [] %} {{ 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 %} {% endcall %}
{% 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 %}