summaryrefslogtreecommitdiff
path: root/app/budget/templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/budget/templates')
-rw-r--r--app/budget/templates/budget/base.html2
-rw-r--r--app/budget/templates/budget/luxpurchase_list.html46
-rw-r--r--app/budget/templates/budget/update_form.html20
3 files changed, 67 insertions, 1 deletions
diff --git a/app/budget/templates/budget/base.html b/app/budget/templates/budget/base.html
index e17813a..355c911 100644
--- a/app/budget/templates/budget/base.html
+++ b/app/budget/templates/budget/base.html
@@ -23,7 +23,7 @@
</head>
<body>
<nav>
- <span class="nav-item"><a href="{% url 'luxtrade:list' %}">Home</a></span>
+ <span class="nav-item"><a href="{% url 'luxbudget:list' %}">Home</a></span>
</nav>
{% block content %}
{% endblock %}
diff --git a/app/budget/templates/budget/luxpurchase_list.html b/app/budget/templates/budget/luxpurchase_list.html
new file mode 100644
index 0000000..765834a
--- /dev/null
+++ b/app/budget/templates/budget/luxpurchase_list.html
@@ -0,0 +1,46 @@
+{% extends 'budget/base.html' %}
+{% load typogrify_tags %}
+ {% block pagetitle %}Luxagraf - Record Purchase{% endblock %}
+ {% block content %}
+ <a href="record" class="btn" >Add New</a>
+ <h3>Recent Purchases</h3>
+ <table>
+ <thead>
+ <tr>
+ <th>Date</th>
+ <th>Store</th>
+ <th>Category</th>
+ <th>Amount</th>
+ </tr>
+ </thead>
+ {% for object in object_list %}
+ <tr>
+ <td><a href="{{object.get_absolute_url}}">{{object.date_recorded|date:"m/j"}}</a></td>
+ <td>{{object.source.name}}</td>
+ <td>{{object.get_category_display}}</td>
+ <td>${{object.amount}}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="right">{{month}} Total:</td>
+ <td>${{monthly_spending.amount__sum}}</td>
+ </tr>
+ </table>
+
+ <h3>Previous Monthly Spending</h3>
+ {{month_1}}: {{monthly_spending_1.amount__sum}}
+ {{month_2}}: {{monthly_spending_2.amount__sum}}
+ {{month_3}}: {{monthly_spending_3.amount__sum}}
+
+
+ <h3>Spending by Category (Last 3 Months)</h3>
+
+ {{cat.amount__sum}}
+ {% endblock %}
+
+
diff --git a/app/budget/templates/budget/update_form.html b/app/budget/templates/budget/update_form.html
new file mode 100644
index 0000000..b19efaa
--- /dev/null
+++ b/app/budget/templates/budget/update_form.html
@@ -0,0 +1,20 @@
+{% extends 'budget/base.html' %}
+{% load typogrify_tags %}
+{% block content %}
+ <form id="id_form" action="" method="post" class="big">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {{ field.errors }}
+ {% if field.name == 'status'%}
+ <label class="hide" for="id_status">Status:</label>{{ field }}
+ {% else %}
+ {{ field.label_tag }} {{ field }}
+ {% endif %}
+ {% if field.help_text %}
+ <p class="help">{{ field.help_text|safe }}</p>
+ {% endif %}
+ </fieldset>
+{% endfor %}
+ <input type="submit" name="post" class="btn" value="update purchase"/>
+ </form>
+ {% endblock %}