406e6d0697
- 1 - Mod: `/-/admin/badges` now shows a delete button in each row that opens the badge delete modal directly from the table. - 2 - Mod: `/-/admin/orgs` now shows a delete button in each row that opens an organization delete modal directly from the table. - 3 - Mod: the new table actions reuse the original delete modal layouts already used in badge edit and organization settings, and deleting an organization from `/-/admin/orgs` now returns to the admin organizations list instead of `/`.
89 lines
3.9 KiB
Handlebars
89 lines
3.9 KiB
Handlebars
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin badge")}}
|
|
<div class="admin-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "admin.badges.badges_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
|
<div class="ui right">
|
|
<a class="ui primary tiny button" href="{{AppSubUrl}}/-/admin/badges/new">{{ctx.Locale.Tr "admin.badges.new_badge"}}</a>
|
|
</div>
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form ignore-dirty flex-text-block" id="user-list-search-form">
|
|
<div class="tw-flex-1">
|
|
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.badge_kind")}}
|
|
</div>
|
|
<!-- Right Menu -->
|
|
<div class="ui secondary menu tw-m-0">
|
|
<!-- Sort Menu Item -->
|
|
<div class="ui dropdown type jump item">
|
|
<span class="text">
|
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
<button class="{{if eq $.SortType "oldest"}}active {{end}}item" name="sort" value="oldest">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</button>
|
|
<button class="{{if eq $.SortType "newest"}}active {{end}}item" name="sort" value="newest">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</button>
|
|
<button class="{{if eq $.SortType "alphabetically"}}active {{end}}item" name="sort" value="alphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
|
|
<button class="{{if eq $.SortType "reversealphabetically"}}active {{end}}item" name="sort" value="reversealphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="ui attached table segment">
|
|
<table class="ui very basic striped table unstackable">
|
|
<thead>
|
|
<tr>
|
|
<th data-sortt-asc="oldest" data-sortt-desc="newest" data-sortt-default="true">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
|
|
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
|
|
{{ctx.Locale.Tr "admin.badges.slug"}}
|
|
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
|
|
</th>
|
|
<th>{{ctx.Locale.Tr "admin.badges.description"}}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Badges}}
|
|
<tr>
|
|
<td>{{.ID}}</td>
|
|
<td class="tw-whitespace-nowrap">
|
|
<a href="{{$.Link}}/slug/{{.Slug | PathEscape}}">{{.Slug}}</a>
|
|
</td>
|
|
<td class="gt-ellipsis tw-max-w-48">{{.Description}}</td>
|
|
<td>
|
|
{{/* start edit/add - by petru @ codex */}}
|
|
<div class="tw-flex tw-gap-2">
|
|
<a href="{{$.Link}}/slug/{{.Slug | PathEscape}}" data-tooltip-content="{{ctx.Locale.Tr "admin.badges.details"}}">{{svg "octicon-star"}}</a>
|
|
<a href="{{$.Link}}/slug/{{.Slug | PathEscape}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a>
|
|
<a class="tw-text-red show-modal" href data-modal="#admin-badge-delete-modal"
|
|
data-modal-form.action="{{$.Link}}/slug/{{.Slug | PathEscape}}/delete"
|
|
data-tooltip-content="{{ctx.Locale.Tr "admin.badges.delete_badge"}}"
|
|
>{{svg "octicon-trash"}}</a> <!-- edit/add - by petru @ codex -->
|
|
</div>
|
|
{{/* end edit/add - by petru @ codex */}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{{template "base/paginate" .}}
|
|
</div>
|
|
|
|
{{/* start edit/add - by petru @ codex */}}
|
|
<div class="ui g-modal-confirm modal" id="admin-badge-delete-modal">
|
|
<div class="header">
|
|
{{svg "octicon-trash"}}
|
|
{{ctx.Locale.Tr "admin.badges.delete_badge"}}
|
|
</div>
|
|
<form class="ui form" method="post">
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "admin.badges.delete_badge_desc"}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
</div> <!-- edit/add - by petru @ codex -->
|
|
{{/* end edit/add - by petru @ codex */}}
|
|
{{template "admin/layout_footer" .}}
|