Skip to content
Snippets Groups Projects
Commit b7dc63cb authored by Eva Schiffer's avatar Eva Schiffer
Browse files

belt and suspenders our zebra tables because mako doesn't believe in belts

parent 347a6ef8
No related branches found
No related tags found
No related merge requests found
......@@ -16,31 +16,33 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
<%block name="cssStyle">
<style>
th.l { text-align: left; }
td.n,th.n { text-align: right; }
body { font-family: sans-serif; }
h4 { margin-bottom: 0; }
tr th { background-color: white; }
tr:nth-child(even) { background-color: #EEE; }
table { border-collapse: collapse; }
td, th { padding-left: 0.5em; padding-right: 0.5em; }
.testfail,.testpass {
display: inline-block;
border: 4px solid black;
text-align: center;
width: 1.15em;
max-width: 1.15em;
height: 1.15em;
max-height: 1.15em;
font-size: 3em;
font-weight: bold;
}
.testfail {
color: #F00;
}
.testpass {
color: #0F0;
}
th.l { text-align: left; }
td.n,th.n { text-align: right; }
body { font-family: sans-serif; }
h4 { margin-bottom: 0; }
tr th { background-color: white; }
tr:nth-child(even) { background-color: #EEE; }
## the tr.evenrow is for coping with PyQt not letting us use nth-child
tr.evenrow { background-color: #EEE; }
table { border-collapse: collapse; }
td, th { padding-left: 0.5em; padding-right: 0.5em; }
.testfail,.testpass {
display: inline-block;
border: 4px solid black;
text-align: center;
width: 1.15em;
max-width: 1.15em;
height: 1.15em;
max-height: 1.15em;
font-size: 3em;
font-weight: bold;
}
.testfail {
color: #F00;
}
.testpass {
color: #0F0;
}
</style>
</%block>
......@@ -212,8 +214,20 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
% endfor
</tr>
## loop to put a line in the table for each attribute
<%
# this is coping with the PyQt gui not handling nth-child
# we're starting with true because we have one table headder row
isEven = True
%>
% for attrKey in sorted(allAttrKeys) :
<tr>
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td>${attrKey}</td>
## loop to add values for each of the files
% for fileKey in sorted(attributesInfo) :
......
......@@ -117,39 +117,65 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
## list out all of the statistics groups we have
<%def name="doclink()">
% if constants.DOCUMENTATION_PATH_KEY in runInfo:
<a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>
% else:
% endif
% if constants.DOCUMENTATION_PATH_KEY in runInfo:
<a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>
% else:
% endif
</%def>
<table>
% if groupedStats is UNDEFINED:
% for setName in sorted(list(statGroups)) :
<% dataSet = statGroups[setName] %>
<tr><th class="l" colspan="2">${setName}</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue)}</td>
</tr>
% endfor
% endfor
% else:
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% endif
</table>
<table>
<%
# this is coping with the PyQt gui not handling nth-child
isEven = False
%>
% if groupedStats is UNDEFINED:
% for setName in sorted(list(statGroups)) :
<% dataSet = statGroups[setName] %>
<tr><th class="l" colspan="2">${setName}</th></tr>
<%
# to make our two ways of striping agree, turn this on and off for header rows too
isEven = not isEven
%>
% for statName, statValue in sorted(list(dataSet.items())) :
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue)}</td>
</tr>
% endfor
% endfor
% else:
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
<%
# to make our two ways of striping agree, turn this on and off for header rows too
isEven = not isEven
%>
% for statName, statValue in sorted(list(dataSet.items())) :
% if isEven :
<tr class="evenrow">
% else :
<tr>
% endif
<%
isEven = not isEven
%>
<td class="n">${statName}${doclink()}:</td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% endif
</table>
</%block>
......
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