aboutsummaryrefslogtreecommitdiff
path: root/budget/templates
diff options
context:
space:
mode:
author0livd <0livd@users.noreply.github.com>2017-02-22 23:40:52 +0100
committer0livd <0livd@users.noreply.github.com>2017-03-09 23:24:18 +0100
commite35480d6b7adf76f5bc4d46153b621abd722c681 (patch)
treeb80cbf5ae0ddee631cb0c0aa31940f71d94d5855 /budget/templates
parent8c412b391f9402f3840728ad1e6b8043e4ed8b7b (diff)
downloadihatemoney-mirror-e35480d6b7adf76f5bc4d46153b621abd722c681.zip
ihatemoney-mirror-e35480d6b7adf76f5bc4d46153b621abd722c681.tar.gz
ihatemoney-mirror-e35480d6b7adf76f5bc4d46153b621abd722c681.tar.bz2
Add export feature
Bills and transactions can now be exported to json or csv ref #28
Diffstat (limited to 'budget/templates')
-rw-r--r--budget/templates/edit_project.html6
-rw-r--r--budget/templates/forms.html11
2 files changed, 16 insertions, 1 deletions
diff --git a/budget/templates/edit_project.html b/budget/templates/edit_project.html
index 0240eff..a5e85c3 100644
--- a/budget/templates/edit_project.html
+++ b/budget/templates/edit_project.html
@@ -10,6 +10,10 @@
{% block content %}
<h2>{{ _("Edit this project") }}</h2>
<form class="form-horizontal" method="post">
-{{ forms.edit_project(form) }}
+{{ 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
index 3f8cc4a..b4fa236 100644
--- a/budget/templates/forms.html
+++ b/budget/templates/forms.html
@@ -150,6 +150,17 @@
</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" %}