mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-29 01:42:37 +02:00
Remove unused archive feature
The archive table is not removed from the database model because it would involve a tricky migration fixes #170
This commit is contained in:
parent
79d33e1c65
commit
ceab95b444
7 changed files with 2 additions and 71 deletions
|
@ -172,12 +172,6 @@ class InviteForm(FlaskForm):
|
||||||
email=email))
|
email=email))
|
||||||
|
|
||||||
|
|
||||||
class CreateArchiveForm(FlaskForm):
|
|
||||||
name = TextField(_("Name for this archive (optional)"), validators=[])
|
|
||||||
start_date = DateField(_("Start date"), validators=[Required()])
|
|
||||||
end_date = DateField(_("End date"), validators=[Required()], default=datetime.now)
|
|
||||||
|
|
||||||
|
|
||||||
class ExportForm(FlaskForm):
|
class ExportForm(FlaskForm):
|
||||||
export_type = SelectField(_("What do you want to download ?"),
|
export_type = SelectField(_("What do you want to download ?"),
|
||||||
validators=[Required()],
|
validators=[Required()],
|
||||||
|
|
|
@ -126,10 +126,6 @@ msgstr ""
|
||||||
msgid "The email %(email)s is not valid"
|
msgid "The email %(email)s is not valid"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: forms.py:190
|
|
||||||
msgid "Name for this archive (optional)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: forms.py:191
|
#: forms.py:191
|
||||||
msgid "Start date"
|
msgid "Start date"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -201,10 +197,6 @@ msgstr ""
|
||||||
msgid "The bill has been modified"
|
msgid "The bill has been modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: web.py:399
|
|
||||||
msgid "The data from XX to XX has been archived"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/add_bill.html:9
|
#: templates/add_bill.html:9
|
||||||
msgid "Back to the list"
|
msgid "Back to the list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -292,14 +284,6 @@ msgstr ""
|
||||||
msgid "No, thanks"
|
msgid "No, thanks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/forms.html:109
|
|
||||||
msgid "Create an archive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/forms.html:116
|
|
||||||
msgid "Create the archive"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/home.html:8
|
#: templates/home.html:8
|
||||||
msgid "Manage your shared <br>expenses, easily"
|
msgid "Manage your shared <br>expenses, easily"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<form class="form-horizontal" method="post" accept-charset="utf-8">
|
|
||||||
{{ forms.create_archive(form) }}
|
|
||||||
</form>
|
|
||||||
{% endblock %}
|
|
|
@ -137,19 +137,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro create_archive(form) %}
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{ _("Create an archive") }}</legend>
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
{{ input(form.name) }}
|
|
||||||
{{ input(form.start_date) }}
|
|
||||||
{{ input(form.end_date) }}
|
|
||||||
</fieldset>
|
|
||||||
<div class="actions">
|
|
||||||
<button class="btn">{{ _("Create the archive") }}</button>
|
|
||||||
</div>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro export_project(form) %}
|
{% macro export_project(form) %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
|
|
Binary file not shown.
|
@ -134,10 +134,6 @@ msgstr "Envoyer les invitations"
|
||||||
msgid "The email %(email)s is not valid"
|
msgid "The email %(email)s is not valid"
|
||||||
msgstr "L'email %(email)s est invalide"
|
msgstr "L'email %(email)s est invalide"
|
||||||
|
|
||||||
#: forms.py:190
|
|
||||||
msgid "Name for this archive (optional)"
|
|
||||||
msgstr "Nom pour cette archive (optionnel)"
|
|
||||||
|
|
||||||
#: forms.py:191
|
#: forms.py:191
|
||||||
msgid "Start date"
|
msgid "Start date"
|
||||||
msgstr "Date de départ"
|
msgstr "Date de départ"
|
||||||
|
@ -225,10 +221,6 @@ msgstr "La facture a été supprimée"
|
||||||
msgid "The bill has been modified"
|
msgid "The bill has been modified"
|
||||||
msgstr "La facture a été modifiée"
|
msgstr "La facture a été modifiée"
|
||||||
|
|
||||||
#: web.py:399
|
|
||||||
msgid "The data from XX to XX has been archived"
|
|
||||||
msgstr "Les données de XX à XX ont été archivées"
|
|
||||||
|
|
||||||
#: templates/add_bill.html:9
|
#: templates/add_bill.html:9
|
||||||
msgid "Back to the list"
|
msgid "Back to the list"
|
||||||
msgstr "Retourner à la liste"
|
msgstr "Retourner à la liste"
|
||||||
|
@ -320,14 +312,6 @@ msgstr "Envoyer les invitations"
|
||||||
msgid "No, thanks"
|
msgid "No, thanks"
|
||||||
msgstr "Non merci"
|
msgstr "Non merci"
|
||||||
|
|
||||||
#: templates/forms.html:109
|
|
||||||
msgid "Create an archive"
|
|
||||||
msgstr "Créer une archive"
|
|
||||||
|
|
||||||
#: templates/forms.html:116
|
|
||||||
msgid "Create the archive"
|
|
||||||
msgstr "Créer l'archive"
|
|
||||||
|
|
||||||
#: templates/forms.html:136
|
#: templates/forms.html:136
|
||||||
msgid "Download this project's data"
|
msgid "Download this project's data"
|
||||||
msgstr "Télécharger les données de ce projet"
|
msgstr "Télécharger les données de ce projet"
|
||||||
|
|
|
@ -19,8 +19,8 @@ from sqlalchemy import orm
|
||||||
|
|
||||||
# local modules
|
# local modules
|
||||||
from models import db, Project, Person, Bill
|
from models import db, Project, Person, Bill
|
||||||
from forms import AuthenticationForm, CreateArchiveForm, EditProjectForm, \
|
from forms import AuthenticationForm, EditProjectForm, InviteForm, \
|
||||||
InviteForm, MemberForm, PasswordReminder, ProjectForm, get_billform_for, \
|
MemberForm, PasswordReminder, ProjectForm, get_billform_for, \
|
||||||
ExportForm
|
ExportForm
|
||||||
from utils import Redirect303, list_of_dicts2json, list_of_dicts2csv
|
from utils import Redirect303, list_of_dicts2json, list_of_dicts2csv
|
||||||
|
|
||||||
|
@ -445,17 +445,6 @@ def settle_bill():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/<project_id>/archives/create", methods=["GET", "POST"])
|
|
||||||
def create_archive():
|
|
||||||
form = CreateArchiveForm()
|
|
||||||
if request.method == "POST":
|
|
||||||
if form.validate():
|
|
||||||
pass
|
|
||||||
flash(_("The data from XX to XX has been archived"))
|
|
||||||
|
|
||||||
return render_template("create_archive.html", form=form)
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/dashboard")
|
@main.route("/dashboard")
|
||||||
def dashboard():
|
def dashboard():
|
||||||
return render_template("dashboard.html", projects=Project.query.all())
|
return render_template("dashboard.html", projects=Project.query.all())
|
||||||
|
|
Loading…
Reference in a new issue