2023-04-23 18:21:21 +08:00
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
|
|
|
|
|
<div class="admin-setting-content">
|
2020-03-02 15:25:36 -03:00
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 20:42:40 +08:00
|
|
|
{{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
2020-03-02 15:25:36 -03:00
|
|
|
</h4>
|
|
|
|
|
<div class="ui attached segment">
|
2024-03-24 17:42:49 +01:00
|
|
|
<div class="ui secondary filter menu tw-items-center tw-mx-0">
|
2024-03-22 14:45:10 +01:00
|
|
|
<form class="ui form ignore-dirty tw-flex-1">
|
2024-03-15 00:24:59 +01:00
|
|
|
{{template "shared/search/combo" dict "Value" .Keyword}}
|
2023-06-28 20:10:36 +08:00
|
|
|
</form>
|
|
|
|
|
<!-- Sort -->
|
2024-03-24 17:42:49 +01:00
|
|
|
<div class="ui dropdown type jump item tw-mr-0">
|
2020-03-02 15:25:36 -03:00
|
|
|
<span class="text">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
2020-03-02 15:25:36 -03:00
|
|
|
</span>
|
2023-09-21 23:54:26 +08:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2020-03-02 15:25:36 -03:00
|
|
|
<div class="menu">
|
2024-03-20 13:56:42 +08:00
|
|
|
<a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="?sort=email&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email"}}</a>
|
|
|
|
|
<a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="?sort=reverseemail&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email_reverse"}}</a>
|
|
|
|
|
<a class="{{if eq .SortType "username"}}active {{end}}item" href="?sort=username&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name"}}</a>
|
|
|
|
|
<a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="?sort=reverseusername&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name_reverse"}}</a>
|
2020-03-02 15:25:36 -03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui attached table segment">
|
2026-02-11 02:58:56 +01:00
|
|
|
<table class="ui very basic table unstackable">
|
2020-03-02 15:25:36 -03:00
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2020-06-25 00:23:05 +02:00
|
|
|
<th data-sortt-asc="username" data-sortt-desc="reverseusername">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{ctx.Locale.Tr "admin.users.name"}}
|
2020-06-25 00:23:05 +02:00
|
|
|
{{SortArrow "username" "reverseusername" $.SortType false}}
|
|
|
|
|
</th>
|
2023-09-25 10:56:50 +02:00
|
|
|
<th>{{ctx.Locale.Tr "admin.users.full_name"}}</th>
|
2020-06-25 00:23:05 +02:00
|
|
|
<th data-sortt-asc="email" data-sortt-desc="reverseemail" data-sortt-default="true">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{ctx.Locale.Tr "email"}}
|
2020-06-25 00:23:05 +02:00
|
|
|
{{SortArrow "email" "reverseemail" $.SortType true}}
|
|
|
|
|
</th>
|
2023-09-25 10:56:50 +02:00
|
|
|
<th>{{ctx.Locale.Tr "admin.emails.primary"}}</th>
|
|
|
|
|
<th>{{ctx.Locale.Tr "admin.emails.activated"}}</th>
|
2024-07-25 19:11:04 +09:00
|
|
|
<th></th>
|
2020-03-02 15:25:36 -03:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{{range .Emails}}
|
|
|
|
|
<tr>
|
2021-11-16 18:18:25 +00:00
|
|
|
<td><a href="{{AppSubUrl}}/{{.Name | PathEscape}}">{{.Name}}</a></td>
|
2024-03-05 06:29:32 +01:00
|
|
|
<td class="gt-ellipsis tw-max-w-48">{{.FullName}}</td>
|
|
|
|
|
<td class="gt-ellipsis tw-max-w-48">{{.Email}}</td>
|
2024-06-11 21:07:10 +08:00
|
|
|
<td>{{svg (Iif .IsPrimary "octicon-check" "octicon-x")}}</td>
|
2020-03-02 15:25:36 -03:00
|
|
|
<td>
|
|
|
|
|
{{if .CanChange}}
|
2024-11-26 23:36:55 +08:00
|
|
|
<a class="show-modal" href data-modal="#change-email-modal" data-modal-uid="{{.UID}}"
|
|
|
|
|
data-modal-email="{{.Email}}"
|
|
|
|
|
data-modal-primary="{{if .IsPrimary}}1{{else}}0{{end}}"
|
|
|
|
|
data-modal-activate="{{if .IsActivated}}0{{else}}1{{end}}">
|
2024-06-11 21:07:10 +08:00
|
|
|
{{svg (Iif .IsActivated "octicon-check" "octicon-x")}}
|
2020-03-02 15:25:36 -03:00
|
|
|
</a>
|
|
|
|
|
{{else}}
|
2024-06-11 21:07:10 +08:00
|
|
|
{{svg (Iif .IsActivated "octicon-check" "octicon-x")}}
|
2020-03-02 15:25:36 -03:00
|
|
|
{{end}}
|
|
|
|
|
</td>
|
2024-07-25 19:11:04 +09:00
|
|
|
<td>
|
2024-11-26 23:36:55 +08:00
|
|
|
<a class="link-action negative" href data-url="{{$.Link}}/delete?id={{.ID}}&uid={{.UID}}"
|
|
|
|
|
data-modal-confirm-header="{{ctx.Locale.Tr "admin.emails.delete"}}"
|
|
|
|
|
data-modal-confirm-content="{{ctx.Locale.Tr "admin.emails.delete_desc"}}"
|
|
|
|
|
>{{svg "octicon-trash"}}</a>
|
2024-07-25 19:11:04 +09:00
|
|
|
</td>
|
2020-03-02 15:25:36 -03:00
|
|
|
</tr>
|
2025-02-09 00:13:41 +08:00
|
|
|
{{else}}
|
|
|
|
|
<tr><td class="tw-text-center" colspan="6">{{ctx.Locale.Tr "no_results_found"}}</td></tr>
|
2020-03-02 15:25:36 -03:00
|
|
|
{{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{template "base/paginate" .}}
|
|
|
|
|
|
2023-04-24 19:08:59 +08:00
|
|
|
<div class="ui g-modal-confirm modal" id="change-email-modal">
|
2023-04-23 17:24:19 +08:00
|
|
|
<div class="header">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{ctx.Locale.Tr "admin.emails.change_email_header"}}
|
2020-03-02 15:25:36 -03:00
|
|
|
</div>
|
2024-11-26 23:36:55 +08:00
|
|
|
<form class="content ui form" action="{{AppSubUrl}}/-/admin/emails/activate" method="post">
|
2023-09-25 10:56:50 +02:00
|
|
|
<p class="center">{{ctx.Locale.Tr "admin.emails.change_email_text"}}</p>
|
2020-03-02 15:25:36 -03:00
|
|
|
|
2024-11-26 23:36:55 +08:00
|
|
|
<input type="hidden" name="sort" value="{{.SortType}}">
|
|
|
|
|
<input type="hidden" name="q" value="{{.Keyword}}">
|
|
|
|
|
<input type="hidden" name="is_primary" value="{{.IsPrimary}}">
|
|
|
|
|
<input type="hidden" name="is_activated" value="{{.IsActivated}}">
|
2020-03-02 15:25:36 -03:00
|
|
|
|
2024-11-26 23:36:55 +08:00
|
|
|
<input type="hidden" name="uid">
|
|
|
|
|
<input type="hidden" name="email">
|
|
|
|
|
<input type="hidden" name="primary">
|
|
|
|
|
<input type="hidden" name="activate">
|
2020-03-02 15:25:36 -03:00
|
|
|
|
2024-11-26 23:36:55 +08:00
|
|
|
{{template "base/modal_actions_confirm" .}}
|
|
|
|
|
</form>
|
2020-03-02 15:25:36 -03:00
|
|
|
</div>
|
2024-07-25 19:11:04 +09:00
|
|
|
</div>
|
|
|
|
|
|
2023-04-23 18:21:21 +08:00
|
|
|
{{template "admin/layout_footer" .}}
|