Skip to content
Snippets Groups Projects
Commit c5938d0e authored by Branson Stephens's avatar Branson Stephens
Browse files

first round of changes for presentation with tags

parent 6db1dbcb
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,18 @@ html, body {
table.event th {padding:3px;border:none;text-align:center;vertical-align:bottom;}
table.event {border-bottom:1px solid gray;}
/* Branson added */
table.event {width:100%}
table.analysis_specific {width:100%}
.content-area {
margin-top: 10px;
margin-bottom: 30px;
margin-left: 15px;
margin-right: 15px;
}
/* End Branson */
td, th {padding:3px;border:none;}
tr th {text-align:left;background-color:#f0f0f0;color:#333;}
......
......@@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="/gracedb-static/css/style.css" />
<link rel="stylesheet" href="/branson-static/css/style.css" />
<title>GraceDb | {% block title %}{% endblock %}</title>
<!-- START TESTING -->
<script type="text/javascript">
......
......@@ -2,7 +2,7 @@
{% load timeutil %}
{% load scientific %}
{% load sanitize_html %}
{% load slot %}
{% load logtags %}
{% block title %}View {{ object.graceid }}{% endblock %}
{% block heading %}{% endblock %}
......@@ -23,6 +23,7 @@
"dojox/editor/plugins/Save",
"dojox/editor/plugins/Preview",
"dijit/form/Button",
"dijit/TitlePane",
"dojox/image/LightboxNano",
"dijit/_editor/plugins/TextColor",
"dijit/_editor/plugins/LinkDialog",
......@@ -30,7 +31,7 @@
"dijit/_editor/plugins/NewPage",
"dijit/_editor/plugins/FullScreen",
"dojo/parser",
"dojo/domReady!"], function (Editor, Save, Preview, Button) {
"dojo/domReady!"], function (Editor, Save, Preview, Button, TitlePane) {
dojo.parser.parse();
......@@ -112,6 +113,32 @@
'insertImage','fullscreen','viewsource','newpage', '|', previewbutton, savebutton]
}, editor_div);
// Branson: Working on TitlePanes here.
{% if object.getAvailableTags %}
var pane_holder = dojo.byId("pane_holder");
var panes = new Array();
var titles = new Array();
{% for tag in object.getAvailableTags %}
panes.push(dojo.byId("{{tag.name}}"));
titles.push("{{tag|tagUnicode}}");
{% endfor %}
for (var i = 0; i<panes.length; i++) {
tp = new dijit.TitlePane({title:titles[i],
content:panes[i].innerHTML,
open:true});
pane_holder.appendChild(tp.domNode);
dojo.destroy(panes[i]);
};
// Handle event log seperately. It will be closed by default.
var event_log = dojo.byId("event_log");
tp = new dijit.TitlePane({title:"Full Event Log",
content:event_log.innerHTML,
open:false});
pane_holder.appendChild(tp.domNode);
dojo.destroy(event_log);
{% endif %}
});
</script>
......@@ -157,9 +184,9 @@
{% block content %}
<p>{{ message }}</p>
<table>
<tr><td valign="top">
<!-- Branson: Wrapping everything in a content area div so that I can put some space around it. -->
<div class="content-area">
<h3> Basic Info </h3>
<table class="event">
......@@ -208,14 +235,17 @@
</tr>
</table>
</div>
<div class="content-area">
{# Analysis-specific attributes #}
{% block analysis_specific %}
{# This block is empty in the base event_detail template #}
{% endblock %}
</div>
{% if nearby %}
<p/>
<div id="neighbors" class="content-area">
<h3>Neighbors</h3>
<table class="event">
<tr>
......@@ -255,6 +285,51 @@
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<div id="pane_holder" class="content-area">
{# XXX Hacky #}
{# With the title here, people will know that all of the things in the #}
{# panes are log messages #}
{% if object.getAvailableTags %}
<h3 id="logmessagetitle">Event Log Messages</h3>
<div id="previewer"></div>
<div id="editor"></div>
{% endif %}
<!-- Branson. Loop over the available tags. -->
{% if object.getAvailableTags %}
{% for tag in object.getAvailableTags %}
<div id="{{tag.name}}">
<table class="event">
<tr>
<th>No.</th>
<th>{{ "logtime"|timeselect:"utc" }} Log Entry Created</th>
<th>Submitter</th>
<th>Comment</th>
<th>&nbsp;</th>
</tr>
{% for log in object|getLogsForTag:tag.name %}
<tr class="{% cycle 'odd' 'even'%}">
<td>{{log.getN}}</td>
<td>{{log.created|multiTime:"logtime"}}</td>
<td>{{log.issuer}}</td>
<td>{{log.comment|sanitize}}
{% if log.fileurl %}
<a href="{{log.fileurl}}">{{log.filename}}</a>
{% endif %}
</td>
<td>
{% if log.hasImage %}
<a href="{{ log.fileurl }}" dojoType="dojox.image.LightboxNano"><img height="60" src="{{ log.fileurl }}"></a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endfor %}
{% endif %}
<noscript>
......@@ -266,15 +341,18 @@
</noscript>
<p/>
<h3 id="logmessagetitle">Event Log Messages</h3>
<div id="event_log">
{# XXX Hacky. We don't want the title here if we're doing panes. #}
{% if not object.getAvailableTags %}
<h3 id="logmessagetitle">Event Log Messages</h3>
<div id="previewer"></div>
<div id="editor"></div>
{% endif %}
{% if object.eventlog_set.count %}
<table class="event">
<tr>
<th>No.</th>
<th>{{ "logtime"|timeselect:"utc" }} Log Entry Created</th>
<th>Submitter</th>
<th>Comment</th>
......@@ -282,6 +360,7 @@
</tr>
{% for log in object.eventlog_set.iterator %}
<tr class="{% cycle 'odd' 'even'%}">
<td>{{log.getN}}
<td>{{log.created|multiTime:"logtime"}}</td>
<td>{{log.issuer}}</td>
<td>{{log.comment|sanitize}}
......@@ -298,32 +377,7 @@
{% endfor %}
</table>
{% endif %}
</div>
</td>
<td rowspan="2" valign="top">
{% if eventdesc %}
<h3>Event Log File</h3>
{{ eventdesc }}
<br/>
{% endif %}
{% if userdesc %}
<br/>
<h3>User Info</h3>
{{ userdesc }}
<br/>
{% endif %}
<p/>
<h3>Available Slots</h3>
{% if not object|slot %}
None.
{% else %}
{% for slot in object|slot %}
<a href="{{slot.fileurl}}">{{ slot.name }}</a> <br/>
{% endfor %}
{% endif %}
</td></tr></table>
</div> <!-- End of pane_holder div -->
{% endblock %}
......@@ -4,10 +4,9 @@
{# Analysis-specific attributes for a cWB event#}
{% block analysis_specific %}
<p/>
<h3>Analysis-Specific Attributes</h3>
<table> <tbody>
<table class="analysis_specific"> <tbody>
<tr>
<td> <table class="event"> <tbody>
<!-- Note: commenting out ifos so that we'll have a multiple of three -->
......
{% extends "gracedb/event_detail.html" %}
{# Analysis-specific attributes for a LowMass event#}
{% block analysis_specific %}
<p/>
<h3>Analysis-specific attributes</h3>
{% load scientific %}
{# Analysis-specific attributes for an LM event#}
{% block analysis_specific %}
<h3>Analysis-Specific Attributes</h3>
<table class="analysis_specific"> <tbody>
<tr>
<td> <table class="event"> <tbody>
<tr> <th> ifos </th> <td> {{object.ifos}} </td> </tr>
<tr> <th> end_time </th> <td> {{object.end_time}} </td> </tr>
<tr> <th> end_time_ns </th> <td> {{object.end_time_ns}} </td> </tr>
</tbody></table>
</td>
<td> <table class="event"> <tbody>
<tr> <th> mass </th> <td> {{object.mass|floatformat:"-4"}} </td> </tr>
<tr> <th> mchirp </th> <td> {{object.mchirp|floatformat:"-4"}} </td> </tr>
<tr> <th> minimum_duration </th> <td> {{object.minimum_duration|scientific}} </td> </tr>
</tbody></table>
</td>
<td> <table class="event"> <tbody>
<tr> <th> snr </th> <td> {{object.snr|floatformat:"-4"}} </td> </tr>
<tr> <th> false_alarm_rate </th> <td> {{object.false_alarm_rate|floatformat:"-4"}} </td> </tr>
<tr> <th> combined_far </th> <td> {{object.combined_far|scientific}} </td> </tr>
</tbody></table>
</td>
</tr>
</tbody> </table>
{% endblock %}
......@@ -4,10 +4,9 @@
{# Analysis-specific attributes for an LM event#}
{% block analysis_specific %}
<p/>
<h3>Analysis-Specific Attributes</h3>
<table> <tbody>
<table class="analysis_specific"> <tbody>
<tr>
<td> <table class="event"> <tbody>
<tr> <th> ifos </th> <td> {{object.ifos}} </td> </tr>
......@@ -30,5 +29,4 @@
</tr>
</tbody> </table>
{% endblock %}
......@@ -3,8 +3,7 @@
{# Analysis-specific attributes for a LowMass event#}
{% block analysis_specific %}
<p/>
<h3>Analysis-specific attributes</h3>
<h3>Event Log File</h3>
{{eventdesc}}
{% 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