{% extends "layout.html" %}
{% block title %}{{title}}{% endblock %}
{% block content %}
<h1>{{title}}</h1>

<div class="table-responsive">
  <table class="table table-striped">
    <thead>
      <tr>
	<th>Property</th>
	<th>Units</th>
	<th>Value</th>
      </tr>
    </thead>
    <tbody>
      <tr>
	<td>Session ID</td>
	<td></td>
	<td><a href="/sessions/{{obs.session_id}}">{{obs.session_id}}</a></td>
      </tr>
      <tr>
	<td>Start time</td>
	<td>JD</td>
	<td>{{obs.start_time_jd}}</td>
      </tr>
      <tr>
	<td>Stop time</td>
	<td>JD</td>
	<td>{{obs.stop_time_jd}}</td>
      </tr>
      <tr>
	<td>Start LST</td>
	<td>hours</td>
	<td>{{obs.start_lst_hr}}</td>
      </tr>
      <tr>
	<td>Duration</td>
	<td>day</td>
	<td>{{obs.duration}}</td>
      </tr>
      <!--<tr>
	<td>Number of files</td>
	<td></td>
	<td>{{files.len}}</td>
      </tr>-->
    </tbody>
  </table>
</div>

{% if staging_available %}

<h2>Staging to {{staging_dest_displayed}}</h2>

<p>You can stage all of the files from this observation to {{staging_dest_displayed}}.</p>

<form role="form" action="/" method="post"> <!-- note: POST method since non-idempotent op -->
  <input name="search" type="hidden" value="{&quot;obsid-is-exactly&quot;: {{obs.obsid}}}">
  {{macros.staging_form_ui(staging_username_placeholder, staging_dest_path)}}
</form>

<br><br><!-- hack for nicer spacing -->

{% endif %}

<h2>Files</h2>
{{ macros.file_listing(files) }}

</div>
{% endblock %}
