1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Fixes various typos.

This commit is contained in:
Alexis Metaireau 2011-08-10 01:05:25 +02:00
parent 5c44e495b7
commit 98f9d96a27
3 changed files with 2 additions and 36 deletions

View file

@ -1,31 +0,0 @@
{% extends "layout.html" %}
{% block top_menu %}
<a href="{{ url_for('list_bills', project_id=project.id) }}">Back to the list</a>
{% endblock %}
{% block content %}
<h2>Computations</h2>
<div class="container span-16">
<ol>
<li>For each person, get the list of bills he have to pay</li>
<li>Increase the amount this person have to pay</li>
<li>At the same time, increase what the payer of the bill have to receive</li>
<li>At the end, for each person, substract what he have to pay to what he have to receive</li>
</ol>
</div>
<div class="container span-6 last">
<a class="awesome large green button" onclick = "if (! confirm('Are you sure ?')) return false;" href="">Mark this as payed / processed</a>
</div>
<table>
<thead><tr><th>Name</th><th>Balance</th></tr></thead>
<tbody>
{% for person, balance in balances.items() %}
<tr><td>{{ person.name }}</td><td>{{ balance }}</td></tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View file

@ -12,7 +12,7 @@
{% set balance = project.get_balance() %} {% set balance = project.get_balance() %}
{% for member in project.active_members %} {% for member in project.active_members %}
<li class="{{ loop.cycle("even", "odd") }}"> <li class="{{ loop.cycle("even", "odd") }}">
<span class="balance {% if balance[member] < 0 %}positive{% elif balance[member] > 0 %}negative{% endif %}">{{ balance[member] }}</span> <span class="balance {% if balance[member] > 0 %}positive{% elif balance[member] < 0 %}negative{% endif %}">{{ balance[member] }}</span>
{{ member.name }} {{ member.name }}
<a class="remove" href="{{ url_for("remove_member", project_id=project.id, member_id=member.id) }}">delete</a></li> <a class="remove" href="{{ url_for("remove_member", project_id=project.id, member_id=member.id) }}">delete</a></li>
{% endfor %} {% endfor %}
@ -44,9 +44,6 @@
</tbody> </tbody>
</table> </table>
<a class="awesome large green button fleft" href="{{ url_for("compute_bills", project_id=project.id) }}">Compute bills</a>
<p> Periodically (probably at the end of each month, you can compute the balance of each people, in order to reset all the debts. You can also let this "as-is" and try to find a good balance, that's up to you</p>
{% else %} {% else %}
<p>Nothing to list yet. You probably want to <a href="{{ url_for("add_bill", project_id=project.id) }}">add a bill</a> ?</p> <p>Nothing to list yet. You probably want to <a href="{{ url_for("add_bill", project_id=project.id) }}">add a bill</a> ?</p>
{% endif %} {% endif %}

View file

@ -169,7 +169,7 @@ def add_bill(project):
db.session.add(form.save()) db.session.add(form.save())
db.session.commit() db.session.commit()
flash("The bill have been added") flash("The bill has been added")
return redirect(url_for('list_bills', project_id=project.id)) return redirect(url_for('list_bills', project_id=project.id))
return render_template("add_bill.html", form=form, project=project) return render_template("add_bill.html", form=form, project=project)