mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-15 18:08:23 -07:00
resolve issue with sort icons on admin/users and admin/runners (#24360)
Fixes #24327 to avoid the sort icon changing the table header over multiple lines and adds missing sort icons on the runners page.
This commit is contained in:
parent
e481638010
commit
e33f112e01
@ -189,6 +189,12 @@ func (opts FindRunnerOptions) toOrder() string {
|
|||||||
return "last_online ASC"
|
return "last_online ASC"
|
||||||
case "alphabetically":
|
case "alphabetically":
|
||||||
return "name ASC"
|
return "name ASC"
|
||||||
|
case "reversealphabetically":
|
||||||
|
return "name DESC"
|
||||||
|
case "newest":
|
||||||
|
return "id DESC"
|
||||||
|
case "oldest":
|
||||||
|
return "id ASC"
|
||||||
}
|
}
|
||||||
return "last_online DESC"
|
return "last_online DESC"
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@ func RunnersList(ctx *context.Context, opts actions_model.FindRunnerOptions) {
|
|||||||
ctx.Data["RegistrationToken"] = token.Token
|
ctx.Data["RegistrationToken"] = token.Token
|
||||||
ctx.Data["RunnerOwnerID"] = opts.OwnerID
|
ctx.Data["RunnerOwnerID"] = opts.OwnerID
|
||||||
ctx.Data["RunnerRepoID"] = opts.RepoID
|
ctx.Data["RunnerRepoID"] = opts.RepoID
|
||||||
|
ctx.Data["SortType"] = opts.Sort
|
||||||
|
|
||||||
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
||||||
|
|
||||||
|
@ -45,9 +45,18 @@
|
|||||||
<table class="ui very basic striped table unstackable">
|
<table class="ui very basic striped table unstackable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="online" data-sortt-desc="offline">{{.locale.Tr "actions.runners.status"}}</th>
|
<th data-sortt-asc="online" data-sortt-desc="offline">
|
||||||
<th data-sortt-asc="alphabetically">{{.locale.Tr "actions.runners.id"}}</th>
|
{{.locale.Tr "actions.runners.status"}}
|
||||||
<th>{{.locale.Tr "actions.runners.name"}}</th>
|
{{SortArrow "online" "offline" .SortType false}}
|
||||||
|
</th>
|
||||||
|
<th data-sortt-asc="newest" data-sortt-desc="oldest">
|
||||||
|
{{.locale.Tr "actions.runners.id"}}
|
||||||
|
{{SortArrow "oldest" "newest" .SortType false}}
|
||||||
|
</th>
|
||||||
|
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
|
||||||
|
{{.locale.Tr "actions.runners.name"}}
|
||||||
|
{{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
|
||||||
|
</th>
|
||||||
<th>{{.locale.Tr "actions.runners.version"}}</th>
|
<th>{{.locale.Tr "actions.runners.version"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
||||||
|
Loading…
Reference in New Issue
Block a user