<div class="panel {% if admin is defined %} panel-warning {% else %} panel-default {% endif %}">
  <div class="panel-heading">
    <h4 class="panel-title">
      <a data-toggle="collapse" data-parent="#api_links" href="#{{ id }}">{{ title }} <span style="float: right"> [ {{ method }} ] </span></a>
    </h4>
  </div>
  <div id="{{ id }}" class="panel-collapse collapse">
    <div class="panel-body">
      <div class="panel panel-default">
        <div class="panel-body">
          <h4>Description</h4>
          {% block desc %} {% endblock %}
        </div>
      </div>
      {% if args is defined or formdata is defined or headers is defined %}
        <div class="panel panel-default">
          <div class="panel-body">
            {% if args is defined %}
              <h5>URL arguments</h5>
              <table class="table table-striped table-sm">
                <thead>
                  <tr class="warning"> <td>Argument  </td> <td>Description</td> <td>Example   </td> </tr>
                </thead>
                <tbody>
                  {% for arg in args %}
                    <tr>               <td>{{arg[0]}}</td> <td>{{arg[1]}} </td> <td>{{arg[2]}}</td> </tr>
                  {% endfor %}
                </tbody>
              </table>
            {% endif %}
            {% if headers is defined %}
              <h5>Headers</h5>
              <table class="table table-striped table-sm">
                <thead>
                  <tr class="warning"> <td>Argument  </td> <td>Description</td> <td>Example   </td> </tr>
                </thead>
                <tbody>
                  {% for arg in headers %}
                    <tr>               <td>{{arg[0]}}</td> <td>{{arg[1]}} </td> <td>{{arg[2]}}</td> </tr>
                  {% endfor %}
                </tbody>
              </table>
            {% endif %}
            {% if formdata is defined %}
              <h5>Formdata arguments</h5>
              <table class="table table-striped table-sm">
                <thead>
                  <tr class="info"> <td>Argument  </td> <td>Description</td> <td>Example   </td> </tr>
                </thead>
                <tbody>
                  {% for arg in formdata %}
                    <tr>            <td>{{arg[0]}}</td> <td>{{arg[1]}} </td> <td>{{arg[2]}}</td> </tr>
                  {% endfor %}
                </tbody>
              </table>
            {% endif %}
          </div>
        </div>
      {% endif %}
      <div class="panel panel-default">
        <div class="panel-body">
          <h4>Output </h4>
          <pre>{% block output %}{% endblock %}</pre>
        </div>
      </div>
    </div>
  </div>
</div>
