diff options
Diffstat (limited to 'budget/templates')
24 files changed, 0 insertions, 701 deletions
diff --git a/budget/templates/add_bill.html b/budget/templates/add_bill.html deleted file mode 100644 index 595f363..0000000 --- a/budget/templates/add_bill.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "layout.html" %} - -{% block js %} - $('#cancel-form').click(function(){location.href={{ url_for(".list_bills") }};}); -{% endblock %} - - -{% block top_menu %} -<a href="{{ url_for(".list_bills") }}">{{ _("Back to the list") }}</a> -{% endblock %} - -{% block content %} - -<form class="form-horizontal" method="post"> - {{ forms.add_bill(form, edit) }} -</form> -{% endblock %} diff --git a/budget/templates/add_member.html b/budget/templates/add_member.html deleted file mode 100644 index 8ddfd52..0000000 --- a/budget/templates/add_member.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "layout.html" %} -{% block js %} - auto_hide_default_text('#name'); -{% endblock %} -{% block content %} - <form class="form-horizontal" action="{{ url_for(".add_member") }}" method="post"> - {{ forms.add_member(form) }} - </form> -{% endblock %} diff --git a/budget/templates/authenticate.html b/budget/templates/authenticate.html deleted file mode 100644 index f241c48..0000000 --- a/budget/templates/authenticate.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -<h2>Authentication</h2> - -{% if create_project %} -<p class="info">{{ _("The project you are trying to access do not exist, do you want -to") }} <a href="{{ url_for(".create_project", project_id=create_project) }}">{{ _("create it") }}</a>{{ _("?") }} -</p> -{% endif %} -{% if admin_auth %} -<form class="form-horizontal" method="POST" accept-charset="utf-8"> - {{ forms.admin(form) }} -</form> -{% else %} -<form class="form-horizontal" method="POST" accept-charset="utf-8"> - {{ forms.authenticate(form) }} -</form> -{% endif %} -{% endblock %} diff --git a/budget/templates/create_project.html b/budget/templates/create_project.html deleted file mode 100644 index 9d4fde9..0000000 --- a/budget/templates/create_project.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "layout.html" %} - -{% block content %} -<h2>{{ _("Create a new project") }}</h2> -<form class="form-horizontal" method="post"> - {{ forms.create_project(form) }} -</form> -{% endblock %} diff --git a/budget/templates/dashboard.html b/budget/templates/dashboard.html deleted file mode 100644 index 3f50915..0000000 --- a/budget/templates/dashboard.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "layout.html" %} -{% block content %} - -<table id="bill_table" class="table table-striped"> - <thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th></tr></thead> - <tbody>{% for project in projects|sort(attribute='name') %} - <tr class="{{ loop.cycle("odd", "even") }}"> - <td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td> - {% if project.has_bills() %} - <td>{{ project.get_bills().all()[0].date }}</td> - <td>{{ project.get_bills().all()[-1].date }}</td> - {% else %} - <td></td> - <td></td> - {% endif %} - </tr> - {% endfor %} - </tbody> -</table> -{% endblock %} - diff --git a/budget/templates/debug.html b/budget/templates/debug.html deleted file mode 100644 index 6f97667..0000000 --- a/budget/templates/debug.html +++ /dev/null @@ -1 +0,0 @@ -Yeah diff --git a/budget/templates/display_errors.html b/budget/templates/display_errors.html deleted file mode 100644 index 9e19605..0000000 --- a/budget/templates/display_errors.html +++ /dev/null @@ -1,5 +0,0 @@ -{% for field_name, field_errors in form.errors.items() if field_errors %} - {% for error in field_errors %} - <p class="alert alert-danger"><strong>{{ form[field_name].label.text }}:</strong> {{ error }}</p> - {% endfor %} -{% endfor %} diff --git a/budget/templates/edit_member.html b/budget/templates/edit_member.html deleted file mode 100644 index 5f097f9..0000000 --- a/budget/templates/edit_member.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "layout.html" %} - -{% block js %} - $('#cancel-form').click(function(){location.href={{ url_for(".list_bills") }};}); -{% endblock %} - - -{% block top_menu %} -<a href="{{ url_for(".list_bills") }}">{{ _("Back to the list") }}</a> -{% endblock %} - -{% block content %} - -<form class="form-horizontal" method="post"> - {{ forms.edit_member(form, edit) }} -</form> -{% endblock %} diff --git a/budget/templates/edit_project.html b/budget/templates/edit_project.html deleted file mode 100644 index a5e85c3..0000000 --- a/budget/templates/edit_project.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "layout.html" %} - -{% block js %} - $('#delete-project').click(function () - { - $(this).html("<a style='color:red; ' href='{{ url_for('.delete_project') }}' >{{_("you sure?")}}</a>"); - }); -{% endblock %} - -{% block content %} -<h2>{{ _("Edit this project") }}</h2> -<form class="form-horizontal" method="post"> -{{ forms.edit_project(edit_form) }} -</form></br> -<h2>{{ _("Download this project's data") }}</h2> -<form class="form-horizontal" method="post"> -{{ forms.export_project(export_form) }} -</form> -{% endblock %} diff --git a/budget/templates/forms.html b/budget/templates/forms.html deleted file mode 100644 index ffdd165..0000000 --- a/budget/templates/forms.html +++ /dev/null @@ -1,168 +0,0 @@ -{% macro input(field, multiple=False, class='form-control', inline=False) -%} - <div class="form-group{% if inline %} row{% endif %}"> - {% if field.type != "SubmitField" %} - {% if inline %} - {{ field.label(class="col-3") }} - {% else %} - {{ field.label() }} - {% endif %} - {% endif %} - <div class="controls{% if inline %} col-9{% endif %}"> - {% if multiple == True %} - {{ field(multiple=True, class=class) }} - {% else %} - {{ field(class=class) | safe }} - {% endif %} - {% if field.description %} - <p class="help-inline">{{ field.description }}</p> - {% endif %} - </div> - </div> -{% endmacro %} - -{% macro submit(field, cancel=False, home=False) -%} - <div class="actions"> - <button type="submit" class="btn btn-primary">{{ field.name }}</button> - {% if home %} - <a href="{{ url_for(".remind_password") }}">{{ _("Can't remember the password?") }}</a> - {% endif %} - {% if cancel %} - <button type="reset" class="btn">{{ _("Cancel") }}</button> - {% endif %} - </div> -{% endmacro %} - -{% macro authenticate(form, home=False) %} - - {% include "display_errors.html" %} - - {{ form.hidden_tag() }} - {{ input(form.id) }} - {{ input(form.password) }} - {% if not home %} - {{ submit(form.submit, home=True) }} - {% endif %} - -{% endmacro %} - -{% macro admin(form) %} - - {% include "display_errors.html" %} - - {{ form.hidden_tag() }} - {{ input(form.admin_password) }} - {{ submit(form.submit) }} - -{% endmacro %} - -{% macro create_project(form, home=False) %} - - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {% if not home %} - {{ input(form.id) }} - {% endif %} - {{ input(form.name) }} - {{ input(form.password) }} - {{ input(form.contact_email) }} - {% if not home %} - {{ submit(form.submit, home=True) }} - {% endif %} - -{% endmacro %} - -{% macro edit_project(form) %} - - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {{ input(form.name) }} - {{ input(form.password) }} - {{ input(form.contact_email) }} - <div class="actions"> - <button class="btn btn-primary">{{ _("Edit the project") }}</button> - <a id="delete-project" style="color:red; margin-left:10px; cursor:pointer; ">{{ _("delete") }}</a> - </div> - -{% endmacro %} - -{% macro add_bill(form, edit=False, title=True) %} - - <fieldset> - {% if title %}<legend>{% if edit %}{{ _("Edit this bill") }} {% else %}{{ _("Add a bill") }} {% endif %}</legend>{% endif %} - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {{ input(form.date, class="form-control datepicker", inline=True) }} - {{ input(form.what, inline=True) }} - {{ input(form.payer, inline=True, class="form-control custom-select") }} - {{ input(form.amount, inline=True) }} - - <div class="form-group row"> - <label class="col-3" for="payed_for">{{ _("For whom?") }}</label> - <div class="controls col-9"> - <ul id="payed_for" class="inputs-list"> - <p><a href="#" id="selectall" onclick="selectall()">{{ _("Select all") }}</a> | <a href="#" id="selectnone" onclick="selectnone()">{{_("Select none")}}</a></p> - {% for key, value, checked in form.payed_for.iter_choices() %} - <p class="form-check"><label for="payed_for-{{key}}" class="form-check-label"><input name="payed_for" type="checkbox" {% if checked %}checked{% endif %} class="form-check-input" value="{{key}}" id="payed_for-{{key}}"/><span>{{value}}</span></label></p> - {% endfor %} - </ul> - </div> - </div> - </fieldset> - <div class="actions"> - {{ form.submit(class="btn btn-primary") }} - {% if not edit %} {{ form.submit2(class="btn") }}{% endif %} - </div> - -{% endmacro %} - -{% macro add_member(form) %} -{{ form.hidden_tag() }} - <div class="input-group"> - <label class="sr-only" for="name">_("Type user name here")</label> - {{ form.name(placeholder=_("Type user name here"), class="form-control") }} - <button class=" input-group-addon btn">{{ _("Add") }}</button> - </div> -{% endmacro %} - -{% macro edit_member(form, title=True) %} - <fieldset> - {% if title %}<legend>{{ _("Edit this member") }}</legend>{% endif %} - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {{ input(form.name) }} - {{ input(form.weight) }} - </fieldset> - <div class="actions"> - {{ form.submit(class="btn btn-primary") }} - </div> -{% endmacro %} - - -{% macro invites(form) %} - {{ form.hidden_tag() }} - {{ input(form.emails) }} - <div class="actions"> - <button class="btn btn-primary">{{ _("Send the invitations") }}</button> - <a href="{{ url_for(".list_bills") }}">{{ _("No, thanks") }}</a> - </div> -{% endmacro %} - -{% macro export_project(form) %} - <fieldset> - {{ form.hidden_tag() }} - {{ input(form.export_type) }} - {{ input(form.export_format) }} - </fieldset> - <div class="actions"> - <button class="btn btn-primary">{{ _("Download") }}</button> - </div> -{% endmacro %} - -{% macro remind_password(form) %} - - {% include "display_errors.html" %} - {{ form.hidden_tag() }} - {{ input(form.id) }} - {{ submit(form.submit) }} - -{% endmacro %} diff --git a/budget/templates/home.html b/budget/templates/home.html deleted file mode 100644 index 9bfe467..0000000 --- a/budget/templates/home.html +++ /dev/null @@ -1,56 +0,0 @@ -{% extends "layout.html" %} - - -{% block body %} - <header id="header" class="row"> - <div class="col-xs-12 col-sm-5 offset-md-2"> - <h2>{{ _("Manage your shared <br>expenses, easily") }}</h2> - {% if is_demo_project_activated %} - <a href="{{ url_for(".demo") }}" class="tryout btn">{{ _("Try out the demo") }}</a> - {% endif %} - </div> - <div class="col-xs-12 col-sm-4"> - <p class="additional-content">{{ _("You're sharing a house?") }}<br /> {{ _("Going on holidays with friends?") }}<br /> {{ _("Simply sharing money with others?") }} <br /><strong>{{ _("We can help!") }}</strong></p> - </div> - </header> - - <main class="row home"> - <div class="col-xs-12 col-sm-5 col-md-4 offset-md-2"> - <form id="authentication-form" class="form-horizontal" action="{{ url_for(".authenticate") }}" method="post"> - <fieldset class="form-group"> - <legend>{{ _("Log to an existing project") }}...</legend> - {{ forms.authenticate(auth_form, home=True) }} - </fieldset> - <div class="controls"> - <button class="btn" type="submit">{{ _("log in") }}</button> - <a class="password-reminder" href="{{ url_for(".remind_password") }}">{{ _("can't remember your password?") }}</a> - </div> - </form> - </div> - <div class="col-xs-12 col-sm-5 col-md-3 offset-sm-1"> - {% if is_admin_mode_enabled %} - <a href="{{ url_for(".create_project") }}">...{{ _("or create a new one") }}</a> - {% else %} - <form id="creation-form" class="form-horizontal" action="{{ url_for(".create_project") }}" method="post"> - <fieldset class="form-group"> - <legend>...{{ _("or create a new one") }}</legend> - {{ forms.create_project(project_form, home=True) }} - </fieldset> - <div class="controls"> - <button class="btn" type="submit">{{ _("let's get started") }}</button> - </div> - </form> - {% endif %} - </main> - </div> -{% endblock %} - -{% block js %} - -$('#creation-form #password').tooltip({ - title: '{{ _("This access code will be sent to your friends. It is stored as-is by the server, so don\\'t reuse a personal password!") }}', - trigger: 'focus', - placement: 'right' -}); - -{% endblock %} diff --git a/budget/templates/invitation_mail.en b/budget/templates/invitation_mail.en deleted file mode 100644 index 03f5141..0000000 --- a/budget/templates/invitation_mail.en +++ /dev/null @@ -1,10 +0,0 @@ -Hi, - -Someone using the email address {{ g.project.contact_email }} invited you to share your expenses for "{{ g.project.name }}". - -It's as simple as saying what did you paid for, for who, and how much did it cost you, we are caring about the rest. - -You can access it here: {{ config['SITE_URL'] }}{{ url_for(".list_bills") }} and the private code is "{{ g.project.password }}". - -Enjoy, -Some weird guys (with beards) diff --git a/budget/templates/invitation_mail.fr b/budget/templates/invitation_mail.fr deleted file mode 100644 index 53698dd..0000000 --- a/budget/templates/invitation_mail.fr +++ /dev/null @@ -1,9 +0,0 @@ -Salut, - -Quelqu'un avec l'addresse email "{{ g.project.contact_email }}" vous à invité à partager vos dépenses pour "{{ g.project.name }}". - -C'est aussi simple que de dire qui à payé pour quoi, pour qui, et combien celà à coûté, on s'occuppe du reste. - -Vous pouvez accéder à la page ici: {{ config['SITE_URL'] }}{{ url_for(".list_bills") }} et le code est "{{ g.project.password }}". - -Have fun, diff --git a/budget/templates/layout.html b/budget/templates/layout.html deleted file mode 100644 index 6ecff41..0000000 --- a/budget/templates/layout.html +++ /dev/null @@ -1,98 +0,0 @@ -{% import "forms.html" as forms %} -<!DOCTYPE html> -<html> -<head> - <title>{{ _("Account manager") }}{% block title %}{% endblock %}</title> - <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/main.css') }}"> - <script src="{{ url_for("static", filename="js/jquery-3.1.1.min.js") }}"></script> - <script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script> - <script src="{{ url_for("static", filename="js/tether.min.js") }}"></script> - <script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script> - {% block head %}{% endblock %} - <script type="text/javascript" charset="utf-8"> - $(document).ready(function(){ - var left = window.innerWidth/2-$('.flash').width()/2; - $(".flash").css({ "left": left+"px", "top":"0.6rem" }); - setTimeout(function(){ - $(".flash").fadeOut("slow", function () { - $(".flash").remove(); - }); - }, 4000); - - $('.datepicker').datepicker({ - format: 'yyyy-mm-dd', - weekStart: 1, - autoclose: true, - language: '{{ g.lang }}' - }); - - $('.dropdown-toggle').dropdown(); - - {% block js %}{% endblock %} - }); - </script> -</head> -<body> - <div class="container"> - <nav class="navbar navbar-toggleable-sm fixed-top navbar-inverse bg-inverse"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarToggler"> - <h1><a class="navbar-brand" href="{{ url_for(".home") }}">#! money?</a></h1> - <ul class="navbar-nav ml-auto mr-auto"> - {% if g.project %} - {% block navbar %} - <li class="nav-item{% if current_view == 'list_bills' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".list_bills") }}">{{ _("Bills") }}</a></li> - <li class="nav-item{% if current_view == 'settle_bill' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".settle_bill") }}">{{ _("Settle") }}</a></li> - {% endblock %} - {% endif %} - </ul> - <ul class="navbar-nav secondary-nav"> - {% if g.project %} - <li class="nav-item dropdown"> - <a href="#" class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><strong>{{ g.project.name }}</strong> {{ _("options") }} <b class="caret"></b></a> - <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> - <li><a class="dropdown-item" href="{{ url_for(".edit_project") }}">{{ _("Project settings") }}</a></li> - <li class="dropdown-divider"></li> - {% for id, name in session['projects'] %} - {% if id != g.project.id %} - <li><a class="dropdown-item" href="{{ url_for(".list_bills", project_id=id) }}">{{ _("switch to") }} {{ name }}</a></li> - {% endif %} - {% endfor %} - <li><a class="dropdown-item" href="{{ url_for(".create_project") }}">{{ _("Start a new project") }}</a></li> - <li class="dropdown-divider"></li> - <li><a class="dropdown-item" href="{{ url_for(".exit") }}">{{ _("Logout") }}</a></li> - </ul> - </li> - {% endif %} - <li class="nav-item{% if g.lang == "fr" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="fr") }}">fr</a></li> - <li class="nav-item{% if g.lang == "en" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="en") }}">en</a></li> - </ul> - </div> - </nav> - </div> - -<div class="container-fluid"> -{% block body %} - {% block sidebar %}{% endblock %} - <main class="content offset-1 col-10"> - {% block content %}{% endblock %} - </main> -</div> -{% endblock %} - -{% for message in get_flashed_messages() %} -<div class="flash alert alert-success">{{ message }}</div> -{% endfor %} - -{% block footer %} -<footer> - <p><a href="https://github.com/spiral-project/ihatemoney">{{ _("This is a free software") }}</a>, {{ _("you can contribute and improve it!") }}</p> -</footer> -{% endblock %} - -</body> -</html> diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html deleted file mode 100644 index 4029bc9..0000000 --- a/budget/templates/list_bills.html +++ /dev/null @@ -1,128 +0,0 @@ -{% extends "sidebar_table_layout.html" %} - -{% block title %} - {{ g.project.name }}{% endblock %} -{% block head %} - <script src="{{ url_for("static", filename="js/bootstrap-datepicker.js") }}"></script> - <script src="{{ url_for("static", filename="js/locales/bootstrap-datepicker.fr.min.js") }}" charset="utf-8"></script> -{% endblock %} -{% block js %} - {% if add_bill %} $('#new-bill').click(); {% endif %} - - // Hide all members actions - $('.action').each(function(){ - $(this).hide(); - }); - - // ask for confirmation before removing an user - $('.action.delete').each(function(){ - var link = $(this).find('button'); - link.click(function(){ - if ($(this).hasClass("confirm")){ - return true; - } - $(this).html("{{_("you sure?")}}"); - $(this).addClass("confirm"); - return false; - }); - }); - - // display the remove button on mouse over (and hide them per default) - $('.balance tr').hover(function(){ - $(this).find('.action').show(); - }, function(){ - $(this).find('.action').hide(); - }); - - var highlight_owers = function(){ - var ower_ids = $(this).attr("owers").split(','); - var payer_id = $(this).attr("payer"); - $.each(ower_ids, function(i, val){ - $('#bal-member-'+val).addClass("ower_line"); - }); - $("#bal-member-"+payer_id).addClass("payer_line"); - }; - - var unhighlight_owers = function(){ - $('[id^="bal-member-"]').removeClass("ower_line payer_line"); - }; - - $('#bill_table tbody tr').hover(highlight_owers, unhighlight_owers); - -{% endblock %} - -{% block sidebar %} - <form id="add-member-form" action="{{ url_for(".add_member") }}" method="post" class="form-inline"> - {{ forms.add_member(member_form) }} - </form> - - <div id="table_overflow"> - <table class="balance table"> - {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} - <tr id="bal-member-{{ member.id }}" action={% if member.activated %}delete{% else %}reactivate{% endif %}> - <td class="balance-name">{{ member.name }} - <span class="light{% if not g.project.uses_weights %} extra-info{% endif %}">(x{{ member.weight|minimal_round(1) }})</span> - </td> - {% if member.activated %} - <td> - <form class="action delete" action="{{ url_for(".remove_member", member_id=member.id) }}" method="POST"> - <button type="submit">{{ _("deactivate") }}</button></form> - <form class="action edit" action="{{ url_for(".edit_member", member_id=member.id) }}" method="GET"> - <button type="submit">{{ _("edit") }}</button></form> - </td> - {% else %} - <td> - <form class="action reactivate" action="{{ url_for(".reactivate", member_id=member.id) }}" method="POST"> - <button type="submit">{{ _("reactivate") }}</button></form></td> - {% endif %} - <td class="balance-value {% if balance[member.id]|round(2) > 0 %}positive{% elif balance[member.id]|round(2) < 0 %}negative{% endif %}"> - {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} - </td> - </tr> - {% endfor %} - </table> - </div> -{% endblock %} - -{% block content %} -<div class="identifier">{{ _("The project identifier is") }} <a href="{{ url_for(".list_bills") }}">{{ g.project.id }}</a>, {{ _("remember it!") }}</div> -<a id="new-bill" href="{{ url_for(".add_bill") }}" class="btn btn-primary" data-toggle="modal" data-target="#bill-form">{{ _("Add a new bill") }}</a> - - <div id="bill-form" class="modal fade show" role="dialog"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <h3 class="modal-title">{{ _('Add a bill') }}</h3> - <a href="#" class="close" data-dismiss="modal">×</a> - </div> - <form action="{{ url_for(".add_bill") }}" method="post" class="modal-body container"> - {{ forms.add_bill(bill_form, title=False) }} - </form> - </div> - </div> - </div> - - {% if bills.count() > 0 %} - <table id="bill_table" class="col table table-striped table-hover"> - <thead><tr><th>{{ _("When?") }}</th><th>{{ _("Who paid?") }}</th><th>{{ _("For what?") }}</th><th>{{ _("For whom?") }}</th><th>{{ _("How much?") }}</th><th>{{ _("Actions") }}</th></tr></thead> - <tbody> - {% for bill in bills %} - <tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}"> - <td>{{ bill.date }}</td> - <td>{{ bill.payer }}</td> - <td>{{ bill.what }}</td> - <td>{{ bill.owers|join(', ', 'name') }} </td> - <td>{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }})</td> - <td class="bill-actions"> - <a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a> - <a class="delete" href="{{ url_for(".delete_bill", bill_id=bill.id) }}" title="{{ _("delete") }}">{{ _('delete') }}</a> - </td> - </tr> - {% endfor %} - </tbody> - </table> - - {% else %} - <p>{{ _("Nothing to list yet. You probably want to") }} <a href="{{ url_for(".add_bill") }}" data-toggle="modal" data-target="#bill-form">{{ _("add a bill") }}</a> ?</p> - {% endif %} -{% endblock %} diff --git a/budget/templates/password_reminder.en b/budget/templates/password_reminder.en deleted file mode 100644 index 31210aa..0000000 --- a/budget/templates/password_reminder.en +++ /dev/null @@ -1,8 +0,0 @@ -Hi, - -You requested to be reminded about your password for "{{ project.name }}". - -You can access it here: {{ config['SITE_URL'] }}{{ url_for(".list_bills", project_id=project.id) }}, the private code is "{{ project.password }}". - -Hope this helps, -Some weird guys (with beards) diff --git a/budget/templates/password_reminder.fr b/budget/templates/password_reminder.fr deleted file mode 100644 index 58f04e3..0000000 --- a/budget/templates/password_reminder.fr +++ /dev/null @@ -1,7 +0,0 @@ -Salut, - -Vous avez demandez des informations sur votre mot de passe pour "{{ project.name }}". - -Vous pouvez y accéder ici {{ config['SITE_URL'] }}{{ url_for(".list_bills", project_id=project.id) }}, le code d'accès est "{{ project.password }}". - -Faites en bon usage ! diff --git a/budget/templates/password_reminder.html b/budget/templates/password_reminder.html deleted file mode 100644 index 8f46289..0000000 --- a/budget/templates/password_reminder.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "layout.html" %} - -{% block content %} -<h2>{{ _("Password reminder") }}</h2> -<form class="form-horizontal" method="post"> -{{ forms.remind_password(form) }} -</form> -{% endblock %} diff --git a/budget/templates/recent_projects.html b/budget/templates/recent_projects.html deleted file mode 100644 index df4972d..0000000 --- a/budget/templates/recent_projects.html +++ /dev/null @@ -1,8 +0,0 @@ -{% if 'projects' in session %} -<h3>{{ _("Your projects") }}</h3> - <ul> - {% for id, name in session['projects'] %} - <li><a href="{{ url_for("list_bills", project_id=id) }}">{{ name }}</a></li> - {% endfor %} - </ul> -{% endif %} diff --git a/budget/templates/reminder_mail.en b/budget/templates/reminder_mail.en deleted file mode 100644 index fe57be2..0000000 --- a/budget/templates/reminder_mail.en +++ /dev/null @@ -1,9 +0,0 @@ -Hi, - -You have just (or someone else using your email address) created the project "{{ g.project.name }}" to share your expenses. - -You can access it here: {{ config['SITE_URL'] }}{{ url_for(".list_bills") }} (the identifier is {{ g.project.id }}), -and the private code is "{{ g.project.password }}". - -Enjoy, -Some weird guys (with beards) diff --git a/budget/templates/reminder_mail.fr b/budget/templates/reminder_mail.fr deleted file mode 100644 index 8130218..0000000 --- a/budget/templates/reminder_mail.fr +++ /dev/null @@ -1,8 +0,0 @@ -Hey, - -Vous venez de créer le projet "{{ g.project.name }}" pour partager vos dépenses. - -Vous pouvez y accéder ici: {{ config['SITE_URL'] }}{{ url_for(".list_bills") }} (l'identifieur est {{ g.project.id }}), -et le code d'accès "{{ g.project.password }}". - -Faites en bon usage ! diff --git a/budget/templates/send_invites.html b/budget/templates/send_invites.html deleted file mode 100644 index 7b3bdc5..0000000 --- a/budget/templates/send_invites.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "layout.html" %} - -{% block sidebar %} -<ol> - <li>{{ _("Create the project") }}</li> - <li><strong>{{ _("Invite people") }}</strong></li> - <li><a href="{{ url_for(".list_bills") }}">{{ _("Use it!") }}</a></li> -</ol> -{% endblock %} -{% block content %} -<h2>{{ _("Invite people to join this project") }}</h2> -<p>{{ _("Specify a (comma separated) list of email adresses you want to notify about the -creation of this budget management project and we will send them an email for you.") }}</p> -<p>{{ _("If you prefer, you can") }} <a href="{{ url_for(".list_bills") }}">{{ _("skip this step") }}</a> {{ _("and notify them yourself") }}</p> - -{% include "display_errors.html" %} -<form class="invites form-horizontal" method="post" accept-charset="utf-8"> - {{ forms.invites(form) }} -</form> -{% endblock %} diff --git a/budget/templates/settle_bills.html b/budget/templates/settle_bills.html deleted file mode 100644 index b67a9b8..0000000 --- a/budget/templates/settle_bills.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "sidebar_table_layout.html" %} - -{% block sidebar %} - <div id="table_overflow"> - <table class="balance table"> - {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} - <tr id="bal-member-{{ member.id }}" action={% if member.activated %}delete{% else %}reactivate{% endif %}> - <td class="balance-name">{{ member.name }}</td> - <td class="balance-value {% if balance[member.id]|round(2) > 0 %}positive{% elif balance[member.id]|round(2) < 0 %}negative{% endif %}"> - {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} - </td> - </tr> - {% endfor %} - </table> - </div> -{% endblock %} - - -{% block content %} - <table id="bill_table" class="split_bills table table-striped"> - <thead><tr><th>{{ _("Who pays?") }}</th><th>{{ _("To whom?") }}</th><th>{{ _("How much?") }}</th></tr></thead> - <tbody> - {% for bill in bills %} - <tr class="{{ loop.cycle("odd", "even") }}" receiver={{bill.receiver.id}}> - <td>{{ bill.ower }}</td> - <td>{{ bill.receiver }}</td> - <td>{{ "%0.2f"|format(bill.amount) }}</td> - </tr> - {% endfor %} - </tbody> - </table> - -{% endblock %} diff --git a/budget/templates/sidebar_table_layout.html b/budget/templates/sidebar_table_layout.html deleted file mode 100644 index 239acb3..0000000 --- a/budget/templates/sidebar_table_layout.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "layout.html" %} - -{% block body %} -<div class="row" style="height: 100%"> -<aside id="sidebar" class="sidebar col-xs-12 col-md-3 " style="height: 100%"> - {% block sidebar %}{% endblock %} -</aside> - -<main class="offset-md-3 col-xs-12 col-md-9"> - {% block content %}{% endblock %} -</main> - -</div> -{% endblock %} |
