summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-02-15 15:43:04 +0000
committerMatthew Lemon <y@yulqen.org>2024-02-15 15:43:04 +0000
commitdd24746bcde550cffaf698a0c9c727e869e3cfb3 (patch)
tree5321ea481b1c214c38654bf36f152f763f4de1bd /ui
parentc8065a2fcd2386b96eaa1521513afe3f9ba59770 (diff)
Implemented template cache
This is not perfect. At the moment, the new render() function, introduced in this commit, expects a templateData{} struct which contains an Operations field. This will need to be made generic, or we have multiple render() functions to accommdate the different types of data struct we want to be able to pass to templates. Also, in this commit I had to get rid of the /pages/operations and /pages/organisation sub directories for now. This does not fit the newTemplateCache() function - also introduced here. This needs to be refactored if we want to have subdirectories of templates - or else we stick to putting them inside pages/ and we name them appropriately, as we have done here with operations_list and organisation_list templates.
Diffstat (limited to 'ui')
-rw-r--r--ui/html/pages/operations_list.tmpl.html (renamed from ui/html/pages/operations/list.tmpl.html)1
-rw-r--r--ui/html/pages/organisations_list.tmpl.html (renamed from ui/html/pages/organisations/list.tmpl.html)0
2 files changed, 1 insertions, 0 deletions
diff --git a/ui/html/pages/operations/list.tmpl.html b/ui/html/pages/operations_list.tmpl.html
index eac3325..2863d19 100644
--- a/ui/html/pages/operations/list.tmpl.html
+++ b/ui/html/pages/operations_list.tmpl.html
@@ -8,6 +8,7 @@
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
+
{{if .Operations}}
<table id="home-summary-table">
<thead>
diff --git a/ui/html/pages/organisations/list.tmpl.html b/ui/html/pages/organisations_list.tmpl.html
index 1b0e3a9..1b0e3a9 100644
--- a/ui/html/pages/organisations/list.tmpl.html
+++ b/ui/html/pages/organisations_list.tmpl.html