~homeworkprod/byceps

ac29a0cb50e2ef450d4e5ebd33419ed490c96e4f — Jochen Kupperschmidt 11 months ago e1ca961
Add session locale selector (and indicator) to CozyLAN site
M sites/cozylan/template_overrides/layout/_navigation.html => sites/cozylan/template_overrides/layout/_navigation.html +1 -2
@@ 13,7 13,7 @@
    ('board.category_index',  _('Discussion Board'),  'board'     ),
] -%}

<section>

  <nav class="nav-main">
    <ol>
      {%- for endpoint, label, id in navigation_items %}


@@ 21,4 21,3 @@
      {%- endfor %}
    </ol>
  </nav>
</section>

M sites/cozylan/template_overrides/layout/_sidebar_left.html => sites/cozylan/template_overrides/layout/_sidebar_left.html +17 -0
@@ 1,1 1,18 @@
<div class="sidebar-section">
  <h3>Navigation</h3>
{%- include 'layout/_navigation.html' with context %}
</div>

<div class="sidebar-section">
  <h3>Sprache</h3>
  <nav class="nav-main">
    <ol>
      {%- for code, label, flag in [
        ('en', 'English', '🇬🇧'),
        ('de', 'Deutsch', '🇩🇪'),
      ] %}
      <li><a class="nav-main-item{% if g.user.locale == code %} current{% endif %}" href="{{ url_for('locale.set_locale', locale=code) }}">{{ flag }} {{ label }}</a></li>
      {%- endfor %}
    </ol>
  </nav>
</div>

M sites/cozylan/template_overrides/layout/_sidebar_right.html => sites/cozylan/template_overrides/layout/_sidebar_right.html +1 -1
@@ 1,5 1,5 @@
<div class="sidebar-section">
  <h3>Tickets</h3>
  <h3>{{ _('Tickets') }}</h3>

  {%- with tickets_total_max_specified = (ticket_sale_stats.tickets_max is not none) %}
    {%- with sold_out = tickets_total_max_specified and ticket_sale_stats.tickets_sold >= ticket_sale_stats.tickets_max %}