Inventory: Center table

This commit is contained in:
David Wick
2015-10-14 17:26:56 -07:00
parent a6b9391a1a
commit b3cd7f678d
2 changed files with 37 additions and 38 deletions

View File

@@ -7153,6 +7153,7 @@ dd { margin-left: 20px; }
font-size: smaller;
text-align: right;
margin-top: 20px;
width: 100%;
th, td {
padding: 3px;

View File

@@ -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))},