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

{% block title %}Update Report{% endblock %}

{% block pagehead %}
  <link rel="stylesheet" type="text/css" href="{{ mediaPrefix }}/style/report/display.css" />

  <script type="text/javascript">
    var reportSmdPath = "{{ uriPrefix }}/rpc2/reportsmd/";
    var reportId = {{ domainObject.id }};
    var mediaUrl = '{{ mediaPrefix }}';
  </script>

  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/vendor/rnd.js"></script>
  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/schedule/moorpc.js"></script>
  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/schedule/elementobject.js"></script>
  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/report/report.js"></script>
  <script type="text/javascript" src="{{ mediaPrefix }}/behaviour/report/master.js"></script>
{% endblock %}

{% 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.canReadDomainObject %}
  <div style="float: right; margin: 0.25em;">
    <form action="{{uriPrefix}}/{{registryPath}}/" method="get">
      <input type="submit" value="Regenerate &raquo;" />
    </form>
  </div>
  {% endif %}

  <h2 id="report-title">Report {{domainObject.title}}</h2>

<form class="report-update">
  <fieldset>
    <legend>
      details
    </legend>
    <ul id="attributes">
      <li>
        <label for="id_title">title</label>
        <br />
        <input type="text" id="id_title" class="vTextField" name="title" size="30" value="{{domainObject.title}}" />
        <p class="desc"></p>
      </li>
      <li>
        <label for="id_against">against</label>
        <br />
        <p><b>{{domainObject.against}}</b></p>
        <p class="desc"></p>
      </li>
    </ul>
  </fieldset>
</form>

<form class="report-update">
  <fieldset>
    <legend>
      filter
    </legend>
  </fieldset>
  <div id="report-filters">
    <p>Loading...</p>
  </div>
</form>

<form class="report-update">
  <fieldset>
    <legend>
      columns
    </legend>
  </fieldset>
  <div id="report-columns">
    <p>Loading...</p>
  </div>
</form>

{% endblock %}

