{% extends "conjunto/base.html" %} {% load static i18n statici18n conjunto avatar gdaps %} {% comment %} Full application layout: topbar + sidebar + scrollable canvas + statusbar + two offcanvas panels. This is the template to extend for regular in-app pages. It preserves all historical block names that used to live in ``conjunto/base.html`` (top_bar, sidebar, canvas, page_*, content, footer, statusbar, offcanvas_*). Projects that previously extended ``conjunto/base.html`` for the app layout should switch to this template. {% endcomment %} {% block body_attrs %} class="antialiased cj-sidebar-mode-{{ cj_layout.sidebar_mode|default:'full' }}" data-default-sidebar-width="{{ cj_layout.sidebar_width }}" data-sidebar-width-url="{% url 'conjunto:sidebar-width' %}" data-sidebar-mode-url="{% url 'conjunto:sidebar-mode' %}" {% if cj_layout.sidebar_mode_locked %}data-sidebar-mode-locked="1"{% endif %} style="--cj-sidebar-width: {{ cj_layout.sidebar_width }}; --cj-sidebar-mini-width: 3.5rem; --cj-navbar-height: 3.5rem; --cj-statusbar-height: 2.5rem;" {% endblock %} {% block body %} {# ── Topbar ─────────────────────────────────────────────────────────────── #} {% block top_bar %} {% endblock %} {# ── Sidebar ─────────────────────────────────────────────────────────────── #} {% block sidebar %} {% include "conjunto/includes/sidebar.html" %} {% endblock %} {# ── Patient Summary Pane (medux-specific aside between sidebar and canvas) #} {# Plugins / theme overrides fill this block via render_patient_summary_pane #} {# or similar; the conjunto base ships only the placeholder. #} {% block patient_summary_pane %}{% endblock %} {# ── Page content (canvas) ───────────────────────────────────────────────── #}
{% block canvas %} {# Page header #} {% block page_header %} {% endblock %} {# Messages are rendered as toasts via the toasts block below. #} {% block messages %}{% endblock %} {# Main content #}
{% block content %}{% block card %}{% endblock %}{% endblock %}
{% endblock canvas %}
{# /#main-content #} {# ── Workplace pane (right) ──────────────────────────────────────────────── #} {# Empty by default. Downstream apps (e.g. medux) fill this slot with a #} {# fixed-position right-side pane hosting plug-able workplace widgets #} {# (waiting list, patient caves, lab inbox, …). #} {% block workplace_pane %}{% endblock %} {# ── Statusbar / Footer (fixed bottom) ──────────────────────────────────── #} {% block footer %} {% endblock %} {# ── Offcanvas Left ──────────────────────────────────────────────────────── #}
{% block offcanvas_left %}{% endblock %}
{# ── Offcanvas Right ─────────────────────────────────────────────────────── #}
{% block offcanvas_right %}{% endblock %}
{% comment %} Plugins implementing IPostLoginAction get a chance to render markup on every authenticated page load — typically a one-shot HTMX trigger that opens a modal (check-in prompt, consent reminder, …). Each implementation is responsible for gating its own visibility, usually via a session flag. {% endcomment %} {% if request.user.is_authenticated %} {% render_plugins "IPostLoginAction" %} {% endif %} {% endblock body %} {% block app_scripts %} {{ block.super }} {% if cj_layout.shortcuts.enabled %} {{ cj_layout.shortcuts.bindings|json_script:"cj-shortcut-bindings" }} {% endif %} {% conjunto_app_scripts %} {% endblock %}