From 796b895fe1d940c36bd472440f438f4277f728c3 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Wed, 1 Aug 2012 23:50:28 -0400 Subject: [PATCH] Implement |small=yes. --- earwigbot/tasks/drn_clerkbot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/earwigbot/tasks/drn_clerkbot.py b/earwigbot/tasks/drn_clerkbot.py index 933f7ce..9850fe6 100644 --- a/earwigbot/tasks/drn_clerkbot.py +++ b/earwigbot/tasks/drn_clerkbot.py @@ -684,14 +684,14 @@ class DRNClerkBot(Task): def compile_chart(self, conn): """Actually generate the chart from the database.""" - chart = "{{" + self.tl_chart_header + "}}\n" + chart = "{{" + self.tl_chart_header + "|small={{{small|}}}}}\n" query = "SELECT * FROM cases" with conn.cursor(oursql.DictCursor) as cursor: cursor.execute(query) for case in cursor: if case["case_status"] != self.STATUS_UNKNOWN: chart += self.compile_row(case) - chart += "{{" + self.tl_chart_footer + "}}" + chart += "{{" + self.tl_chart_footer + "|small={{{small|}}}}}" return chart def compile_row(self, case): @@ -710,8 +710,8 @@ class DRNClerkBot(Task): case["file_sortkey"] = int(mktime(case["case_file_time"].timetuple())) case["modify_time"] = self.format_time(case["case_modify_time"]) case["modify_sortkey"] = int(mktime(case["case_modify_time"].timetuple())) - row = "{{" + self.tl_chart_row + data.format(**case) + "}}\n" - return row + row = "{{" + self.tl_chart_row + data.format(**case) + return row + "|sm={{{small|}}}}}\n" def format_time_since(self, dt): """Return a string telling the time since datetime occured."""