aboutsummaryrefslogtreecommitdiff
path: root/plugins/carddav/public
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-02-27 12:17:23 +0100
committerSimon Ser <contact@emersion.fr>2020-02-27 12:17:23 +0100
commit89149b38c8d10d4db457614450517e4ab6d57062 (patch)
tree0ef58d1e264a9c48b74a55a1bf034598c9cd941f /plugins/carddav/public
parent62853a933e7445d68a8ab0fc144e716afc3baa44 (diff)
downloadalps-89149b38c8d10d4db457614450517e4ab6d57062.tar.gz
alps-89149b38c8d10d4db457614450517e4ab6d57062.zip
plugins/carddav: use paths instead of UIDs in URLs
Diffstat (limited to 'plugins/carddav/public')
-rw-r--r--plugins/carddav/public/address-book.html2
-rw-r--r--plugins/carddav/public/address-object.html2
-rw-r--r--plugins/carddav/public/update-address-object.html4
3 files changed, 5 insertions, 3 deletions
diff --git a/plugins/carddav/public/address-book.html b/plugins/carddav/public/address-book.html
index 3c31017..d4e13b9 100644
--- a/plugins/carddav/public/address-book.html
+++ b/plugins/carddav/public/address-book.html
@@ -17,7 +17,7 @@
<ul>
{{range .AddressObjects}}
<li>
- <a href="/contacts/{{.Card.Value "UID" | pathescape}}">
+ <a href="{{.URL}}">
{{.Card.Value "FN"}}
</a>
{{$email := .Card.PreferredValue "EMAIL"}}
diff --git a/plugins/carddav/public/address-object.html b/plugins/carddav/public/address-object.html
index 1d564ee..e4ec135 100644
--- a/plugins/carddav/public/address-object.html
+++ b/plugins/carddav/public/address-object.html
@@ -11,7 +11,7 @@
<h2>Contact: {{$fn}}</h2>
<p>
- <a href="/contacts/{{.AddressObject.Card.Value "UID" | pathescape}}/edit">
+ <a href="{{.AddressObject.URL}}/edit">
Edit
</a>
</p>
diff --git a/plugins/carddav/public/update-address-object.html b/plugins/carddav/public/update-address-object.html
index b0ab20f..82adf8e 100644
--- a/plugins/carddav/public/update-address-object.html
+++ b/plugins/carddav/public/update-address-object.html
@@ -6,7 +6,9 @@
<a href="/contacts">Back</a>
</p>
-<h2>Edit contact</h2>
+<h2>
+ {{if .Card}}Edit{{else}}Create{{end}} contact
+</h2>
<form method="post">
<label for="fn">Name:</label>