diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-09-25 21:15:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 13:15:51 +0000 |
commit | 597b04fe2f4f032af3c2a4db30bbdf1437a19f34 (patch) | |
tree | 3dc12fe53f4325962309b7a987d31235027669c3 /templates/admin/emails | |
parent | 2774a2afc641c4561a44c870138f8006462e2744 (diff) | |
download | gitea-597b04fe2f4f032af3c2a4db30bbdf1437a19f34.tar.gz gitea-597b04fe2f4f032af3c2a4db30bbdf1437a19f34.zip |
Backport ctx locale refactoring manually (#27231) (#27259) (#27260)
Backport #27231 #27259 manually
---------
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'templates/admin/emails')
-rw-r--r-- | templates/admin/emails/list.tmpl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 0acd112e2b..84afc0585f 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -1,27 +1,27 @@ {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} <div class="admin-setting-content"> <h4 class="ui top attached header"> - {{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) + {{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) </h4> <div class="ui attached segment"> <div class="ui secondary filter menu gt-ac gt-mx-0"> <form class="ui form ignore-dirty gt-f1"> <div class="ui fluid action input"> {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} - <button class="ui primary button">{{.locale.Tr "explore.search"}}</button> + <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> <!-- Sort --> <div class="ui dropdown type jump item gt-mr-0"> <span class="text"> - {{.locale.Tr "repo.issues.filter_sort"}} + {{ctx.Locale.Tr "repo.issues.filter_sort"}} </span> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> - <a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email"}}</a> - <a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email_reverse"}}</a> - <a class="{{if eq .SortType "username"}}active {{end}}item" href="{{$.Link}}?sort=username&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.name"}}</a> - <a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="{{$.Link}}?sort=reverseusername&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.name_reverse"}}</a> + <a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email"}}</a> + <a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email_reverse"}}</a> + <a class="{{if eq .SortType "username"}}active {{end}}item" href="{{$.Link}}?sort=username&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name"}}</a> + <a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="{{$.Link}}?sort=reverseusername&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name_reverse"}}</a> </div> </div> </div> @@ -31,16 +31,16 @@ <thead> <tr> <th data-sortt-asc="username" data-sortt-desc="reverseusername"> - {{.locale.Tr "admin.users.name"}} + {{ctx.Locale.Tr "admin.users.name"}} {{SortArrow "username" "reverseusername" $.SortType false}} </th> - <th>{{.locale.Tr "admin.users.full_name"}}</th> + <th>{{ctx.Locale.Tr "admin.users.full_name"}}</th> <th data-sortt-asc="email" data-sortt-desc="reverseemail" data-sortt-default="true"> - {{.locale.Tr "email"}} + {{ctx.Locale.Tr "email"}} {{SortArrow "email" "reverseemail" $.SortType true}} </th> - <th>{{.locale.Tr "admin.emails.primary"}}</th> - <th>{{.locale.Tr "admin.emails.activated"}}</th> + <th>{{ctx.Locale.Tr "admin.emails.primary"}}</th> + <th>{{ctx.Locale.Tr "admin.emails.activated"}}</th> </tr> </thead> <tbody> @@ -72,10 +72,10 @@ <div class="ui g-modal-confirm modal" id="change-email-modal"> <div class="header"> - {{.locale.Tr "admin.emails.change_email_header"}} + {{ctx.Locale.Tr "admin.emails.change_email_header"}} </div> <div class="content"> - <p class="center">{{.locale.Tr "admin.emails.change_email_text"}}</p> + <p class="center">{{ctx.Locale.Tr "admin.emails.change_email_text"}}</p> <form class="ui form" id="email-action-form" action="{{AppSubUrl}}/admin/emails/activate" method="post"> {{$.CsrfTokenHtml}} |