Changeset e1086bd


Ignore:
Timestamp:
Jun 1, 2010, 3:56:17 AM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
0671644
Parents:
5e6ab71
git-author:
Alex Dehnert <adehnert@…> (05/31/10 21:36:13)
git-committer:
Alex Dehnert <adehnert@…> (06/01/10 03:56:17)
Message:

Color-code amounts in the reporting UI (Trac: #30)

Location:
remit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • remit/media/style/style.css

    r0f53aae re1086bd  
    8989    font-weight: normal;
    9090}
     91table.money-table .positive { color: green; }
     92table.money-table .negative { color: red;   }
    9193
    9294span.username
  • remit/remit_templates/finance_core/reporting.html

    rd1692e8 re1086bd  
    6767    <th>{{label}}</th>
    6868    {% for cell in row %}
    69     <td>{% if cell %}<strong>{% endif %}${{cell}}{% if cell %}</strong>{% endif %}</td>
     69    <td>{% if cell %}<strong class='{{cell|sign}}'>{% endif %}${{cell}}{% if cell %}</strong>{% endif %}</td>
    7070    {% endfor %}
    7171</tr>
  • remit/util/templatetags/misc.py

    rc968555 re1086bd  
    2424    else: return value
    2525
     26@register.filter
     27def sign(value):
     28    if value > 0: return 'positive'
     29    elif value < 0: return 'negative'
     30    else: return 'zero'
     31
    2632register.filter('layer_num', finance_core.models.layer_num)
    2733register.filter('layer_name', finance_core.models.layer_name)
Note: See TracChangeset for help on using the changeset viewer.