Skip to content

Commit

Permalink
Restore select image modal
Browse files Browse the repository at this point in the history
  • Loading branch information
typpo committed Mar 14, 2018
1 parent c8706fb commit 2e4fc56
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions lightcurve/templates/lightcurve.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,73 @@ <h2>Checklist</h2>
{% include 'partials/modal.html' %}
</div>

<div class="select-image-modal">
<div class="modal fade">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Select Image</h4>
</div>
<div class="modal-body">
<div class="table-wrapper">
<table class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th>Analysis ID</th>
<th>Filter</th>
<th>Filename</th>
<th>Target ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="radio" name="image-radio" value="NONE" />
</td>
<td>None</td>
<td>-</td>
<td>None</td>
<td>-</td>
</tr>
{% for image in images %}
{% if reduction.meta.image_companion_id == image.id %}
<tr class="highlight">
{% elif image.analysis.target_id %}
<tr style="background-color: #e5ffe0">
{% else %}
<tr>
{% endif %}
<td>
{% if image.analysis.target_id %}
<input type="radio" name="image-radio" value="{{image.analysis.id}}" />
{% endif %}
</td>
<td><a href="/analysis/{{image.analysis.id}}">{{image.analysis.id}}</a></td>
<td>{{image.analysis.image_filter.band}}</td>
<td><a href="/analysis/{{image.analysis.id}}">{{image.original_filename | truncatechars:40}}</a></td>
<td>
{% if image.analysis.target_id %}
{{image.analysis.target_id}}
{% else %}
<span style="color:red">No target</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary js-select-image-update" data-dismiss="modal">Done</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>

{% endblock %}

{% csrf_token %}
Expand Down

0 comments on commit 2e4fc56

Please sign in to comment.