aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html
diff options
context:
space:
mode:
Diffstat (limited to 'template/html')
-rw-r--r--template/html/about.html17
-rw-r--r--template/html/common/settings_menu.html24
-rw-r--r--template/html/create_user.html18
-rw-r--r--template/html/edit_user.html21
-rw-r--r--template/html/integrations.html17
-rw-r--r--template/html/sessions.html20
-rw-r--r--template/html/settings.html17
-rw-r--r--template/html/users.html18
8 files changed, 31 insertions, 121 deletions
diff --git a/template/html/about.html b/template/html/about.html
index 29bb2e9..d4ea6e2 100644
--- a/template/html/about.html
+++ b/template/html/about.html
@@ -3,22 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.about.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.preferences" }}</a>
- </li>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- {{ if .user.IsAdmin }}
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- {{ end }}
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<div class="panel">
diff --git a/template/html/common/settings_menu.html b/template/html/common/settings_menu.html
new file mode 100644
index 0000000..07a9f24
--- /dev/null
+++ b/template/html/common/settings_menu.html
@@ -0,0 +1,24 @@
+{{ define "settings_menu" }}
+<ul>
+ <li>
+ <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
+ </li>
+ <li>
+ <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
+ </li>
+ <li>
+ <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
+ </li>
+ {{ if .user.IsAdmin }}
+ <li>
+ <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
+ </li>
+ <li>
+ <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
+ </li>
+ {{ end }}
+ <li>
+ <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
+ </li>
+</ul>
+{{ end }} \ No newline at end of file
diff --git a/template/html/create_user.html b/template/html/create_user.html
index 7672d09..a038f23 100644
--- a/template/html/create_user.html
+++ b/template/html/create_user.html
@@ -3,23 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.new_user.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
- </li>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<form action="{{ route "saveUser" }}" method="post" autocomplete="off">
diff --git a/template/html/edit_user.html b/template/html/edit_user.html
index bc23682..a9b17f5 100644
--- a/template/html/edit_user.html
+++ b/template/html/edit_user.html
@@ -3,26 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.edit_user.title" .selected_user.Username }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
- </li>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- <li>
- <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
- </li>
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<form action="{{ route "updateUser" "userID" .selected_user.ID }}" method="post" autocomplete="off">
diff --git a/template/html/integrations.html b/template/html/integrations.html
index 01f8197..883d1f6 100644
--- a/template/html/integrations.html
+++ b/template/html/integrations.html
@@ -3,22 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.integrations.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- {{ if .user.IsAdmin }}
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- {{ end }}
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
diff --git a/template/html/sessions.html b/template/html/sessions.html
index c28d7ac..09772b6 100644
--- a/template/html/sessions.html
+++ b/template/html/sessions.html
@@ -3,25 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.sessions.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
- </li>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- {{ if .user.IsAdmin }}
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- <li>
- <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
- </li>
- {{ end }}
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<table>
diff --git a/template/html/settings.html b/template/html/settings.html
index dbaee71..b0e4873 100644
--- a/template/html/settings.html
+++ b/template/html/settings.html
@@ -3,22 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.settings.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- {{ if .user.IsAdmin }}
- <li>
- <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
- </li>
- {{ end }}
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
<form method="post" autocomplete="off" action="{{ route "updateSettings" }}">
diff --git a/template/html/users.html b/template/html/users.html
index 9552c1b..7b17b1d 100644
--- a/template/html/users.html
+++ b/template/html/users.html
@@ -3,23 +3,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ t "page.users.title" }}</h1>
- <ul>
- <li>
- <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
- </li>
- <li>
- <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
- </li>
- <li>
- <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
- </li>
- <li>
- <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
- </li>
- <li>
- <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
- </li>
- </ul>
+ {{ template "settings_menu" dict "user" .user }}
</section>
{{ if eq (len .users) 1 }}