klnodekb/views/user.pug

54 lines
2.0 KiB
Plaintext

extends layout
block content
if (user.canAdd.user)
a.btn.btn-primary(href='/users/register') Új felhasználó
|    
a.btn.btn-success(href='/users') Vissza
body
.container-fluid
.row
h2 #{title}
.table-responsive
table.table.table-hover
col(width='5%')
col(width='auto')
col(width='30%')
col(width='30%')
col(width='5%')
col(width='5%')
thead
tr
th #
th Teljes név
th(style='text-align:left') Felhasználónév
th(style='text-align:left') e-mail
th Tíltva
if (user.canDelete.user)
th Műveletek
tbody
each useritem, i in users
tr
td #{i+1}
td
if (user.canModify.user || user.id===useritem.id)
a(href="/users/user_edit/"+useritem._id)= useritem.name
else
p #{useritem.name}
td(style='text-align:left') #{useritem.username}
td(style='text-align:left') #{useritem.email}
if (!useritem.isBanned)
td(style='text-align:left')
span.badge.danger
.glyphicon.glyphicon-remove
else
td(style='text-align:left')
span.badge
.glyphicon.glyphicon-ok
if (user.canDelete.user)
td(style='text-align:right')
a.btn.btn-danger.btn-sm.delete-user(href='#',data-userId=useritem._id)
.glyphicon.glyphicon-trash