[Flask] Simple ERP for a farm.
Template paths.
Changed files
app/templates/base.html
@@ -34,7 +34,7 @@
34
34
<nav id="modules">
35
35
<ul>
36
36
{% for module in modules %}
37
Removed:
<li><a href="/modules/{{ module.name }}" class="button">{{ module.name }}</a></li>
37
Added:
<li><a href="{{ url_for(module.name + '.view') }}" class="button">{{ module.name }}</a></li>
38
38
{% endfor %}
39
39
40
40
</ul>
app/templates/modules/add-item.html
@@ -6,7 +6,7 @@
6
6
{% block title %}Add {{ table }} item{% endblock %}
7
7
{% block content %}
8
8
9
Removed:
<form action="{{ request.path }}" method="POST">
9
Added:
<form action="{{ '/fapg' + request.path }}" method="POST">
10
10
<fieldset>
11
11
<legend>Add a new item to our {{ table }} table.</legend>
12
12
{% for field in form %}
app/templates/modules/customers.html
@@ -35,7 +35,7 @@
35
35
</td>
36
36
<td>{{ customer.primary_key }}</td>
37
37
{% if customer.website %}
38
Removed:
<td><a href="{{ customer.website }}">{{ customer.name }}</a></td>
38
Added:
<td><a href="{{ 'http://' + customer.website }}">{{ customer.name }}</a></td>
39
39
{% else %}
40
40
<td>{{ customer.name }}</td>
41
41
{% endif %}
app/templates/modules/edit-item.html
@@ -6,7 +6,7 @@
6
6
{% block title %}Edit {{ table }} item{% endblock %}
7
7
{% block content %}
8
8
9
Removed:
<form action="{{ request.path }}" method="POST">
9
Added:
<form action="{{ '/fapg' + request.path }}" method="POST">
10
10
<fieldset>
11
11
<legend>Edit item #{{ pk }} in our {{ table }} table.</legend>
12
12
{% for field in form %}
app/templates/modules/invoice-preview.html
@@ -6,7 +6,7 @@
6
6
<head>
7
7
<meta charset="utf-8">
8
8
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to">
9
Removed:
<title>Invoice preview for {{ invoice.customer.name }}</title>
9
Added:
<title>invoice {{ invoice.date_billed }} for {{ invoice.customer.name }} {{ invoice.primary_key }}</title>
10
10
<meta name="author" content="Marius Peter">
11
11
<meta name="description" content="A new invoice for your project.">
12
12
<!-- <link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}"> -->
app/templates/modules/invoices.html
@@ -56,9 +56,9 @@
56
56
{% for invoice in invoices.items %}
57
57
<tr {% if invoice.archive == True %} style="color: dimgray" {% endif %}>
58
58
<td>
59
Removed:
<form method="post" action="{{ url_for('common.edit_item', module='invoices', pk=invoice.primary_key, table='Invoice') }}">
60
Removed:
<button>archive</button>
61
Removed:
</form>
59
Added:
<!-- <form method="post" action="{{ url_for('common.edit_item', module='invoices', pk=invoice.primary_key, table='Invoice') }}">
60
Added:
<button>archive</button>
61
Added:
</form> -->
62
62
<form method="get" action="{{ url_for('invoices.preview', pk=invoice.primary_key) }}">
63
63
<button>preview</button>
64
64
</form>