diff --git a/pkg/campsite/admin.go b/pkg/campsite/admin.go index 5e7da47..2b2db9b 100644 --- a/pkg/campsite/admin.go +++ b/pkg/campsite/admin.go @@ -129,7 +129,7 @@ type campsiteIndex struct { } func (page *campsiteIndex) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) { - template.MustRenderAdminFiles(w, r, user, company, page, "campsite/index.gohtml", "web/templates/campsite_map.svg") + template.MustRenderAdminFiles(w, r, user, company, page, "campsite/index.gohtml", "web/templates/campground_map.svg") } func addCampsite(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) { diff --git a/web/static/camper.css b/web/static/camper.css index f5825c6..cc47c7a 100644 --- a/web/static/camper.css +++ b/web/static/camper.css @@ -90,10 +90,10 @@ a.missing-translation { bottom: -1em; } -#campsite-map .guest-only { +#campground-map .guest-only { display: none; } -#campsite-map a:hover { +#campground-map a:hover { fill: #ffeeaa; } diff --git a/web/static/camper.js b/web/static/camper.js index fcced13..90f1c35 100644 --- a/web/static/camper.js +++ b/web/static/camper.js @@ -135,19 +135,19 @@ export function camperUploadForm(el) { }); } -export function setupCampsiteMap(map) { +export function setupCampgroundMap(map) { if (!map) { return; } - for (const lodge of Array.from(map.querySelectorAll('.lodge'))) { - const label = lodge.getAttribute('camper:lodge'); + for (const campsite of Array.from(map.querySelectorAll('.lodge'))) { + const label = campsite.getAttribute('camper:lodge'); if (!label) { continue; } const link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); link.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '/admin/campsites/' + label); - link.append(...lodge.childNodes); - lodge.appendChild(link); + link.append(...campsite.childNodes); + campsite.appendChild(link); } } diff --git a/web/templates/admin/campsite/index.gohtml b/web/templates/admin/campsite/index.gohtml index cad9f6d..5fd7161 100644 --- a/web/templates/admin/campsite/index.gohtml +++ b/web/templates/admin/campsite/index.gohtml @@ -11,7 +11,7 @@ {{ template "settings-tabs" "campsites" }} {{( pgettext "Add Campsite" "action" )}}

{{( pgettext "Campsites" "title" )}}

- {{ template "campsite_map.svg" }} + {{ template "campground_map.svg" }} {{ if .Campsites -}} @@ -36,7 +36,7 @@ {{- end }} {{- end }} diff --git a/web/templates/campsite_map.svg b/web/templates/campground_map.svg similarity index 99% rename from web/templates/campsite_map.svg rename to web/templates/campground_map.svg index c8f3599..1785a78 100644 --- a/web/templates/campsite_map.svg +++ b/web/templates/campground_map.svg @@ -1,6 +1,6 @@ - - - + + +