~homeworkprod/byceps

7e827dc98f5c435783136f3026327fe1ae603440 — Jochen Kupperschmidt 7 days ago 2202aaa
Put remaining shop admin headlines and main buttons on same line
M byceps/blueprints/admin/shop/article/templates/admin/shop/article/index_for_shop.html => byceps/blueprints/admin/shop/article/templates/admin/shop/article/index_for_shop.html +16 -11
@@ 9,19 9,24 @@

{% block body %}

  <h1>{{ title }} {{ render_extra_in_heading(articles.total) }}</h1>

  {%- if g.current_user.has_permission(ShopArticlePermission.create) %}
  <div class="button-row button-row--right">
    <a class="button" href="{{ url_for('.create_form', shop_id=shop.id) }}">{{ render_icon('add') }} <span>Artikel anlegen</span></a>
    <div class="dropdown left">
      <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
      <ol>
        <li><a href="{{ url_for('.create_number_sequence_form', shop_id=shop.id) }}">{{ render_icon('add') }} Artikelnummer-Sequenz anlegen</a></li>
      </ol>
  <div class="row row--space-between">
    <div class="column-auto">
      <h1>{{ title }} {{ render_extra_in_heading(articles.total) }}</h1>
    </div>
    {%- if g.current_user.has_permission(ShopArticlePermission.create) %}
    <div class="column-auto">
      <div class="button-row button-row--right">
        <a class="button" href="{{ url_for('.create_form', shop_id=shop.id) }}">{{ render_icon('add') }} <span>Artikel anlegen</span></a>
        <div class="dropdown left">
          <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
          <ol>
            <li><a href="{{ url_for('.create_number_sequence_form', shop_id=shop.id) }}">{{ render_icon('add') }} Artikelnummer-Sequenz anlegen</a></li>
          </ol>
        </div>
      </div>
    </div>
    {%- endif %}
  </div>
  {%- endif %}

  {%- if articles.items %}
  <table class="index wide">

M byceps/blueprints/admin/shop/article/templates/admin/shop/article/view.html => byceps/blueprints/admin/shop/article/templates/admin/shop/article/view.html +17 -12
@@ 39,20 39,25 @@

{% block body %}

  <h1>{{ title }}</h1>

  <div class="button-row button-row--right">
    {%- if g.current_user.has_permission(ShopArticlePermission.update) %}
    <a class="button" href="{{ url_for('.update_form', article_id=article.id) }}">{{ render_icon('edit') }} <span>Bearbeiten</span></a>
    {%- endif %}
    <div class="dropdown left">
      <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
      <ol>
  <div class="row row--space-between">
    <div class="column-auto">
      <h1>{{ title }}</h1>
    </div>
    <div class="column-auto">
      <div class="button-row button-row--right">
        {%- if g.current_user.has_permission(ShopArticlePermission.update) %}
        <li><a href="{{ url_for('.attachment_create_form', article_id=article.id) }}">{{ render_icon('attached') }} Artikel anhängen</a></li>
        <a class="button" href="{{ url_for('.update_form', article_id=article.id) }}">{{ render_icon('edit') }} <span>Bearbeiten</span></a>
        {%- endif %}
        <li><a href="{{ url_for('.view_ordered', article_id=article.id) }}">{{ render_icon('users') }} Käufer auflisten</a></li>
      </ol>
        <div class="dropdown left">
          <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
          <ol>
            {%- if g.current_user.has_permission(ShopArticlePermission.update) %}
            <li><a href="{{ url_for('.attachment_create_form', article_id=article.id) }}">{{ render_icon('attached') }} Artikel anhängen</a></li>
            {%- endif %}
            <li><a href="{{ url_for('.view_ordered', article_id=article.id) }}">{{ render_icon('users') }} Käufer auflisten</a></li>
          </ol>
        </div>
      </div>
    </div>
  </div>


M byceps/blueprints/admin/shop/order/templates/admin/shop/order/view.html => byceps/blueprints/admin/shop/order/templates/admin/shop/order/view.html +15 -10
@@ 40,17 40,22 @@

{% block body %}

  <h1>{{ render_order_payment_state(order.payment_state) }} {{ title }}</h1>

  {%- if g.current_user.has_any_permission(
    ShopOrderPermission.cancel,
    ShopOrderPermission.mark_as_paid,
    ShopOrderPermission.update
  ) %}
  <div style="float: right; margin-left: 40px;">
{%- include 'admin/shop/order/_view_actions.html' %}
  <div class="row row--space-between">
    <div class="column-auto">
      <h1>{{ render_order_payment_state(order.payment_state) }} {{ title }}</h1>
    </div>
    {%- if g.current_user.has_any_permission(
      ShopOrderPermission.cancel,
      ShopOrderPermission.mark_as_paid,
      ShopOrderPermission.update
    ) %}
    <div class="column-auto">
      <div class="button-row button-row--right">
    {%- include 'admin/shop/order/_view_actions.html' %}
      </div>
    </div>
    {%- endif %}
  </div>
  {%- endif %}

  <table class="index">
    <tr>

M byceps/blueprints/admin/shop/storefront/templates/admin/shop/storefront/index_for_shop.html => byceps/blueprints/admin/shop/storefront/templates/admin/shop/storefront/index_for_shop.html +18 -13
@@ 6,20 6,25 @@

{% block body %}

  <h1>{{ title }} {{ render_extra_in_heading(storefronts|length) }}</h1>

  <div class="button-row button-row--right">
    {%- if g.current_user.has_permission(ShopPermission.create) %}
    <a class="button" href="{{ url_for('.create_form', shop_id=shop.id) }}">{{ render_icon('add') }} <span>Storefront anlegen</span></a>
    {%- endif %}
    {%- if g.current_user.has_permission(ShopPermission.update) %}
    <div class="dropdown left">
      <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
      <ol>
        <li><a href="{{ url_for('shop_order_admin.create_number_sequence_form', shop_id=shop.id) }}">{{ render_icon('add') }} Bestellnummer-Sequenz anlegen</a></li>
      </ol>
  <div class="row row--space-between">
    <div class="column-auto">
      <h1>{{ title }} {{ render_extra_in_heading(storefronts|length) }}</h1>
    </div>
    <div class="column-auto">
      <div class="button-row button-row--right">
        {%- if g.current_user.has_permission(ShopPermission.create) %}
        <a class="button" href="{{ url_for('.create_form', shop_id=shop.id) }}">{{ render_icon('add') }} <span>Storefront anlegen</span></a>
        {%- endif %}
        {%- if g.current_user.has_permission(ShopPermission.update) %}
        <div class="dropdown left">
          <button class="dropdown-toggle button"><span>{{ render_icon('caret-down') }}</span></button>
          <ol>
            <li><a href="{{ url_for('shop_order_admin.create_number_sequence_form', shop_id=shop.id) }}">{{ render_icon('add') }} Bestellnummer-Sequenz anlegen</a></li>
          </ol>
        </div>
        {%- endif %}
      </div>
    </div>
    {%- endif %}
  </div>

  {%- if storefronts %}

M byceps/blueprints/admin/shop/storefront/templates/admin/shop/storefront/view.html => byceps/blueprints/admin/shop/storefront/templates/admin/shop/storefront/view.html +11 -6
@@ 5,13 5,18 @@

{% block body %}

  <h1>{{ title }}</h1>

  {%- if g.current_user.has_permission(ShopPermission.update) %}
  <div class="button-row button-row--right">
    <a class="button" href="{{ url_for('.update_form', storefront_id=storefront.id) }}">{{ render_icon('edit') }} <span>Bearbeiten</span></a>
  <div class="row row--space-between">
    <div class="column-auto">
      <h1>{{ title }}</h1>
    </div>
    {%- if g.current_user.has_permission(ShopPermission.update) %}
    <div class="column-auto">
      <div class="button-row button-row--right">
        <a class="button" href="{{ url_for('.update_form', storefront_id=storefront.id) }}">{{ render_icon('edit') }} <span>Bearbeiten</span></a>
      </div>
    </div>
    {%- endif %}
  </div>
  {%- endif %}

  <table class="index">
    <tr>