Include icons in links
This commit is contained in:
parent
fac26bc224
commit
c754e869fc
4 changed files with 22 additions and 34 deletions
|
@ -4,14 +4,13 @@
|
|||
<table class="full-width">
|
||||
<colgroup>
|
||||
<col class="desc">
|
||||
<col class="icon">
|
||||
<col class="value">
|
||||
<col span="2" class="bar">
|
||||
<col class="value">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" colspan="2">{% translate "Category" %}</th>
|
||||
<th scope="col">{% translate "Category" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
|
||||
<th scope="col" colspan="2">{% translate "Income" %}</th>
|
||||
</tr>
|
||||
|
@ -23,17 +22,14 @@
|
|||
<th scope="row" class="l">
|
||||
{% if cat.category %}
|
||||
{% if month %}
|
||||
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__name }}</a>
|
||||
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% elif year %}
|
||||
<a href="{% url "category_transaction_year" cat.category year.year %}">{{ cat.category__name }}</a>
|
||||
<a href="{% url "category_transaction_year" cat.category year.year %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
|
||||
{% else %}
|
||||
{{ cat.category__name }}
|
||||
{{ cat.category__icon|remix }}{{ cat.category__name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<td class="c">
|
||||
{% if cat.category %}{{ cat.category__icon|remix }}{% endif %}
|
||||
</td>
|
||||
<td class="value">{{ cat.sum_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
{% if cat.sum_m %}
|
||||
|
@ -59,7 +55,7 @@
|
|||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td class="empty" colspan="6">{% translate "No transaction" %}</td>
|
||||
<td class="empty" colspan="5">{% translate "No transaction" %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
|
@ -67,7 +63,7 @@
|
|||
<tfoot>
|
||||
{% if categories %}
|
||||
<tr>
|
||||
<th scope="row" colspan="2" class="l">{% translate "Total" %}</th>
|
||||
<th scope="row" class="l">{% translate "Total" %}</th>
|
||||
<td class="value">{{ total_m|pmvalue }}</td>
|
||||
<td class="bar m">
|
||||
<div style="width: {% widthratio total_m max -100 %}%"></div>
|
||||
|
|
|
@ -78,9 +78,6 @@ a {
|
|||
height: 1.5rem;
|
||||
line-height: 1.5rem;
|
||||
|
||||
[class^="ri-"] {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
&.add {
|
||||
color: var(--text-link);
|
||||
background: var(--bg-01);
|
||||
|
@ -391,9 +388,6 @@ ul.statements {
|
|||
text-overflow: ".";
|
||||
white-space: nowrap;
|
||||
}
|
||||
a span::after {
|
||||
content: "\a0";
|
||||
}
|
||||
}
|
||||
|
||||
&.new,
|
||||
|
@ -402,3 +396,9 @@ ul.statements {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
& > span[class^="ri-"]:first-child::after {
|
||||
content: "\2002";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,14 +9,8 @@
|
|||
<col class="value">
|
||||
<col class="value">
|
||||
<col class="desc">
|
||||
{% if not category %}
|
||||
<col class="icon">
|
||||
<col class="desc">
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<col class="icon">
|
||||
<col class="desc">
|
||||
{% endif %}
|
||||
{% if not category %}<col class="desc">{% endif %}
|
||||
{% if not account %}<col class="desc">{% endif %}
|
||||
</colgroup>
|
||||
<thead>
|
||||
{% if new_transaction_url %}
|
||||
|
@ -34,10 +28,10 @@
|
|||
<th>{% translate "Income" %}</th>
|
||||
<th>{% translate "Trader" %}</th>
|
||||
{% if not category %}
|
||||
<th colspan="2">{% translate "Category" %}</th>
|
||||
<th>{% translate "Category" %}</th>
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<th colspan="2">{% translate "Account" %}</th>
|
||||
<th>{% translate "Account" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -67,18 +61,16 @@
|
|||
<td>{{ trans.trader|default_if_none:"" }}</td>
|
||||
{% if not category %}
|
||||
{% if trans.category %}
|
||||
<td class="r">{{ trans.category.icon|remix }}</td>
|
||||
<td>
|
||||
<a href="{{ trans.category.get_absolute_url }}">{{ trans.category }}</a>
|
||||
<a href="{{ trans.category.get_absolute_url }}">{{ trans.category.icon|remix }}{{ trans.category }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="2"></td>
|
||||
<td></td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<td class="r">{{ trans.account.icon|remix }}</td>
|
||||
<td>
|
||||
<a href="{{ trans.account.get_absolute_url }}">{{ trans.account }}</a>
|
||||
<a href="{{ trans.account.get_absolute_url }}">{{ trans.account.icon|remix }}{{ trans.account }}</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
|
|
@ -38,9 +38,9 @@ def year_url(context, year, cls=""):
|
|||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def tr_colspan(context):
|
||||
ncol = 10
|
||||
ncol = 8
|
||||
if context.get("category"):
|
||||
ncol -= 2
|
||||
ncol -= 1
|
||||
if context.get("account"):
|
||||
ncol -= 2
|
||||
ncol -= 1
|
||||
return ncol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue