mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Inventory: Center table
This commit is contained in:
@@ -7153,6 +7153,7 @@ dd { margin-left: 20px; }
|
||||
font-size: smaller;
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
|
||||
th, td {
|
||||
padding: 3px;
|
||||
|
||||
@@ -47,46 +47,44 @@ ${unsafe(js.use('sponsored'))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="inventory-table">
|
||||
<thead>
|
||||
<tr>
|
||||
%for text in thing.header:
|
||||
<th>${text}</th>
|
||||
%endfor
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
%for row in thing.rows:
|
||||
<tr class="${'total' if row.is_total else ''}">
|
||||
<td class="title">
|
||||
%if not row.is_total:
|
||||
<div class="author view-link">
|
||||
${plain_link(row.info['author'], row.info['edit_url'])}
|
||||
</div>
|
||||
%else:
|
||||
<div class="author">${row.info['title']}</div>
|
||||
%endif
|
||||
</td>
|
||||
%for column in row.columns:
|
||||
<td
|
||||
%if column == '0':
|
||||
class="no-inventory"
|
||||
%endif
|
||||
>${column}</td>
|
||||
%endfor
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
%if thing.csv_url:
|
||||
<div class="promote-report-csv">
|
||||
${plain_link(_("download as csv"), thing.csv_url)}
|
||||
</div>
|
||||
%endif
|
||||
</div>
|
||||
|
||||
<table class="inventory-table">
|
||||
<thead>
|
||||
<tr>
|
||||
%for text in thing.header:
|
||||
<th>${text}</th>
|
||||
%endfor
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
%for row in thing.rows:
|
||||
<tr class="${'total' if row.is_total else ''}">
|
||||
<td class="title">
|
||||
%if not row.is_total:
|
||||
<div class="author view-link">
|
||||
${plain_link(row.info['author'], row.info['edit_url'])}
|
||||
</div>
|
||||
%else:
|
||||
<div class="author">${row.info['title']}</div>
|
||||
%endif
|
||||
</td>
|
||||
%for column in row.columns:
|
||||
<td
|
||||
%if column == '0':
|
||||
class="no-inventory"
|
||||
%endif
|
||||
>${column}</td>
|
||||
%endfor
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
%if thing.csv_url:
|
||||
<div class="promote-report-csv">
|
||||
${plain_link(_("download as csv"), thing.csv_url)}
|
||||
</div>
|
||||
%endif
|
||||
|
||||
<script type="text/javascript">
|
||||
r.sponsored.set_form_render_fnc(r.sponsored.fill_inventory_form);
|
||||
r.sponsored.setup_geotargeting(${unsafe(simplejson.dumps(thing.regions))},
|
||||
|
||||
Reference in New Issue
Block a user