~homeworkprod/byceps

4144a29fdeb34e20d44e5cd78a324d9f9f6a2b0d — Jochen Kupperschmidt 5 months ago d01d294
Dim archived brands in admin brand navigation dropdown
M byceps/blueprints/admin/brand/templates/macros/admin/brand.html => byceps/blueprints/admin/brand/templates/macros/admin/brand.html +8 -2
@@ 1,5 1,11 @@
{% macro render_brand_admin_link(brand, class=None) -%}
  <a href="{{ url_for('admin_dashboard.view_brand', brand_id=brand.id) }}"{% if class %} class="{{ class }}"{% endif %}>{{ brand.title }}</a>
{% macro render_brand_admin_link(brand, class=None, dim_archived=False) -%}
<a href="{{ url_for('admin_dashboard.view_brand', brand_id=brand.id) }}"{% if class %} class="{{ class }}"{% endif %}>
  {%- if dim_archived and brand.archived -%}
    {{ brand.title|dim }}
  {%- else -%}
    {{ brand.title }}
  {%- endif -%}
</a>
{%- endmacro %}



M byceps/blueprints/admin/core/templates/layout/admin/_navigation_brand.html => byceps/blueprints/admin/core/templates/layout/admin/_navigation_brand.html +1 -1
@@ 17,7 17,7 @@
      </button>
      <ol class="dropdown-menu">
        {%- for brand in all_brands|sort(attribute='title') %}
        <li>{{ render_brand_admin_link(brand, class='dropdown-item') }}</li>
        <li>{{ render_brand_admin_link(brand, class='dropdown-item', dim_archived=True) }}</li>
        {%- endfor %}
      </ol>
    </div>