{{ header }}
<ul class="breadcrumb">
  {% for breadcrumb in breadcrumbs %}
  <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
  {% endfor %}
</ul>
{% if j3.settings.get('pageTitlePosition') == 'top' %}
  <h1 class="title page-title"><span>{{ heading_title }}</span></h1>
{% endif %}
{{ j3.loadController('journal3/layout', 'top') }}
<div id="account-return" class="container">
  <div class="row">{{ column_left }}
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">
      {% if j3.settings.get('pageTitlePosition') == 'default' %}
        <h1 class="title page-title">{{ heading_title }}</h1>
      {% endif %}
      {{ content_top }}
      <table class="table table-bordered table-hover">
        <thead>
          <tr>
            <td class="text-left" colspan="2">{{ text_return_detail }}</td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="text-left" style="width: 50%;"><b>{{ text_return_id }}</b> #{{ return_id }}<br />
              <b>{{ text_date_added }}</b> {{ date_added }}</td>
            <td class="text-left" style="width: 50%;"><b>{{ text_order_id }}</b> #{{ order_id }}<br />
              <b>{{ text_date_ordered }}</b> {{ date_ordered }}</td>
          </tr>
        </tbody>
      </table>
      <h2 class="title">{{ text_product }}</h2>
      <div class="table-responsive">
        <table class="table table-bordered table-hover">
          <thead>
            <tr>
              <td class="text-left" style="width: 33.3%;">{{ column_product }}</td>
              <td class="text-left" style="width: 33.3%;">{{ column_model }}</td>
              <td class="text-right" style="width: 33.3%;">{{ column_quantity }}</td>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="text-left">{{ product }}</td>
              <td class="text-left">{{ model }}</td>
              <td class="text-right">{{ quantity }}</td>
            </tr>
          </tbody>
        </table>
      </div>
      <h2 class="title">{{ text_reason }}</h2>
      <div class="table-responsive">
        <table class="list table table-bordered table-hover">
          <thead>
            <tr>
              <td class="text-left" style="width: 33.3%;">{{ column_reason }}</td>
              <td class="text-left" style="width: 33.3%;">{{ column_opened }}</td>
              <td class="text-left" style="width: 33.3%;">{{ column_action }}</td>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="text-left">{{ reason }}</td>
              <td class="text-left">{{ opened }}</td>
              <td class="text-left">{{ action }}</td>
            </tr>
          </tbody>
        </table>
      </div>
      {% if comment %}
      <div class="table-responsive">
        <table class="table table-bordered table-hover">
          <thead>
            <tr>
              <td class="text-left">{{ text_comment }}</td>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="text-left">{{ comment }}</td>
            </tr>
          </tbody>
        </table>
      </div>
      {% endif %}
      <h2 class="title">{{ text_history }}</h2>
      <div class="table-responsive">
        <table class="table table-bordered table-hover">
          <thead>
            <tr>
              <td class="text-left" style="width: 33.3%;">{{ column_date_added }}</td>
              <td class="text-left" style="width: 33.3%;">{{ column_status }}</td>
              <td class="text-left" style="width: 33.3%;">{{ column_comment }}</td>
            </tr>
          </thead>
          <tbody>
          
          {% if histories %}
          {% for history in histories %}
          <tr>
            <td class="text-left">{{ history.date_added }}</td>
            <td class="text-left">{{ history.status }}</td>
            <td class="text-left">{{ history.comment }}</td>
          </tr>
          {% endfor %}
          {% else %}
          <tr>
            <td colspan="3" class="text-center">{{ text_no_results }}</td>
          </tr>
          {% endif %}
            </tbody>
          
        </table>
      </div>
      <div class="buttons clearfix">
        <div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
      </div>
      {{ content_bottom }}</div>
    {{ column_right }}</div>
</div>
{{ footer }} 
