.content-box.flex.full-width.with-form
  solid-router(default-route='admin-users-list', hidden)
    solid-route(name='admin-users-list')
    solid-route(name='admin-users-create')
    solid-route(name='admin-users-edit')

  div.content-box__header.flex.space-between
    h1.without-margin Administration
    button.mobile-sidebar-button.jsMobileSidebarOpenButton.icon-arrow-left-circle MENU
  
  solid-widget(name='hubl-solid-action-custom')
    template
      solid-ac-checker(data-src="${src}", permission='acl:Write')
        solid-link(
          class='button rounded reversed button-primary bordered icon-pencil'
          data-src="${src}"
          next="${value}"
        )


  #admin-users-list.content-box__height(hidden)
    div.content-box__info.flex
      div.admin-header.flex
        h3 Utilisateurs
        solid-ac-checker(data-src=`${endpoints.users || endpoints.post.users}`, permission='acl:Append')
          solid-link(
            class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
            next='admin-users-create'
          ) Ajouter un utilisateur

      .table-wrapper
        .table
          div.table-header.grey-color
            div.w280 Nom
            div.w70
        
          solid-display(
            class='table-body'
            data-src=`${endpoints.users || endpoints.get.users}`
            fields='cell-1(user-thumb(account.picture, sup(name), sub(username))), actions'
            loader-id='loader-admin-users'

            class-account.picture='avatar user-thumb__picture'
            class-name='user-thumb__name'
            class-username='user-thumb__username'
            class-profile.city='user-thumb__city'
            widget-account.picture='hubl-user-avatar'

            label-actions='Edit'
            action-actions='admin-users-edit'
            class-actions='w70 border cell-with-buttons'
            widget-actions='hubl-solid-action-custom'

            order-by='username'
          )

      div#loader-admin-users.loader.loader-top
        div
        div
        div
        div

  #admin-users-create.content-box__height(hidden)
    include page-admin-users-create.pug

  #admin-users-edit.content-box__height(hidden)
    include page-admin-users-edit.pug
