2023-04-23 15:51:21 +05:30
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
|
|
|
|
<div class="admin-setting-content">
|
2017-03-16 04:09:38 +05:30
|
|
|
<h4 class="ui top attached header">
|
2022-06-28 02:28:46 +05:30
|
|
|
{{.locale.Tr "admin.users.user_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
|
2017-03-16 04:09:38 +05:30
|
|
|
<div class="ui right">
|
2022-06-28 02:28:46 +05:30
|
|
|
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/users/new">{{.locale.Tr "admin.users.new_account"}}</a>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2017-03-16 04:09:38 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2021-10-12 23:41:35 +05:30
|
|
|
<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-21 21:24:26 +05:30
|
|
|
<span class="text">{{.locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
|
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2021-10-12 23:41:35 +05:30
|
|
|
<div class="menu">
|
2022-06-28 02:28:46 +05:30
|
|
|
<a class="item j-reset-status-filter">{{.locale.Tr "admin.users.list_status_filter.reset"}}</a>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2022-06-28 02:28:46 +05:30
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_admin"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_admin"}}</label>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2022-06-28 02:28:46 +05:30
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_active"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_active"}}</label>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2022-06-28 02:28:46 +05:30
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_restricted"}}</label>
|
|
|
|
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_restricted"}}</label>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2022-06-28 02:28:46 +05:30
|
|
|
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{.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"> {{.locale.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label>
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2022-06-28 02:28:46 +05:30
|
|
|
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{.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"> {{.locale.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label>
|
2021-10-12 23:41:35 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Sort Menu Item -->
|
|
|
|
<div class="ui dropdown type jump item">
|
|
|
|
<span class="text">
|
2023-09-21 21:24:26 +05:30
|
|
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
2021-10-12 23:41:35 +05:30
|
|
|
</span>
|
2023-09-21 21:24:26 +05:30
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2021-10-12 23:41:35 +05:30
|
|
|
<div class="menu">
|
2022-06-28 02:28:46 +05:30
|
|
|
<button class="item" name="sort" value="oldest">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</button>
|
|
|
|
<button class="item" name="sort" value="newest">{{.locale.Tr "repo.issues.filter_sort.latest"}}</button>
|
|
|
|
<button class="item" name="sort" value="alphabetically">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="reversealphabetically">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
|
|
|
|
<button class="item" name="sort" value="recentupdate">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</button>
|
|
|
|
<button class="item" name="sort" value="leastupdate">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</button>
|
2021-10-12 23:41:35 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Search Text -->
|
2023-06-22 15:57:35 +05:30
|
|
|
<div class="ui fluid action input">
|
2023-09-25 02:01:58 +05:30
|
|
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
2021-10-12 23:41:35 +05:30
|
|
|
</div>
|
|
|
|
</form>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2017-03-16 04:09:38 +05:30
|
|
|
<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 21:41:21 +05:30
|
|
|
<table class="ui very basic striped table unstackable">
|
2017-03-16 04:09:38 +05:30
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-06-25 03:53:05 +05:30
|
|
|
<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">
|
2022-06-28 02:28:46 +05:30
|
|
|
{{.locale.Tr "admin.users.name"}}
|
2020-06-25 03:53:05 +05:30
|
|
|
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
|
|
|
|
</th>
|
2022-06-28 02:28:46 +05:30
|
|
|
<th>{{.locale.Tr "email"}}</th>
|
|
|
|
<th>{{.locale.Tr "admin.users.activated"}}</th>
|
|
|
|
<th>{{.locale.Tr "admin.users.restricted"}}</th>
|
|
|
|
<th>{{.locale.Tr "admin.users.2fa"}}</th>
|
|
|
|
<th>{{.locale.Tr "admin.users.created"}}</th>
|
2022-12-12 05:30:17 +05:30
|
|
|
<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
|
2022-06-28 02:28:46 +05:30
|
|
|
{{.locale.Tr "admin.users.last_login"}}
|
2022-12-12 05:30:17 +05:30
|
|
|
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
|
2020-06-25 03:53:05 +05:30
|
|
|
</th>
|
2017-03-16 04:09:38 +05:30
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .Users}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.ID}}</td>
|
2023-08-31 14:51:18 +05:30
|
|
|
<td>
|
|
|
|
<a href="{{$.Link}}/{{.ID}}">{{.Name}}</a>
|
|
|
|
{{if .IsAdmin}}
|
2023-09-14 12:23:36 +05:30
|
|
|
<span class="ui mini label">{{$.locale.Tr "admin.users.admin"}}</span>
|
|
|
|
{{else if eq 2 .Type}}{{/* Reserved user */}}
|
|
|
|
<span class="ui mini label">{{$.locale.Tr "admin.users.reserved"}}</span>
|
|
|
|
{{else if eq 4 .Type}}{{/* Bot "user" */}}
|
|
|
|
<span class="ui mini label">{{$.locale.Tr "admin.users.bot"}}</span>
|
|
|
|
{{else if eq 5 .Type}}{{/* Remote user */}}
|
|
|
|
<span class="ui mini label">{{$.locale.Tr "admin.users.remote"}}</span>
|
2023-08-31 14:51:18 +05:30
|
|
|
{{end}}
|
|
|
|
</td>
|
2023-07-22 16:24:48 +05:30
|
|
|
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
|
2020-12-10 00:33:19 +05:30
|
|
|
<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-26 01:18:30 +05:30
|
|
|
<td>{{DateTime "short" .CreatedUnix}}</td>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{if .LastLoginUnix}}
|
2023-04-26 01:18:30 +05:30
|
|
|
<td>{{DateTime "short" .LastLoginUnix}}</td>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{else}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<td><span>{{$.locale.Tr "admin.users.never_login"}}</span></td>
|
2017-03-16 04:09:38 +05:30
|
|
|
{{end}}
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "base/paginate" .}}
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2023-04-23 15:51:21 +05:30
|
|
|
{{template "admin/layout_footer" .}}
|