Skip to content
Snippets Groups Projects
Commit 4fffebdc authored by Tanner Prestegard's avatar Tanner Prestegard Committed by Alexander Pace
Browse files

implementing templates to expose single IFO times through web interface

parent 7fbfdb29
No related branches found
No related tags found
No related merge requests found
......@@ -399,10 +399,16 @@ def view(request, event):
break
context['advocate_signoff_authorized'] = advocate_signoff_authorized
# Choose your template according to the event's pipeline.
templates = ['gracedb/event_detail.html',]
if event.pipeline.name in settings.COINC_PIPELINES:
templates.insert(0, 'gracedb/event_detail_coinc.html')
#if is_external(request.user):
# templates.insert(0, 'gracedb/event_detail_coinc_ext.html')
#else:
# templates.insert(0, 'gracedb/event_detail_coinc.html')
elif event.pipeline.name in settings.GRB_PIPELINES:
templates.insert(0, 'gracedb/event_detail_GRB.html')
elif event.pipeline.name.startswith('CWB'):
......
......@@ -217,14 +217,20 @@
{% endblock %}
</div>
{% if not user_is_external %}
<div class="content-area">
<p>{{user_is_external}}</p>
{% if user_is_external %}
{# Analysis-specific attributes which can be exposed to external partners #}
{% block external_analysis_specific %}
{# Empty by default #}
{% endblock %}
{% else %}
{# Analysis-specific attributes #}
{% block analysis_specific %}
{# This block is empty in the base event_detail template #}
{% endblock %}
</div>
{% endif %}
</div>
{# Neighbors #}
<script type="text/javascript">
......
{% extends "gracedb/event_detail.html" %}
{% load timeutil %}
{% load scientific %}
{# Analysis-specific attributes for an LM event#}
{% block external_analysis_specific %}
{# Test whether the object has the end_time property. Older (non CoincInspiral) events don't. #}
{% if object.end_time %}
<div id="container" style="display:table;width:100%">
<div style="display:table-row;width:100%">
<div style="display:table-cell;float:left;width:35%;">
{% if single_inspiral_events %}
<!-- Single Inspiral Data -->
<div style="display:table-cell;float:right;width:65%">
<h2>Single Inspiral Tables</h2>
<!--<div id="single_inspiral_tables"> -->
<!-- <div id="single_inspiral_tables"
data-dojo-type="dijit/TitlePane"
data-dojo-props="title: 'Single Inspiral Tables', open: false"> -->
<!--<table class="analysis_specific_lm"> -->
<table>
<tr>
<th>IFO</th>
{% for e in single_inspiral_events %}
<th>{{ e.ifo }}</th>
{% endfor %}
</tr>
<tr>
<th>End Time (GPS)</th>
{% for e in single_inspiral_events %}
<td>{{ e.end_time_full }}&nbsp;s</td>
{% endfor %}
</tr>
</table>
</div>
</div>
</div> <!-- container -->
{% endif %} <!-- if single_inspiral_events -->
{% endif %} <!-- object has end_time property. -->
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment