move the notices-list link to the admin nav

This commit is contained in:
Andre Staltz 2021-02-25 18:17:51 +02:00
parent 70e82752cb
commit 2b7200512f
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
3 changed files with 22 additions and 18 deletions

View File

@ -23,7 +23,9 @@ AdminAllowListRemove = "Remove"
AdminAllowListRemoveConfirmWelcome = "Are you sure you want to remove this member? They will lose their alias, if they have one."
AdminAllowListRemoveConfirmTitle = "Confirm member removal"
NavAdminLanding = "Home"
NavAdminDashboard = "Dashboard"
NavAdminNotices = "Notices"
NoticeEditTitle = "Edit Notice"
NoticeList = "List of notices"

View File

@ -13,14 +13,6 @@
<div class="flex flex-row justify-end space-x-4 my-4">
{{$user := is_logged_in}}
{{if $user}}
<a
href="{{urlTo "complete:notice:list"}}"
class="{{if current_page_is "complete:notice:list"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-pink-700 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M20 5L20 19L4 19L4 5H20M20 3H4C2.89 3 2 3.89 2 5V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V5C22 3.89 21.11 3 20 3M18 15H6V17H18V15M10 7H6V13H10V7M12 9H18V7H12V9M18 11H12V13H18V11Z" />
</svg>{{i18n "NoticeList"}}
</a>
<div class="ml-4 flex-1 sm:hidden flex flex-row items-center">
<a href="{{urlTo "admin:menu"}}">
<svg class="w-6 h-6 text-gray-700" viewBox="0 0 24 24">
@ -41,14 +33,6 @@
>{{i18n "AuthSignOut"}}</a>
</span>
{{else}}
<a
href="{{urlTo "complete:notice:list"}}"
class="{{if current_page_is "complete:notice:list"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-pink-700 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M20 5L20 19L4 19L4 5H20M20 3H4C2.89 3 2 3.89 2 5V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V5C22 3.89 21.11 3 20 3M18 15H6V17H18V15M10 7H6V13H10V7M12 9H18V7H12V9M18 11H12V13H18V11Z" />
</svg>{{i18n "NoticeList"}}
</a>
<a
href="{{urlTo "auth:fallback:signin:form"}}"
class="pl-3 pr-4 py-2 sm:py-1 font-semibold text-sm text-gray-500 hover:text-green-600"

View File

@ -1,10 +1,19 @@
{{ define "menu" }}
<div class="flex flex-col my-4 w-40 px-2 sm:pl-0">
<a
href="{{urlTo "complete:index"}}"
class="{{if current_page_is "complete:index"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-pink-600 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" />
</svg>{{i18n "NavAdminLanding"}}
</a>
<a
href="{{urlTo "admin:dashboard"}}"
class="{{if current_page_is "admin:dashboard"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-blue-700 w-4 h-4 mr-1" viewBox="0 0 24 24">
<svg class="text-blue-600 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12C20,14.4 19,16.5 17.3,18C15.9,16.7 14,16 12,16C10,16 8.2,16.7 6.7,18C5,16.5 4,14.4 4,12A8,8 0 0,1 12,4M14,5.89C13.62,5.9 13.26,6.15 13.1,6.54L11.81,9.77L11.71,10C11,10.13 10.41,10.6 10.14,11.26C9.73,12.29 10.23,13.45 11.26,13.86C12.29,14.27 13.45,13.77 13.86,12.74C14.12,12.08 14,11.32 13.57,10.76L13.67,10.5L14.96,7.29L14.97,7.26C15.17,6.75 14.92,6.17 14.41,5.96C14.28,5.91 14.15,5.89 14,5.89M10,6A1,1 0 0,0 9,7A1,1 0 0,0 10,8A1,1 0 0,0 11,7A1,1 0 0,0 10,6M7,9A1,1 0 0,0 6,10A1,1 0 0,0 7,11A1,1 0 0,0 8,10A1,1 0 0,0 7,9M17,9A1,1 0 0,0 16,10A1,1 0 0,0 17,11A1,1 0 0,0 18,10A1,1 0 0,0 17,9Z" />
</svg>{{i18n "NavAdminDashboard"}}
</a>
@ -13,9 +22,18 @@
href="{{urlTo "admin:allow-list:overview"}}"
class="{{if current_page_is "admin:allow-list:overview"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-purple-700 w-4 h-4 mr-1" viewBox="0 0 24 24">
<svg class="text-purple-600 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M12,13C14.67,13 20,14.33 20,17V20H4V17C4,14.33 9.33,13 12,13M12,14.9C9.03,14.9 5.9,16.36 5.9,17V18.1H18.1V17C18.1,16.36 14.97,14.9 12,14.9Z" />
</svg>{{i18n "AdminAllowListTitle"}}
</a>
<a
href="{{urlTo "complete:notice:list"}}"
class="{{if current_page_is "complete:notice:list"}}bg-gray-300 {{else}}hover:bg-gray-200 {{end}}pr-1 pl-2 py-3 sm:py-1 rounded-md flex flex-row items-center font-semibold text-sm text-gray-700 hover:text-gray-800 truncate"
>
<svg class="text-yellow-600 w-4 h-4 mr-1" viewBox="0 0 24 24">
<path fill="currentColor" d="M20 5L20 19L4 19L4 5H20M20 3H4C2.89 3 2 3.89 2 5V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V5C22 3.89 21.11 3 20 3M18 15H6V17H18V15M10 7H6V13H10V7M12 9H18V7H12V9M18 11H12V13H18V11Z" />
</svg>{{i18n "NavAdminNotices"}}
</a>
</div>
{{end}}