summaryrefslogtreecommitdiff
path: root/web/templates
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-11-11 22:57:19 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-11-11 22:57:19 +0530
commit10eb82c7c00a0a1a75528644fbfbe108a769207f (patch)
treeac5d413830d8e1f15985450230fe20490966fcb6 /web/templates
parent2f4a92b0f1d02096427a2d1c97746bb52cdcc38a (diff)
serving created invoices as both HTML and JSON
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/partials/item_list.html4
-rw-r--r--web/templates/views/invoice.html (renamed from web/templates/invoice.html)2
2 files changed, 3 insertions, 3 deletions
diff --git a/web/templates/partials/item_list.html b/web/templates/partials/item_list.html
index f12a34a..6fdd1f9 100644
--- a/web/templates/partials/item_list.html
+++ b/web/templates/partials/item_list.html
@@ -1,6 +1,6 @@
-{{ define "partials/item_list.html.tmpl" }}
+{{ define "partials/item_list.html" }}
<div class="items">
- {{ range .Items }}
+ {{ range . }}
{{ template "partials/item.html" .}}
{{ end }}
</div>
diff --git a/web/templates/invoice.html b/web/templates/views/invoice.html
index 77825fe..c8a3c70 100644
--- a/web/templates/invoice.html
+++ b/web/templates/views/invoice.html
@@ -10,6 +10,6 @@
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
</head>
<body>
- {{ template "partials/item_list.html" .}}
+ {{ template "partials/item_list.html" .Invoice.Items }}
</body>
</html>