Move admin-only links inside the user’s menu
We discussed with Oriol how to show these “extra” menu items, as they can’t be in the horizontal menu we have intended for employees, because there is not enough horizontal space. Oriol suggested to move these into the user menu. In fact, the company settings was already there, which means that i already wanted to do that from the very beginning, i believe, but i must have forgotten it along the way…. Or maybe it was because this is where Numerus has the company settings menu item, too, and i did not see the relation with the rest; i do not know.
This commit is contained in:
parent
819c0412d2
commit
5697ad27fe
|
@ -13,7 +13,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteForm*/ -}}
|
||||
{{ template "settings-tabs" "campsites" }}
|
||||
<form
|
||||
{{ if .ID }}
|
||||
data-hx-put="/admin/campsites/{{ .CurrentLabel }}"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteIndex*/ -}}
|
||||
{{ template "settings-tabs" "campsites" }}
|
||||
<a href="/admin/campsites/new">{{( pgettext "Add Campsite" "action" )}}</a>
|
||||
<h2>{{( pgettext "Campsites" "title" )}}</h2>
|
||||
{{ template "campground_map.svg" }}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.typeForm*/ -}}
|
||||
{{ template "settings-tabs" "campsiteTypes" }}
|
||||
<form
|
||||
{{ if .Slug }}
|
||||
data-hx-put="/admin/campsites/types/{{ .Slug }}"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.typeIndex*/ -}}
|
||||
{{ template "settings-tabs" "campsiteTypes" }}
|
||||
<a href="/admin/campsites/types/new">{{( pgettext "Add Type" "action" )}}</a>
|
||||
<h2>{{( pgettext "Campsite Types" "title" )}}</h2>
|
||||
{{ if .Types -}}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.typeL10nForm*/ -}}
|
||||
{{ template "settings-tabs" "campsiteTypes" }}
|
||||
<form data-hx-put="/admin/campsites/types/{{ .Slug }}/{{ .Locale.Language }}">
|
||||
<h2>
|
||||
{{printf (pgettext "Translate Campsite Type to %s" "title") .Locale.Endonym }}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/carousel.slideForm*/ -}}
|
||||
{{ template "settings-tabs" .CarouselName }}
|
||||
<form
|
||||
{{ if .ID }}
|
||||
data-hx-put="/admin/{{ .CarouselName }}/slides/{{ .ID }}"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/home.slideL10nForm*/ -}}
|
||||
{{ template "settings-tabs" "campsiteTypes" }}
|
||||
<form data-hx-put="/admin/home/slides/{{ .ID }}/{{ .Locale.Language }}">
|
||||
<h2>
|
||||
{{printf (pgettext "Translate Carousel Slide to %s" "title") .Locale.Endonym }}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/home.homeIndex*/ -}}
|
||||
{{ template "settings-tabs" "home" }}
|
||||
<h2>{{( pgettext "Carousel" "title" )}}</h2>
|
||||
<a href="/admin/home/slides/new">{{( pgettext "Add slide" "action" )}}</a>
|
||||
{{ if .Slides -}}
|
||||
|
|
|
@ -4,4 +4,3 @@
|
|||
-->
|
||||
<title>{{ template "title" . }} — Camper</title>
|
||||
{{ template "content" . }}
|
||||
{{ define "settings-tabs" }}{{ end }}
|
||||
|
|
|
@ -32,6 +32,24 @@
|
|||
<li class="icon_company">
|
||||
<a href="/admin/company">{{( pgettext "Company Settings" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/campsites/types">{{( pgettext "Campsite Types" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/campsites">{{( pgettext "Campsites" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/seasons">{{( pgettext "Seasons" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/media">{{( pgettext "Media" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/home">{{( pgettext "Home Page" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/admin/services">{{( pgettext "Services Page" "title" )}}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
<li class="icon_logout">
|
||||
<button data-hx-delete="/me/session" data-hx-headers='{ {{ CSRFHeader }} }'
|
||||
|
@ -59,31 +77,3 @@
|
|||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{{ define "settings-tabs" -}}
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a {{ if ne . "taxDetails" }}href="/admin/company"{{ end }}>{{( pgettext "Tax Details" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "campsiteTypes" }}href="/admin/campsites/types"{{ end }}>{{( pgettext "Campsite Types" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "campsites"}}href="/admin/campsites"{{ end }}>{{( pgettext "Campsites" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "seasons"}}href="/admin/seasons"{{ end }}>{{( pgettext "Seasons" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "home"}}href="/admin/home"{{ end }}>{{( pgettext "Home Page" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "services"}}href="/admin/services"{{ end }}>{{( pgettext "Services Page" "title" )}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {{ if ne . "media"}}href="/admin/media"{{ end }}>{{( pgettext "Media" "title" )}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{{- end }}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/media.mediaForm*/ -}}
|
||||
{{ template "settings-tabs" "media" }}
|
||||
<form id="upload" enctype="multipart/form-data" data-hx-put="/admin/media/{{ .ID }}">
|
||||
<h2>{{( pgettext "Edit Media" "title" )}}</h2>
|
||||
<img src="{{ .Path }}" alt="">
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/media.mediaIndex*/ -}}
|
||||
{{ template "settings-tabs" "media" }}
|
||||
<h2>{{( pgettext "Media" "title" )}}</h2>
|
||||
<a href="/admin/media/upload">{{( pgettext "Upload media" "action" )}}</a>
|
||||
{{ if .Media -}}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/media.uploadForm*/ -}}
|
||||
{{ template "settings-tabs" "media" }}
|
||||
<form id="mediaUpload" enctype="multipart/form-data" action="/admin/media" method="post" data-hx-boost="true">
|
||||
<h2>{{( pgettext "Upload Media" "title" )}}</h2>
|
||||
{{ CSRFInput }}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/season.seasonForm*/ -}}
|
||||
{{ template "settings-tabs" "seasons" }}
|
||||
<form
|
||||
{{ if .Slug }}
|
||||
data-hx-put="/admin/seasons/{{ .Slug }}"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/season.seasonIndex*/ -}}
|
||||
{{ template "settings-tabs" "seasons" }}
|
||||
<a href="/admin/seasons/new">{{( pgettext "Add Season" "action" )}}</a>
|
||||
<h2>{{( pgettext "Seasons" "title" )}}</h2>
|
||||
{{ if .Seasons -}}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/services.servicesIndex*/ -}}
|
||||
{{ template "settings-tabs" "services" }}
|
||||
<h2>{{( pgettext "Carousel" "title" )}}</h2>
|
||||
<a href="/admin/services/slides/new">{{( pgettext "Add slide" "action" )}}</a>
|
||||
{{ if .Slides -}}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/company.taxDetailsForm*/ -}}
|
||||
{{ template "settings-tabs" "taxDetails" }}
|
||||
<form data-hx-put="/admin/company">
|
||||
<h2>{{( pgettext "Tax Details" "title" )}}</h2>
|
||||
{{ CSRFInput }}
|
||||
|
|
Loading…
Reference in New Issue