From c42526f6b57b6e876467a30de4f77f29300c24e6 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 2 Sep 2013 01:29:43 -0400 Subject: [PATCH] Refactor out show_details variable. --- pages/index.mako | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pages/index.mako b/pages/index.mako index 38d79c9..f9986d1 100644 --- a/pages/index.mako +++ b/pages/index.mako @@ -83,6 +83,7 @@ % if page and result: + <% show_details = "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True" %>
% if result.violation: @@ -106,16 +107,9 @@ % else:
  • Results generated in ${round(result.time, 3)} seconds using ${result.queries} queries.
  • % endif - % if "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True": -
  • Hide details:
  • - % else: -
  • Show details:
  • - % endif +
  • ${"Hide" if show_details else "Show"} details:
  • - % if "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True": -
    - % else: -