{% extends "registry/master.html" %}

{% block content %}

  {% if view.canDeleteDomainObject %}
  <div style="float: right; margin: 0.25em;">
    <form action="{{uriPrefix}}/{{registryPath}}/delete/" method="post">
      <input type="submit" value="Delete &raquo;" />
    </form>
  </div>
  {% endif %}

  {% if view.canUpdateDomainObject %}
  <div style="float: right; margin: 0.25em;">
    <form action="{{uriPrefix}}/{{registryPath}}/update/" method="get">
      <input type="submit" value="Refine &raquo;" />
    </form>
  </div>
  {% endif %}

  <h2>Report {{domainObject.title}}</h2>

  <form>
  <fieldset>
  {% block fieldset_details %}
    <legend>
      details
    </legend>
    <ul id="attributes">
    <li>
    <label for="id_title">title</label><br />
    <p><b>{{domainObject.title}}</b></p>
    </li>
    
    <li>
    <label for="id_against">against</label><br />
    <p><b>{{domainObject.against}}</b></p>
    </li>
    
    </ul>
  </fieldset>
  {% endblock %}
  {% block fieldset_details_after %}{% endblock %}
  </form>

{% block read_form_after %}
  {% if domainObject.filters %}
  <fieldset>
    <legend>
      filter
    </legend>
    <table>
      <th>name</th>
      <th>mode</th>
      <th>value</th>
    {% for filter in domainObject.listFilters %}
      <tr>
        <td>{{ filter.name }}</td>
        <td>{{ filter.mode }}</td>
        <td>{{ filter.getValueLabel }}</td>
      </tr>
    {% endfor %}
    </table>

  </fieldset>
  {% endif %}

  <fieldset>
    <legend>
      data
    </legend>
    <table>
    {% for heading in domainObject.listHeadings %}
      <th>{{ heading }}</th>
    {% endfor %}
    {% for row in domainObject.generateData %}
      <tr>
      {% for cell in row %}
        <td>{{ cell }}</td>
      {% endfor %}
      </tr>
    {% endfor %}
      <tr>
    {% for item in domainObject.generateSummary %}
        <th>{{ item }}</th>
    {% endfor %}
      </tr>
    </table>
  </fieldset>
{% endblock %}

{% endblock %}

{% block primarysidebar %}
<div class="box">
  <h2>{{domainObjectPersonalLabel}}</h2>
  <p>
  {% if nextObject %}
  Next: <a href="../{{nextObject.getRegisterKeyValue}}/">{{nextObject.getLabelValue}}</a>
  <br />
  {% endif %}
  {% if previousObject %}
  Previous: <a href="../{{previousObject.getRegisterKeyValue}}/">{{previousObject.getLabelValue}}</a>
  <br />
  {% endif %}
  </p>
</div>
{% endblock %}

  

