From 51c9fed15381421c4b7e8ba95af60b5204483d50 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 5 Jun 2022 14:20:40 +0200 Subject: First commit :baby: --- app/templates/modules/add-item.html | 19 +++++++++ app/templates/modules/invoices.html | 80 +++++++++++++++++++++++++++++++++++++ app/templates/modules/login.html | 16 ++++++++ app/templates/modules/register.html | 16 ++++++++ app/templates/modules/settings.html | 45 +++++++++++++++++++++ 5 files changed, 176 insertions(+) create mode 100644 app/templates/modules/add-item.html create mode 100644 app/templates/modules/invoices.html create mode 100644 app/templates/modules/login.html create mode 100644 app/templates/modules/register.html create mode 100644 app/templates/modules/settings.html (limited to 'app/templates/modules') diff --git a/app/templates/modules/add-item.html b/app/templates/modules/add-item.html new file mode 100644 index 0000000..4eaee3d --- /dev/null +++ b/app/templates/modules/add-item.html @@ -0,0 +1,19 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} + + +{% block title %}Add {{ table }} item{% endblock %} +{% block content %} + +
+
+ Add a new item to our {{ table }} table. + {% for field in form %} + {{ field.label() }}
+ {{ field() }}
+ {% endfor %} +
+
+ +{% endblock %} diff --git a/app/templates/modules/invoices.html b/app/templates/modules/invoices.html new file mode 100644 index 0000000..9e8f765 --- /dev/null +++ b/app/templates/modules/invoices.html @@ -0,0 +1,80 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} +{% block title %} +Invoices +{% endblock %} + +{% block actions %} +
  • Add invoice
  • +
  • +{% endblock %} + +{% block content %} +Track your invoices and create new ones here.
    + +{# Pagination Links #} +{# gotten from https://betterprogramming.pub/simple-flask-pagination-example-4190b12c2e2e #} +
    + {# Loop through the number of pages to display a link for each #} + {% for page_num in invoices.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %} + {% if page_num %} + {# Check for the active page and set the link to "Active" #} + {% if invoices.page == page_num %} + + {{ page_num }} + + {% else %} + + {{ page_num }} + + {% endif %} + {% else %} + ... + {% endif %} + {% endfor %} +
    + + + + + + + + + + + + + + + + + + {% for invoice in invoices.items %} + + + + + + + + + + + + + + {% endfor %} + +
    IDCreatedAlternative Invoice IDCustomer NameCustomer ReferenceDate BilledDate DueAmount (Net €)Amount (Gross €)Tax Amount (€)
    +
    + +
    +
    + +
    +
    {{ invoice.primary_key }}{{ invoice.date_time_created }}{{ invoice.invoice_id_alt }}{{ invoice.customer.name }}{{ invoice.customer_reference }}{{ invoice.date_billed }}{{ invoice.date_due }}{{ invoice.amount_net }}{{ invoice.amount_gross }}{{ invoice.amount_tax }}
    +{% endblock %} diff --git a/app/templates/modules/login.html b/app/templates/modules/login.html new file mode 100644 index 0000000..e66e6a4 --- /dev/null +++ b/app/templates/modules/login.html @@ -0,0 +1,16 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} + +{# the login form #} +{% block content %} +
    +
    + Login + {% for field in form %} + {{ field.label() }} + {{ field() }}
    + {% endfor %} +
    +
    +{% endblock %} diff --git a/app/templates/modules/register.html b/app/templates/modules/register.html new file mode 100644 index 0000000..76fc1e2 --- /dev/null +++ b/app/templates/modules/register.html @@ -0,0 +1,16 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} + +{# the register form #} +{% block content %} +
    +
    + Register + {% for field in form %} + {{ field.label() }} + {{ field() }}
    + {% endfor %} +
    +
    +{% endblock %} diff --git a/app/templates/modules/settings.html b/app/templates/modules/settings.html new file mode 100644 index 0000000..392ab47 --- /dev/null +++ b/app/templates/modules/settings.html @@ -0,0 +1,45 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} + +{% block title %} +Settings for user {{ current_user.username }} +{% endblock %} + +{% block content %} + +

    Welcome, {{ current_user.name_first }} {{ current_user.name_last }}!

    + +

    User profile

    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldValue
    Username{{ current_user.username }}
    First Name{{ current_user.name_first }}
    Last Name{{ current_user.name_last }}
    Last Updated{{ current_user.date_time_updated }}
    +{% endblock %} -- cgit v1.2.3