From ba948123d003d8e5f66479ca297dbc127d0bf0d5 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 6 Sep 2014 18:43:14 -0500 Subject: [PATCH] Fix source table when no sources were checked. --- static/style.css | 14 +++++++----- templates/index.mako | 60 +++++++++++++++++++++++++++++----------------------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/static/style.css b/static/style.css index c1aaab5..c21d18d 100644 --- a/static/style.css +++ b/static/style.css @@ -67,6 +67,10 @@ div#sources-title { font-weight: bold; } +div#cv-no-sources { + padding-bottom: 5px; +} + div#cv-additional { padding-bottom: 5px; display: none; @@ -109,7 +113,7 @@ table#cv-chain-table { } tr#source-row-selected { - background-color: #CFCFCF; + background-color: #CFCFCF !important; } td#head-settings { @@ -153,10 +157,6 @@ ul#cv-result-list { margin: 0.5em 0; } -span#cv-additional-text { - font-style: italic; -} - a#source-selected { font-weight: bold; } @@ -222,6 +222,10 @@ input#cv-cb-links { margin-right: 5px; } +span.source-footer-text { + font-style: italic; +} + span.cv-hl { background: #FAA; } diff --git a/templates/index.mako b/templates/index.mako index 9206766..6e6764b 100644 --- a/templates/index.mako +++ b/templates/index.mako @@ -166,36 +166,42 @@ % if query.action == "search":
Checked Sources
- - - - - - - % for i, source in enumerate(result.sources): - = 10 else 'id="source-row-selected"' if i == 0 else ""}> - - - + % if result.sources: +
URLConfidenceCompare
${source.url | h} - % if source.skipped: - <% skips = True %> - Skipped - % else: - = T_SUSPECT else "source-possible" if source.confidence >= T_POSSIBLE else "source-novio"}">${round(source.confidence * 100, 1)}% - % endif - - % if i == 0: - Compare - % else: - Compare - % endif -
+ + + + - % endfor -
URLConfidenceCompare
+ % for i, source in enumerate(result.sources): + = 10 else 'id="source-row-selected"' if i == 0 else ""}> + ${source.url | h} + + % if source.skipped: + <% skips = True %> + Skipped + % else: + = T_SUSPECT else "source-possible" if source.confidence >= T_POSSIBLE else "source-novio"}">${round(source.confidence * 100, 1)}% + % endif + + + % if i == 0: + Compare + % else: + Compare + % endif + + + % endfor + + % else: +
+ No sources checked. +
+ % endif % if len(result.sources) > 10:
- ${len(result.sources) - 10} URL${"s" if len(result.sources) > 11 else ""} with lower confidence hidden. Show them. + ${len(result.sources) - 10} URL${"s" if len(result.sources) > 11 else ""} with lower confidence hidden. Show them.
% endif