Changeset - c2071e8217b2
[Not reviewed]
default
0 1 0
Dennis Fink - 11 years ago 2014-01-25 23:52:09
dennis.fink@c3l.lu
removed unnessecary decodes
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
ennstatus/templates/donate/macros.html
Show inline comments
 
@@ -3,32 +3,32 @@
 
    {% set color = "text-danger" %}
 
  {% else %}
 
    {% if not number.startswith('+') %}
 
      {% set number = ''.join(['+', number]) %}
 
    {% endif %}
 
    {% set color = "text-success" %}
 
  {% endif %}
 
  <span class="{{ color }}">{{ number }}</span>
 
{% endmacro %}
 

	
 
{% macro create_donations_table(csv_file) %}
 
  <table class="table table-bordered table-striped">
 
    <thead>
 
      <tr>
 
        <th>#</th>
 
        <th>Date</th>
 
        <th>Statement</th>
 
        <th>Amount</th>
 
      </tr>
 
    </thead>
 
    <tbody>
 
      {% for row in csv_file %}
 
        <tr>
 
          <td>{{ loop.index }}</td>
 
          <td>{{ row[0].decode('utf-8') }}</td>
 
          <td>{{ row[1].decode('utf-8') }}</td>
 
          <td>{{ colorize_numbers(row[2].decode('utf-8')) }}</td>
 
          <td>{{ row[0] }}</td>
 
          <td>{{ row[1] }}</td>
 
          <td>{{ colorize_numbers(row[2]) }}</td>
 
        </tr>
 
      {% endfor %}
 
    </tbody>
 
  </table>
 
{% endmacro %}
0 comments (0 inline, 0 general)