Templates added
This commit is contained in:
94
Templates/monthplan/show_targets.html
Normal file
94
Templates/monthplan/show_targets.html
Normal file
@@ -0,0 +1,94 @@
|
||||
{% extends "monthplan/base.html" %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<!--a href="/monthplan/observations">All observations</a> | <a href="/monthplan/scans">All scans</a> | <a href="/monthplan/surveys">All surveys</a-->
|
||||
|
||||
<table class="table table-hover">
|
||||
{% if observation %}
|
||||
<thead>
|
||||
<tr><th scope="col" colspan="4">All observations</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr class="{% if observation.is_past_due %}bg-success{% endif %}{% if observation.is_future %} bg-info{% endif %}{% if observation.is_current %} bg-danger{% endif %}">
|
||||
<td><span class="glyphicon glyphicon-screenshot"></span></td>
|
||||
<td><a href="{{ observation.get_absolute_url_logbook_start }}">{{ observation.start|date:"d M Y H:i:s" }}</a></td>
|
||||
<td><a href="{{ observation.get_absolute_url_logbook_stop }}">{{ observation.stop|date:"d M Y H:i:s" }}</a></td>
|
||||
<td><a href="{{ observation.get_absolute_url }}">{{ observation.experiment }}</a></td><td>{{ observation.ra|floatformat:4 }}</td><td>{{ observation.dec|floatformat:4 }}</td><td>{{ observation.target }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
|
||||
<table class="table table-hover">
|
||||
|
||||
{% if observations %}
|
||||
<thead>
|
||||
<tr><th scope="col" colspan="4">All observations</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obs in observations %}
|
||||
<tr class="{% if obs.is_past_due %}bg-success{% endif %}{% if obs.is_future %} bg-info{% endif %}{% if obs.is_current %} bg-danger{% endif %}">
|
||||
<td><span class="glyphicon glyphicon-screenshot"></span></td>
|
||||
<td>{{ obs.start|date:"d M Y H:i" }}</td>
|
||||
<td>{{ obs.stop|date:"d M Y H:i" }}</td>
|
||||
<td><a href="{{ obs.get_absolute_url }}">{{ obs.experiment }}</td>
|
||||
<!--td>{{ obs.ra|floatformat:4 }}</td>
|
||||
<td>{{ obs.dec|floatformat:4 }}</td-->
|
||||
<td>{{ obs.target }}</td>
|
||||
<td>{% if user.is_authenticated %}<a href="{{ obs.head.get_absolute_url }}">{{ obs.head.get_datetime_middle|date:"F Y" }}</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endif %}
|
||||
|
||||
{% if scans %}
|
||||
<thead>
|
||||
<tr><th scope="col" colspan="4">All scans</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for scan in scans %}
|
||||
<tr class="{% if scan.is_past_due %}bg-success{% endif %}{% if scan.is_future %} bg-info{% endif %}{% if scan.is_current %} bg-danger{% endif %}">
|
||||
<td><span class="glyphicon glyphicon-retweet"></span></td>
|
||||
<td>{{ scan.start|date:"d M Y H:i" }}</td>
|
||||
<td>{{ scan.stop|date:"d M Y H:i" }}</td>
|
||||
<td><a href="{{ scan.get_absolute_url }}">{{ scan.experiment }}</a></td><td>{{ scan.target }} {% if scan.template %}(T{{ scan.template }}){% endif %}</td><td></td>
|
||||
<td>{% if user.is_authenticated %}<a href="{{ scan.head.get_absolute_url }}">{{ scan.head.get_datetime_middle|date:"F Y" }}</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endif %}
|
||||
|
||||
{% if surveys %}
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">Start</th>
|
||||
<th scope="col">Stop</th>
|
||||
<th scope="col">ObsID</th>
|
||||
<th scope="col">Z Speed</th>
|
||||
<th scope="col">Plan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for survey in surveys %}
|
||||
<tr class="{% if survey.is_past_due %}bg-success{% endif %}{% if survey.is_future %} bg-info{% endif %}{% if survey.is_current %} bg-danger{% endif %}">
|
||||
<td><span class="glyphicon glyphicon-repeat"></span></td>
|
||||
<td>{{ survey.start|date:"d M Y H:i" }}</td>
|
||||
<td>{{ survey.stop|date:"d M Y H:i" }}</td>
|
||||
<td><a href="{{ survey.get_absolute_url }}">{{ survey.experiment }}</a></td>
|
||||
<td>{{ survey.z_speed|floatformat:2 }}</td>
|
||||
<td>{% if user.is_authenticated %}<a href="{{ survey.head.get_absolute_url }}">{{ survey.head.get_datetime_middle|date:"F Y" }}</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endif %}
|
||||
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user