aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch/templates')
-rw-r--r--app/dispatch/templates/dispatch/invoice/detail-table.html89
-rw-r--r--app/dispatch/templates/dispatch/invoice/detail.html38
-rw-r--r--app/dispatch/templates/dispatch/invoice/list.html41
-rw-r--r--app/dispatch/templates/dispatch/printable.html112
4 files changed, 280 insertions, 0 deletions
diff --git a/app/dispatch/templates/dispatch/invoice/detail-table.html b/app/dispatch/templates/dispatch/invoice/detail-table.html
new file mode 100644
index 0000000..acb6e01
--- /dev/null
+++ b/app/dispatch/templates/dispatch/invoice/detail-table.html
@@ -0,0 +1,89 @@
+ <div class="row">
+ <div class="col s6">
+ <h4>
+ Invoice #{{object.invoice_id}}
+ </h4>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s6">
+ <table>
+ <tr>
+ <th>
+ Invoice Date:
+ <br>
+ Due Date:
+ </th>
+ <td>
+ {{object.invoice_date}}
+ <br>
+ {{object.due_date}}
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="col s6 right-align">
+ {{object.owner.name}}
+ <br>
+ {{object.owner.address}}
+ <br>
+ {{object.owner.city}}, {{object.owner.state}} {{object.owner.zip_code}}
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s6">
+ {{object.bill_to.name}}
+ <br>
+ {{object.bill_to.address}}
+ <br>
+ {{object.bill_to.city}}, {{object.bill_to.state}} {{object.bill_to.zip_code}}
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col s12">
+ <table class="bordered striped invoice-table">
+ <thead>
+ <th>Date</th>
+ <th>Description</th>
+ <th>Total</th>
+ </thead>
+ <tbody>
+ {% for item in object.items %}
+ <tr>
+ <td>{{item.date|date:"m/d/Y"}}</td>
+ <td>{{item.description}}</td>
+ <td>{{item.total}}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><b>Total Price:</b></td>
+ <td></td>
+ <td>{{object.total}}</td>
+ </tr>
+ <tr>
+ <td><b>Amount Due:</b></td>
+ <td></td>
+ <td><b>{{object.total}}</b></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+<style>
+.invoice-table table {
+ border-collapse: collapse;
+}
+.invoice-table th, .invoice-table td, .invoice-table table {
+ border: 1px solid black;
+}
+.invoice-table tr {
+ height: 52px;
+}
+</style>
diff --git a/app/dispatch/templates/dispatch/invoice/detail.html b/app/dispatch/templates/dispatch/invoice/detail.html
new file mode 100644
index 0000000..d7b30f6
--- /dev/null
+++ b/app/dispatch/templates/dispatch/invoice/detail.html
@@ -0,0 +1,38 @@
+{% extends 'dispatch/base.html' %}
+
+{% block title %}Invoice for {{object.invoice_date}} by {{object.owner}}{% endblock %}
+
+{% block content %}
+<div class="row hide-print">
+ <div class="col s12">
+ <h1>Invoice for {{object.invoice_date}} by {{object.owner}}</h1>
+ </div>
+</div>
+
+<div style="padding-top:30px;" class="hide-print"></div>
+
+<div class="z-depth-3 padding-30">
+{% include "dispatch/invoice/detail-table.html" %}
+</div>
+
+<div class="row hide-print" style="padding-top: 20px;">
+
+ <div class="col s12">
+ <div class="right-align">
+ <a class="btn red" href="{% url 'invoice_delete' object.pk%}">Delete</a>
+ <a class="btn green" href="#" onClick="window.print()">Print</a>
+ </div>
+ </div>
+
+</div>
+
+<style>
+.padding-30 {
+ padding: 30px;
+}
+</style>
+
+<link rel="stylesheet" href="/static/print.css" media="print">
+<link rel="stylesheet" href="/static/materialize/css/materialize.min.css" media="print">
+
+{%endblock%}
diff --git a/app/dispatch/templates/dispatch/invoice/list.html b/app/dispatch/templates/dispatch/invoice/list.html
new file mode 100644
index 0000000..292edd7
--- /dev/null
+++ b/app/dispatch/templates/dispatch/invoice/list.html
@@ -0,0 +1,41 @@
+{% extends 'dispatch/base.html' %}
+
+{% block title %}Invoices{% endblock %}
+
+{% block content %}
+<div class="row">
+ <div class="col s12 m6">
+ <h1>Invoices</h1>
+ </div>
+</div>
+<table class="striped bordered">
+ <thead>
+ <tr>
+ <th>User</th>
+ <th>Owner</th>
+ <th>Bill To</th>
+ <th>Invoice ID</th>
+ <th>Invoice Date</th>
+ <th>Due Date</th>
+ <th>Amount</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{object_list}}
+ {% for invoice in object_list %}
+ <tr>
+ <td>{{invoice.user}}</td>
+ <td>{{invoice.owner}}</td>
+ <td>{{invoice.bill_to}}</td>
+ <td>{{invoice.invoice_id}}</td>
+ <td>{{invoice.invoice_date}}</td>
+ <td>{{invoice.due_date}}</td>
+ <td>{{invoice.total}}</td>
+ <td><a class="btn green" href="{% url 'invoice_detail' invoice.pk %}">View</a></td>
+ </tr>
+ {% endfor %}
+
+ </tbody>
+</table>
+{% endblock %}
diff --git a/app/dispatch/templates/dispatch/printable.html b/app/dispatch/templates/dispatch/printable.html
new file mode 100644
index 0000000..9f9a181
--- /dev/null
+++ b/app/dispatch/templates/dispatch/printable.html
@@ -0,0 +1,112 @@
+{% load static %}
+{% load custom_tags %}
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>{% block title %}{% endblock %}</title>
+ <!--Import Google Icon Font-->
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link type="text/css" rel="stylesheet" href="{% static 'style.css' %}" media="screen,projection"/>
+
+ <!--Let browser know website is optimized for mobile-->
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <style>
+ html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+ </style>
+ <style>
+ h1 {
+ font-size: 2rem;
+ margin: 0;
+ }
+ h2 {
+ font-size: 1.75rem;
+
+ }
+ main {
+ padding: 16px;
+ }
+ .helptext{
+ display: none;
+ }
+ </style>
+</head>
+<body>
+
+ <main>
+ <div class="container">
+ {% block content %}
+ {% endblock %}
+ </div>
+ </main>
+
+ <style>
+@media print{
+ body{ background-color:#FFFFFF; background-image:none; color:#000000 }
+}
+ </style>
+
+ <!--Import jQuery before materialize.js-->
+ <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
+ <script type="text/javascript" src="{% static 'materialize/js/materialize.min.js' %}"></script>
+ <script type="text/javascript" src="{% static 'base.js' %}"></script>
+
+ <script>
+ $(".button-collapse").sideNav();
+
+ $('select').material_select();
+ $(document).ready(function() {
+ $('input[type=checkbox]').each(function() {
+ $(this).addClass('filled-in');
+ if(this.nextSibling.nodeName != 'label') {
+ $(this).after('<label for="'+this.id+'">' + jQuery(this).prev().html().replace(':','') + '</label>') ;
+ jQuery(this).prev().remove();
+ }
+ })
+ })
+ $('nav li').find('a[href="' + window.location.pathname +'"]').parent().addClass('active');
+ </script>
+</body>
+</html>