src/ApplicationBundle/Modules/System/Resources/views/layouts/system_layout.html.twig line 1

Open in your IDE?
  1. {#
  2.   @System/layouts/system_layout.html.twig
  3.   ══════════════════════════════════════════════════════════════════════════════
  4.   cp-shell layout for the System / Administration pages — users, permissions,
  5.   approval settings, company records, files, change log.
  6.   A page does:
  7.       {% extends '@System/layouts/system_layout.html.twig' %}
  8.       {% set active = 'approval_settings' %}
  9.       {% set page_title = 'Approval Settings' %}
  10.       {% block body %} … {% endblock %}
  11.   Two deliberate choices, both from HONEYBEE_UI_UNIFICATION_PLAN.md:
  12.   1. EXTENDS the framework layout instead of re-implementing the shell.
  13.      tax_layout and ca_layout each paste their own copy of .cp-shell/.cp-sidebar
  14.      into a local <style>. That holds until the framework moves, and then those
  15.      modules drift silently — the exact debt this phase exists to stop. Everything
  16.      here comes from cp_module_layout, so there is one shell, not three.
  17.   2. The nav is the EXISTING @Application/framework/_admin_nav.html.twig, not a
  18.      new one. It already links these routes (system_admin_user_list,
  19.      approval_settings, module_access_settings, company_list,
  20.      file_management_list, change_log …). A second admin nav would have added an
  21.      11th vocabulary in the phase that argues for converging the existing ten.
  22.   Identity is set inline, matching sales_layout. There IS a registry
  23.   (_cp_module_profiles) meant to hold this, but it has no consumers and its
  24.   documented usage — {% include %} then read the variable — cannot work here:
  25.   `include` emits output, and a template that extends another may not emit before
  26.   its blocks. Left alone rather than half-adopted.
  27. #}
  28. {% extends '@Application/framework/cp_module_layout.html.twig' %}
  29. {% set module_brand        = 'Administration' %}
  30. {% set module_context      = 'System & Access' %}
  31. {% set module_icon         = 'settings' %}
  32. {% set module_accent       = '#546074' %}
  33. {% set module_accent_hover = '#445063' %}
  34. {% set module_accent_dim   = 'rgba(84,96,116,.10)' %}
  35. {% set active_module       = 'admin' %}
  36. {% set active              = active|default('') %}
  37. {% block sidebar_nav %}{% include '@Application/framework/_admin_nav.html.twig' %}{% endblock %}
  38. {% block sidebar_footer %}
  39.   <a href="{{ path('dashboard') }}" class="cp-nav-link" style="font-size:12px;">
  40.     <span class="cp-nav-icon"><i class="material-icons" style="font-size:14px">arrow_back</i></span>
  41.     <span>Back to ERP</span></a>
  42. {% endblock %}