From b3cd7f678d439c60cb1488b1c0cbc66157c3d795 Mon Sep 17 00:00:00 2001 From: David Wick Date: Wed, 14 Oct 2015 17:26:56 -0700 Subject: [PATCH] Inventory: Center table --- r2/r2/public/static/css/reddit.less | 1 + r2/r2/templates/promoteinventory.html | 74 +++++++++++++-------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index a4842797f..63ba71ea4 100644 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -7153,6 +7153,7 @@ dd { margin-left: 20px; } font-size: smaller; text-align: right; margin-top: 20px; + width: 100%; th, td { padding: 3px; diff --git a/r2/r2/templates/promoteinventory.html b/r2/r2/templates/promoteinventory.html index 63c535e48..9796c9c44 100644 --- a/r2/r2/templates/promoteinventory.html +++ b/r2/r2/templates/promoteinventory.html @@ -47,46 +47,44 @@ ${unsafe(js.use('sponsored'))} + + + + %for text in thing.header: + + %endfor + + + + + %for row in thing.rows: + + + %for column in row.columns: + + %endfor + %endfor + +
${text}
+ %if not row.is_total: + + %else: +
${row.info['title']}
+ %endif +
${column}
+ %if thing.csv_url: +
+ ${plain_link(_("download as csv"), thing.csv_url)} +
+ %endif - - - - %for text in thing.header: - - %endfor - - - - - %for row in thing.rows: - - - %for column in row.columns: - - %endfor - %endfor - -
${text}
- %if not row.is_total: - - %else: -
${row.info['title']}
- %endif -
${column}
- -%if thing.csv_url: -
- ${plain_link(_("download as csv"), thing.csv_url)} -
-%endif -