extends ../layout

block content
  h1 Bodyrep
  p User Admin

  p
    a(href="/users") List Users
  p
    a(href="/workouts") List workouts
  p
    a(href="/admin") Admin Index
  p
    a(href="/admin/users") Admin Users
  p
    a(href="/admin/exercises") Admin Exercises

  hr

  ul
      - users.forEach(function(user) {
        li
          a(href="/users/" + encodeURIComponent(user.username))= user.name
          form(action="/admin/users/" + encodeURIComponent(user._id), method="POST")
            input(name="_method", type="hidden", value="DELETE")
            input(type="submit", value="Delete")
      - });

    - if (page > 0) {
      a(href="?page=" + (page - 1)) Previous
      &nbsp;
    - }

    - if (! lastPage) {
      a(href="?page=" + (page + 1)) Next
    - }