aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2024-03-02 22:55:02 +0100
committerGitHub <noreply@github.com>2024-03-02 22:55:02 +0100
commite3e6569c5fd8c69aa65384e6d1636cc14b23a32b (patch)
treed43b84efecd46f4b57c9ce6a5558f9c5b2280078 /templates
parent937e8b55149388840bbf6c4d7216495bc3dd2fe9 (diff)
downloadgitea-e3e6569c5fd8c69aa65384e6d1636cc14b23a32b.tar.gz
gitea-e3e6569c5fd8c69aa65384e6d1636cc14b23a32b.zip
Add option to set language in admin user view (#28449)
![image](https://github.com/go-gitea/gitea/assets/24977596/be7e3f92-af3f-4628-b4ed-abf6439687f3) `/admin/users/<UserID>/edit` ![image](https://github.com/go-gitea/gitea/assets/24977596/906af0dd-cceb-4ed9-9cd9-32c71ae1bf71) `/admin/users/<UserID>` --- *Sponsored by Kithara Software GmbH*
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/user/edit.tmpl15
-rw-r--r--templates/admin/user/view_details.tmpl8
2 files changed, 23 insertions, 0 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index fcb8ce0827..159c821099 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -70,6 +70,21 @@
<input id="password" name="password" type="password" autocomplete="new-password">
<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
</div>
+
+ <div class="field {{if .Err_Language}}error{{end}}">
+ <label for="language">{{ctx.Locale.Tr "settings.language"}}</label>
+ <div class="ui selection dropdown">
+ <input name="language" type="hidden" value="{{.User.Language}}">
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ <div class="text">{{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}}</div>
+ <div class="menu">
+ {{range .AllLangs}}
+ <div class="item{{if eq $.User.Language .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+
<div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{ctx.Locale.Tr "settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255">
diff --git a/templates/admin/user/view_details.tmpl b/templates/admin/user/view_details.tmpl
index 21425eecb4..be2f32b5ec 100644
--- a/templates/admin/user/view_details.tmpl
+++ b/templates/admin/user/view_details.tmpl
@@ -48,6 +48,14 @@
{{svg "octicon-x"}}
{{end}}
</div>
+ {{if .User.Language}}
+ <div class="flex-item-body">
+ <span class="flex-text-inline">
+ <b>{{ctx.Locale.Tr "settings.language"}}:</b>
+ {{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}}
+ </span>
+ </div>
+ {{end}}
{{if .User.Location}}
<div class="flex-item-body">
<span class="flex-text-inline">{{svg "octicon-location"}}{{.User.Location}}</span>