h2 Badges

- route = fn p -> ~p"/admin/badges?#{p}" end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @badges, route: route, conn: @conn

.block
  .block__header
    a href=~p"/admin/badges/new"
      i.fa.fa-plus>
      ' New Badge

    = pagination

  .block__content
    table.table
      thead
        tr
          th Badge
          th Image
          th Options
      tbody
        = for badge <- @badges do
          tr
            td
              = badge.title

            td
              = badge_image(badge, width: 32, height: 32)

            td
              => link "Users", to: ~p"/admin/badges/#{badge}/users"
              ' &bull;
              = link "Edit", to: ~p"/admin/badges/#{badge}/edit"

  .block__header.block__header--light
    = pagination
