Permalink
Browse files

Adjusts Latest Scans Page Formatting (way more readable)

  • Loading branch information...
1 parent 937e0e7 commit 220170c15034222dbac167db70215602b013cda9 @sudorandom sudorandom committed Dec 23, 2012
Showing with 8 additions and 2 deletions.
  1. +2 −0 cargoscanner.py
  2. +6 −2 templates/latest.html
View
@@ -107,6 +107,8 @@ def format_isk(value):
@app.template_filter('format_isk_human')
def format_isk_human(value):
+ if value is None:
+ return ""
try:
return "%s ISK" % humanize.intword(value, format='%.2f')
except:
@@ -11,16 +11,20 @@
<th class="header">Id</th>
<th class="header" style="text-align:right">Created</th>
<th class="header" style="text-align:right">Sell Value</th>
+ <th class="header"></th>
<th class="header" style="text-align:right">Buy Value</th>
+ <th class="header"></th>
</tr>
</thead>
<tbody>
{% for item in listing %}
<tr>
<td><a href="{{ url_for('display_scan', scan_id=item.scan_id) }}">#{{ item.scan_id }}</a></td>
<td style="text-align:right">{{ item.created|relative_time }}</td>
- <td style="text-align:right"><small>({{ item.sell_value|format_isk_human }})</small> {{ item.sell_value|format_isk }}</td>
- <td style="text-align:right"><small>({{ item.buy_value|format_isk_human }})</small> {{ item.buy_value|format_isk }}</td>
+ <td style="text-align:right">{{ item.sell_value|format_isk }}</td>
+ <td><small>{{ item.sell_value|format_isk_human }}</small></td>
+ <td style="text-align:right">{{ item.buy_value|format_isk }}</td>
+ <td><small>{{ item.buy_value|format_isk_human }}</small></td>
</tr>
{% endfor %}
</table>

0 comments on commit 220170c

Please sign in to comment.