From 15802fcba5e00ecea2083df4028f40f0ae2eb081 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 15 Jul 2014 22:13:31 -0400 Subject: [PATCH] Good job Mako; I'm giving up on the def because I can't trim it correctly. --- templates/index.mako | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/templates/index.mako b/templates/index.mako index 2d1e9b9..898afe0 100644 --- a/templates/index.mako +++ b/templates/index.mako @@ -108,17 +108,18 @@ <% show_details = "CopyviosShowDetails" in g.cookies and g.cookies["CopyviosShowDetails"].value == "True" %>
- <%def name="get_page_link()"> + % if result.violation: % if query.oldid: - ${query.page.title | h} @${query.oldid | h} +

${query.page.title | h} @${query.oldid | h} is a suspected violation of ${result.url | urlstrip, h}.

% else: - ${query.page.title | h} +

${query.page.title | h} is a suspected violation of ${result.url | urlstrip, h}.

% endif - - % if result.violation: -

${get_page_link() | trim} is a suspected violation of ${result.url | urlstrip, h}.

% else: -

No violations detected in ${get_page_link() | trim}.

+ % if query.oldid: +

No violations detected in ${query.page.title | h} @${query.oldid | h}.

+ % else: +

No violations detected in ${query.page.title | h}.

+ % endif % endif