get app ready for heroku
This commit is contained in:
29
templates/boilerplate.html
Normal file
29
templates/boilerplate.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}Fincom Webapp{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
{% load staticfiles %}
|
||||
<link href="{% static "css/site.css" %}" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav">
|
||||
<a href="/logout">logout</a>
|
||||
<h3>Fincom Web App</h3>
|
||||
</div>
|
||||
<div class="container">
|
||||
{% block main %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block bottom %}
|
||||
{% endblock %}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-62761470-2', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
templates/fincom/index.html
Normal file
31
templates/fincom/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Login - Fincom</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% load staticfiles %}
|
||||
<link href="{% static "css/site.css" %}" rel="stylesheet">
|
||||
</head>
|
||||
<body class="login">
|
||||
<div>
|
||||
<h3>Delta Beta Chapter</h3>
|
||||
<h2>Fincom Webapp</h2>
|
||||
{% if error %}
|
||||
<p>{{ error }}</p>
|
||||
{% endif %}
|
||||
<a class="btn btn-info btn-lg"
|
||||
href="/login/google-oauth2/?next={{ next }}">
|
||||
Login with your AndrewID
|
||||
</a>
|
||||
</div>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-62761470-2', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
30
templates/items/details.html
Normal file
30
templates/items/details.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "../boilerplate.html" %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div>
|
||||
{% include "./item.html" %}
|
||||
|
||||
<div class="approve">
|
||||
{% if I.details %}
|
||||
<div class="details">
|
||||
<span>Details:</span><br>
|
||||
{{ I.details }}</div>
|
||||
{% endif %}
|
||||
<div class="status">Status: <span>{{ I.statusText }}</span></div>
|
||||
|
||||
<div class="actions">
|
||||
{% if approve %}
|
||||
<a href="/items/{{ I.pk }}/approve" class="btn">Approve</a>
|
||||
<a href="/items/{{ I.pk }}/reject" class="btn">Reject</a>
|
||||
{% endif %}
|
||||
<a href="/items/{{ I.pk }}/delete" class="btn">Delete</a>
|
||||
<a href="/items/{{ I.pk }}/edit" class="btn">Edit</a>
|
||||
<a href="/items" class="btn">Back</a>
|
||||
</div>
|
||||
|
||||
<a href="{{ I.image.url }}"><img src="{{ I.image.thumbnail.url }}"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
66
templates/items/edit.html
Normal file
66
templates/items/edit.html
Normal file
@@ -0,0 +1,66 @@
|
||||
{% extends "../boilerplate.html" %}
|
||||
|
||||
{% block title %}Edit Reimbursement{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div>
|
||||
<a href="/items" class="btn pull-right">Back</a>
|
||||
<h1>Edit Reimbursements</h1>
|
||||
<hr>
|
||||
|
||||
<form action="/items/{{ I.pk }}/edit" method="post">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<label for="desc">Item</label>
|
||||
<input id="desc" type="text" name="desc" placeholder="What you bought"
|
||||
value="{{ I.desc }}">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="event">Event</label>
|
||||
<input id="event" type="text" name="event" placeholder="When we need it"
|
||||
value="{{ I.event }}">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="committee">Committee or Budget</label>
|
||||
<select name="committee" id="committee">
|
||||
{% for C in committees %}
|
||||
{% if I.committee == C %}
|
||||
<option selected>{{ C.name }}</option>
|
||||
{% else %}
|
||||
<option>{{ C.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="cost">Cost</label>
|
||||
<input id="cost" type="text" name="cost" placeholder="15.00"
|
||||
value="{{ I.cost }}">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="date">Date Purchased</label>
|
||||
<input id="date" type="date" name="date" placeholder="mm/dd/yyyy"
|
||||
value="{{ I.date_purchased }}">
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<div>
|
||||
<label for="details">Details</label>
|
||||
<textarea id="details" name="details" rows="4" class="clear">{{ I.details }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<div>
|
||||
<input type="submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
38
templates/items/item.html
Normal file
38
templates/items/item.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="item">
|
||||
<div class="committee">
|
||||
{{ I.comName }}
|
||||
</div>
|
||||
{% if I.approved %}
|
||||
<div class="cost approved">
|
||||
{% elif I.processed %}
|
||||
<div class="cost processed">
|
||||
{% elif I.rejected %}
|
||||
<div class="cost rejected">
|
||||
{% else %}
|
||||
<div class="cost newItem">
|
||||
{% endif %}
|
||||
${{ I.cost|floatformat:"2" }}
|
||||
</div>
|
||||
<a href="/items/{{ I.pk }}">
|
||||
<div class="details-row">
|
||||
<b>{{ I.event }}:</b>
|
||||
{{ I.desc }}
|
||||
<em>by</em>
|
||||
{{ I.created_by.first_name }} {{ I.created_by.last_name }}
|
||||
<em>on</em> {{ I.date_purchased }}
|
||||
<em>(filed {{ I.date_filed }})</em>
|
||||
</div>
|
||||
</a>
|
||||
<div class="status">
|
||||
{% if I.approved or I.processed %}
|
||||
Approved By:
|
||||
{% for u in I.approved_by.all %}
|
||||
{{ u.first_name }} {{ u.last_name }}
|
||||
{% endfor %}
|
||||
{% elif I.rejected %}
|
||||
Reimbursement Declined
|
||||
{% else %}
|
||||
Needs Approval
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
45
templates/items/list.html
Normal file
45
templates/items/list.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "../boilerplate.html" %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
{% if error %}
|
||||
<div>
|
||||
<span class="error">{{ error }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if preapproved %}
|
||||
{% with items=preapproved pagination_key="C" name="Pre-Approved" %}
|
||||
{% include "./section.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if newitems %}
|
||||
{% with items=newitems pagination_key="N" name="New Items" %}
|
||||
{% include "./section.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if processed %}
|
||||
{% with items=processed pagination_key="P" name="Approved" %}
|
||||
{% include "./section.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if rejected %}
|
||||
{% with items=rejected pagination_key="R" name="Rejected" %}
|
||||
{% include "./section.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% with items=mine pagination_key="M" name="My Reimbursements" %}
|
||||
{% include "./section.html" %}
|
||||
{% endwith %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block bottom %}
|
||||
<a href="/items/new" title="Submit new item" class="btn-floating">
|
||||
<span>+</span>
|
||||
</a>
|
||||
{% endblock %}
|
||||
68
templates/items/new.html
Normal file
68
templates/items/new.html
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends "../boilerplate.html" %}
|
||||
|
||||
{% block title %}New Reimbursement{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div>
|
||||
<h1>Add New Reimbursements</h1>
|
||||
<hr>
|
||||
|
||||
<div class="rcol">
|
||||
Make sure all information is accurate, you submit an itemized receipt, and
|
||||
you select the correct committee.
|
||||
</div>
|
||||
|
||||
<form action="/items/new" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<label for="desc">Item</label>
|
||||
<input id="desc" type="text" name="desc" placeholder="What you bought">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="event">Event</label>
|
||||
<input id="event" type="text" name="event" placeholder="When we need it">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="committee">Committee or Budget</label>
|
||||
<select name="committee" id="committee">
|
||||
<option disabled selected>Select a committee</option>
|
||||
{% for C in committees %}
|
||||
<option>{{ C.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="cost">Cost</label>
|
||||
<input id="cost" type="text" name="cost" placeholder="15.00">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="date">Date Purchased</label>
|
||||
<input id="date" type="date" name="date" placeholder="mm/dd/yyyy">
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<div>
|
||||
<label for="details">Details</label>
|
||||
<textarea id="details" name="details" rows="4" class="clear"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="image">Receipt</label>
|
||||
<input type="file" name="image" id="image" accept="image/*">
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<div>
|
||||
<input type="submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
22
templates/items/section.html
Normal file
22
templates/items/section.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<section>{{ name }}</section>
|
||||
<div class="items">
|
||||
{% for I in items %}
|
||||
{% include "./item.html" %}
|
||||
{% empty %}
|
||||
<div class="empty">No Reimbursements</div>
|
||||
{% endfor %}
|
||||
{% if items.has_next %}
|
||||
<a class="page" href="?{{ pagination_key }}={{ items.next_page_number }}">
|
||||
Older →
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="page empty" href="#">Older →</a>
|
||||
{% endif %}
|
||||
{% if items.has_previous %}
|
||||
<a class="page" href="?{{ pagination_key }}={{ items.previous_page_number }}">
|
||||
← Newer
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="page empty" href="#">← Newer</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user