extends ../layouts/main
block content
  h1 Core Users

  if Array.isArray(users) && (users.length > 0)
    .uk-overflow-auto
      table.uk-table.uk-table-divider.uk-table-small.uk-table-justify
        thead
          th Username
          th Display Name
          th Created
          th Core
          th Core Domain
          th Core User ID
          th User ID
        tbody
          each userAccount in users
            tr
              td
                a(href=`/admin/core-user/${userAccount._id}`)= userAccount.username
              td
                if userAccount.displayName
                  a(href=`/admin/core-user/${userAccount._id}`)= userAccount.displayName
                else
                  .uk-text-muted N/A
              td= moment(userAccount.created).format('YYYY-MM-DD hh:mm a')
              td= userAccount.core.meta.name
              td= userAccount.core.meta.domainKey
              td= userAccount.coreUserId
              td= userAccount._id

  else
    div There are no Core users.