2015-09-12 02:42:26 +02:00
|
|
|
{{template "base/head" .}}
|
2020-12-01 05:00:14 +01:00
|
|
|
<div class="page-content admin user">
|
2017-03-15 23:39:38 +01:00
|
|
|
{{template "admin/navbar" .}}
|
2015-12-07 23:30:52 +01:00
|
|
|
<div class="ui container">
|
2017-03-15 23:39:38 +01:00
|
|
|
{{template "base/alert" .}}
|
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
|
|
|
<div class="ui right">
|
2019-12-04 02:39:58 +01:00
|
|
|
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
2015-12-07 23:30:52 +01:00
|
|
|
</div>
|
2017-03-15 23:39:38 +01:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2021-10-12 20:11:35 +02:00
|
|
|
<form class="ui form ignore-dirty" id="user-list-search-form">
|
|
|
|
|
|
|
|
<!-- Right Menu -->
|
|
|
|
<div class="ui right floated secondary filter menu">
|
|
|
|
<!-- Status Filter Menu Item -->
|
|
|
|
<div class="ui dropdown type jump item">
|
|
|
|
<span class="text">{{.i18n.Tr "admin.users.list_status_filter.menu_text"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}</span>
|
|
|
|
<div class="menu">
|
|
|
|
<a class="item j-reset-status-filter">{{.i18n.Tr "admin.users.list_status_filter.reset"}}</a>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{.i18n.Tr "admin.users.list_status_filter.is_admin"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{.i18n.Tr "admin.users.list_status_filter.not_admin"}}</label>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{.i18n.Tr "admin.users.list_status_filter.is_active"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{.i18n.Tr "admin.users.list_status_filter.not_active"}}</label>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{.i18n.Tr "admin.users.list_status_filter.not_restricted"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{.i18n.Tr "admin.users.list_status_filter.is_restricted"}}</label>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{.i18n.Tr "admin.users.list_status_filter.not_prohibit_login"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="1"> {{.i18n.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{.i18n.Tr "admin.users.list_status_filter.is_2fa_enabled"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="0"> {{.i18n.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Sort Menu Item -->
|
|
|
|
<div class="ui dropdown type jump item">
|
|
|
|
<span class="text">
|
|
|
|
{{.i18n.Tr "repo.issues.filter_sort"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
</span>
|
|
|
|
<div class="menu">
|
|
|
|
<button class="item" name="sort" value="oldest">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</button>
|
|
|
|
<button class="item" name="sort" value="newest">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</button>
|
|
|
|
<button class="item" name="sort" value="alphabetically">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="reversealphabetically">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="recentupdate">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</button>
|
|
|
|
<button class="item" name="sort" value="leastupdate">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Search Text -->
|
|
|
|
<div class="ui fluid action input" style="max-width: 70%;">
|
|
|
|
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
|
|
|
|
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-12-07 23:30:52 +01:00
|
|
|
</div>
|
2017-03-15 23:39:38 +01:00
|
|
|
<div class="ui attached table segment">
|
|
|
|
<table class="ui very basic striped table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-06-25 00:23:05 +02:00
|
|
|
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
|
|
|
|
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
|
|
|
|
{{.i18n.Tr "admin.users.name"}}
|
|
|
|
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
|
|
|
|
</th>
|
2017-03-15 23:39:38 +01:00
|
|
|
<th>{{.i18n.Tr "email"}}</th>
|
|
|
|
<th>{{.i18n.Tr "admin.users.activated"}}</th>
|
|
|
|
<th>{{.i18n.Tr "admin.users.admin"}}</th>
|
2020-01-13 18:33:46 +01:00
|
|
|
<th>{{.i18n.Tr "admin.users.restricted"}}</th>
|
2020-08-20 03:53:49 +02:00
|
|
|
<th>{{.i18n.Tr "admin.users.2fa"}}</th>
|
2017-03-15 23:39:38 +01:00
|
|
|
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
|
|
|
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
2021-10-12 20:11:35 +02:00
|
|
|
<th data-sortt-asc="leastupdate" data-sortt-desc="recentupdate">
|
2020-06-25 00:23:05 +02:00
|
|
|
{{.i18n.Tr "admin.users.last_login"}}
|
2021-10-12 20:11:35 +02:00
|
|
|
{{SortArrow "leastupdate" "recentupdate" $.SortType false}}
|
2020-06-25 00:23:05 +02:00
|
|
|
</th>
|
2017-03-15 23:39:38 +01:00
|
|
|
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .Users}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.ID}}</td>
|
|
|
|
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
|
|
|
|
<td><span class="text truncate email">{{.Email}}</span></td>
|
2020-12-09 20:03:19 +01:00
|
|
|
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
|
|
|
<td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
|
|
|
<td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
|
|
|
<td>{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
2017-03-15 23:39:38 +01:00
|
|
|
<td>{{.NumRepos}}</td>
|
2017-12-11 05:37:04 +01:00
|
|
|
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
|
2017-03-15 23:39:38 +01:00
|
|
|
{{if .LastLoginUnix}}
|
2017-12-11 05:37:04 +01:00
|
|
|
<td><span title="{{.LastLoginUnix.FormatLong}}">{{.LastLoginUnix.FormatShort}}</span></td>
|
2017-03-15 23:39:38 +01:00
|
|
|
{{else}}
|
|
|
|
<td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
|
|
|
|
{{end}}
|
2020-12-09 20:03:19 +01:00
|
|
|
<td><a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
|
2017-03-15 23:39:38 +01:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "base/paginate" .}}
|
2015-12-07 23:30:52 +01:00
|
|
|
</div>
|
2014-08-29 09:32:52 +02:00
|
|
|
</div>
|
2015-12-07 23:30:52 +01:00
|
|
|
{{template "base/footer" .}}
|