apigee_m10n-8.x-1.7/templates/apigee-entity--xrate-plan.html.twig

templates/apigee-entity--xrate-plan.html.twig
{#
/**
 * @file
 * Default theme implementation to display a Apigee Rate Plan entity.
 *
 * This template uses Apigee Edge's default entity template, which can be found
 * at apigee_edge/templates/apigee-entity.html.twig.
 *
 * @ingroup themeable
 */
#}

{% embed 'apigee-entity.html.twig' %}
  {% block content %}

    {{ title_prefix }}
    {%- if label and view_mode != 'full' -%}
    {% set apiproductName = content.apiProduct|render|striptags %}

      <h2{{ title_attributes }}>
        <a href="{{ url }}">{{ apiproductName }}</a>
      </h2>

    {{ content|without('apiProduct') }}

    <hr class="my-4">
    {{ label }}

    {%- else -%}
    {{ title_suffix }}

      <div class="container py-5">
        <div class="row">
          <div class="col-lg-6">
            <div class="bg-lighter p-4 rounded-lg">
              {{ content|without(
                'setupFees',
                'recurringFees',
                'consumptionFee',
                'consumptionPricingRates',
                'consumptionPricingType',
                'revenueShareType',
                'revenueShareRates',
                'feeFrequency',
                'purchase'
                ) }}
            </div>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-6">
          {% if content.setupFees|render|striptags|trim is not empty or content.recurringFees|render|striptags|trim is not empty %}
            <div class="rate-plan__card rate-plan__card--fees bg-lighter p-4 my-5 rounded-lg">
              <h2>{{ 'Fees'|t }}</h2>
              {{ content.setupFees }}
              {{ content.recurringFees }}
              {% if content.recurringFees|render|striptags|trim is not empty %}
                {{ content.feeFrequency }}
              {% endif %}
            </div>
            {% endif %}

            {% if content.consumptionPricingRates|render|striptags|trim is not empty %}
              <div class="rate-plan__card rate-plan__card--fees bg-lighter p-4 my-5 rounded-lg">
                <h2>{{ 'Consumption Fees'|t }}</h2>
                {{ content.consumptionPricingType }}

                {% if content.consumptionPricingRates[0]['#singleConsumptionText'] %}
                  {{ content.consumptionPricingRates }}
                {% else %}
                  <div class="rate-plan-detail__table px-4 py-2 mt-4 bg-white">
                    <table class="table table-borderless mb-0">
                      <thead>
                        <tr>
                          <th scope="col">{{ 'Volume Bands'|t }}</th>
                          <th scope="col">{{ 'Cost per API call'|t }}</th>
                        </tr>
                      </thead>
                      <tbody>
                        {{ content.consumptionPricingRates }}
                      </tbody>
                    </table>
                  </div>
                {% endif %}
              </div>
            {% endif %}

            {% if content.revenueShareRates|render|striptags|trim is not empty %}
              <div class="rate-plan__card rate-plan__card--fees bg-lighter p-4 my-5 rounded-lg">
                <h2>{{ 'Revenue Sharing'|t }}</h2>
                {{ content.revenueShareType }}

              {% if content.revenueShareRates[0]['#singleShareText'] %}
                  {{ content.revenueShareRates }}
                {% else %}
                  <div class="rate-plan-detail__table px-4 py-2 mt-4 bg-white">
                    <table class="table table-borderless mb-0">
                      <thead>
                        <tr>
                          <th scope="col">{{ 'Volume Bands'|t }}</th>
                          <th scope="col">{{ 'Developer Share Percentage'|t }}</th>
                        </tr>
                      </thead>
                      <tbody>
                        {{ content.revenueShareRates }}
                      </tbody>
                    </table>
                  </div>
                {% endif %}
              </div>
            {% endif %}

            {% if content.purchase %}
              <div class="rate-plan__card rate-plan__card--purchase bg-lighter p-4 mt-4 rounded-lg" id="purchase">
                {{ content.purchase }}
              </div>
            {% endif %}
          </div>
        </div>

      </div>
    {%- endif -%}
  {% endblock %}
{% endembed %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc