Skip to content

Commit

Permalink
optimize UI
Browse files Browse the repository at this point in the history
  • Loading branch information
leedrum committed Dec 10, 2024
1 parent 36484fe commit 3c975f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions views/admin/list_users.templ
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/leedrum/ikarus_travel/views/components"
"github.com/leedrum/ikarus_travel/model"
"strconv"
"github.com/leedrum/ikarus_travel/views/icons"
)

templ ListUsers(users []model.User) {
Expand Down Expand Up @@ -50,11 +51,11 @@ templ ListUsers(users []model.User) {
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
<a href={ templ.SafeURL("/admin/users/" + strconv.Itoa(user.ID)) } class="text-indigo-600 hover:text-indigo-900">
{ locales.Translate(ctx, "edit") }
@icons.Edit()
</a>
<form hx-delete={ "/admin/users/" + strconv.Itoa(user.ID) } hx-confirm={ locales.Translate(ctx, "are_you_sure") } hx-target="closest tr" hx-swap="outerHTML swap:1s">
<button type="submit" class="text-red-600 hover:text-red-900">
{ locales.Translate(ctx, "delete") }
@icons.Delete()
</button>
</form>
</td>
Expand Down

0 comments on commit 3c975f9

Please sign in to comment.