summaryrefslogtreecommitdiff
path: root/view/html
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-03-03 15:05:15 +0100
committerxengineering <me@xengineering.eu>2024-03-03 15:05:15 +0100
commit25fe18973f11d3db61a1ae9ca05f2bd63d3edea9 (patch)
treee641a20fe27f3ef869478a1dc01c322d1082ce33 /view/html
parent6b0db50680a52e4ca7e6d0ee8ed3dae6a1093d16 (diff)
downloadceres-25fe18973f11d3db61a1ae9ca05f2bd63d3edea9.tar
ceres-25fe18973f11d3db61a1ae9ca05f2bd63d3edea9.tar.zst
ceres-25fe18973f11d3db61a1ae9ca05f2bd63d3edea9.zip
view: Replace edit by view parameter
The old edit URL parameter allowed to select one different HTML template. A more generic approach is to provide a view parameter which allows to use multiple alternative HTML templates for the same data defined by the Go struct. This makes implementing additional pages like a confirm page for recipe deletion easier.
Diffstat (limited to 'view/html')
-rw-r--r--view/html/recipe.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/view/html/recipe.html b/view/html/recipe.html
index a6588e6..43bbb2e 100644
--- a/view/html/recipe.html
+++ b/view/html/recipe.html
@@ -13,7 +13,7 @@
<p>Portions: {{.Portions}}</p>
<p><a href="{{.Url}}">original recipe</a></p>
<p>{{.Notes}}</p>
- <a href="/recipe/{{.Id}}?edit=true"><button>edit</button></a>
+ <a href="/recipe/{{.Id}}?view=recipe-edit"><button>edit</button></a>
</main>
{{ template "footer" }}
</body>