diff options
author | Frédéric Guillot <fred@miniflux.net> | 2019-11-17 17:26:47 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2019-11-17 17:40:24 -0800 |
commit | 789ad8257a84dfaa973ffa5e547cd419d933253d (patch) | |
tree | 1a97a4344a3f6ca36a7e811a86a0e4ec660fd551 /template/html | |
parent | 63a549f0e3d552075e927b2e43a4003fcf59cbf2 (diff) |
Make sure settings menu is consistent
Diffstat (limited to 'template/html')
-rw-r--r-- | template/html/about.html | 17 | ||||
-rw-r--r-- | template/html/common/settings_menu.html | 24 | ||||
-rw-r--r-- | template/html/create_user.html | 18 | ||||
-rw-r--r-- | template/html/edit_user.html | 21 | ||||
-rw-r--r-- | template/html/integrations.html | 17 | ||||
-rw-r--r-- | template/html/sessions.html | 20 | ||||
-rw-r--r-- | template/html/settings.html | 17 | ||||
-rw-r--r-- | template/html/users.html | 18 |
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 }} |