2023-04-23 13:21:21 +03:00
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
|
|
|
|
<div class="admin-setting-content">
|
2017-03-16 01:39:38 +03:00
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 11:56:50 +03:00
|
|
|
{{ctx.Locale.Tr "admin.users.user_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
|
2017-03-16 01:39:38 +03:00
|
|
|
<div class="ui right">
|
2023-09-25 11:56:50 +03:00
|
|
|
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/users/new">{{ctx.Locale.Tr "admin.users.new_account"}}</a>
|
2015-12-08 01:30:52 +03:00
|
|
|
</div>
|
2017-03-16 01:39:38 +03:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2021-10-12 21:11:35 +03: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">
|
2023-09-25 11:56:50 +03:00
|
|
|
<span class="text">{{ctx.Locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
|
2023-09-21 18:54:26 +03:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2021-10-12 21:11:35 +03:00
|
|
|
<div class="menu">
|
2023-09-25 11:56:50 +03:00
|
|
|
<a class="item j-reset-status-filter">{{ctx.Locale.Tr "admin.users.list_status_filter.reset"}}</a>
|
2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2023-09-25 11:56:50 +03:00
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_admin"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_admin"}}</label>
|
2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2023-09-25 11:56:50 +03:00
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_active"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_active"}}</label>
|
2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2023-09-25 11:56:50 +03:00
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_restricted"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_restricted"}}</label>
|
2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2023-09-25 11:56:50 +03:00
|
|
|
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_prohibit_login"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label>
|
2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2023-09-25 11:56:50 +03:00
|
|
|
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_2fa_enabled"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label>
|
2021-10-12 21:11:35 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Sort Menu Item -->
|
|
|
|
<div class="ui dropdown type jump item">
|
|
|
|
<span class="text">
|
2023-09-25 11:56:50 +03:00
|
|
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
2021-10-12 21:11:35 +03:00
|
|
|
</span>
|
2023-09-21 18:54:26 +03:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2021-10-12 21:11:35 +03:00
|
|
|
<div class="menu">
|
2023-09-25 11:56:50 +03:00
|
|
|
<button class="item" name="sort" value="oldest">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</button>
|
|
|
|
<button class="item" name="sort" value="newest">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</button>
|
|
|
|
<button class="item" name="sort" value="alphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="reversealphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="recentupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</button>
|
|
|
|
<button class="item" name="sort" value="leastupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</button>
|
2021-10-12 21:11:35 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Search Text -->
|
2023-06-22 13:27:35 +03:00
|
|
|
<div class="ui fluid action input">
|
2023-09-24 23:31:58 +03:00
|
|
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
2021-10-12 21:11:35 +03:00
|
|
|
</div>
|
|
|
|
</form>
|
2015-12-08 01:30:52 +03:00
|
|
|
</div>
|
2017-03-16 01:39:38 +03:00
|
|
|
<div class="ui attached table segment">
|
Improve UI on mobile (#19546)
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience.
- Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row.
- The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that.
- The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row.
- The notification table will now be show a scrollbar instead of overflow.
- The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high.
- The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile.
- Fixes to not overflow the tables but instead force them to be scrollable.
- When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 19:11:21 +03:00
|
|
|
<table class="ui very basic striped table unstackable">
|
2017-03-16 01:39:38 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-06-25 01:23:05 +03: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">
|
2023-09-25 11:56:50 +03:00
|
|
|
{{ctx.Locale.Tr "admin.users.name"}}
|
2020-06-25 01:23:05 +03:00
|
|
|
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
|
|
|
|
</th>
|
2023-09-25 11:56:50 +03:00
|
|
|
<th>{{ctx.Locale.Tr "email"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.users.activated"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.users.restricted"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.users.2fa"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.users.created"}}</th>
|
2022-12-12 03:00:17 +03:00
|
|
|
<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
|
2023-09-25 11:56:50 +03:00
|
|
|
{{ctx.Locale.Tr "admin.users.last_login"}}
|
2022-12-12 03:00:17 +03:00
|
|
|
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
|
2020-06-25 01:23:05 +03:00
|
|
|
</th>
|
2017-03-16 01:39:38 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .Users}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.ID}}</td>
|
2023-08-31 12:21:18 +03:00
|
|
|
<td>
|
|
|
|
<a href="{{$.Link}}/{{.ID}}">{{.Name}}</a>
|
|
|
|
{{if .IsAdmin}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
|
2023-09-14 09:53:36 +03:00
|
|
|
{{else if eq 2 .Type}}{{/* Reserved user */}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
|
2023-09-14 09:53:36 +03:00
|
|
|
{{else if eq 4 .Type}}{{/* Bot "user" */}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.bot"}}</span>
|
2023-09-14 09:53:36 +03:00
|
|
|
{{else if eq 5 .Type}}{{/* Remote user */}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.remote"}}</span>
|
2023-08-31 12:21:18 +03:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2023-07-22 13:54:48 +03:00
|
|
|
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
|
2020-12-09 22:03:19 +03:00
|
|
|
<td>{{if .IsActive}}{{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>
|
2023-04-25 22:48:30 +03:00
|
|
|
<td>{{DateTime "short" .CreatedUnix}}</td>
|
2017-03-16 01:39:38 +03:00
|
|
|
{{if .LastLoginUnix}}
|
2023-04-25 22:48:30 +03:00
|
|
|
<td>{{DateTime "short" .LastLoginUnix}}</td>
|
2017-03-16 01:39:38 +03:00
|
|
|
{{else}}
|
2023-09-25 11:56:50 +03:00
|
|
|
<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
|
2017-03-16 01:39:38 +03:00
|
|
|
{{end}}
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "base/paginate" .}}
|
2015-12-08 01:30:52 +03:00
|
|
|
</div>
|
2023-04-23 13:21:21 +03:00
|
|
|
{{template "admin/layout_footer" .}}
|