{{define "admin/users.html"}} {{template "admin_shell_open" .}}
{{template "admin_flash" .}} {{template "admin_pagehead" (dict "Icon" "bx-user" "Title" (T "admin.users.title") "Desc" (T "admin.users.desc"))}}
{{range .Data.Rows}} {{$uid := index . "id"}} {{$role := asInt (index . "role")}} {{$email := index . "email"}} {{$nick := index . "nickname"}} {{$uname := index . "username"}} {{else}}{{end}}
{{T "admin.users.col_id"}} {{T "admin.users.col_user"}} {{T "admin.users.col_group"}} {{T "admin.users.col_status"}} {{T "admin.users.col_time"}} {{T "admin.users.col_ip"}} {{T "admin.users.col_actions"}}
{{$uid}}
{{privacy "username" $uname}}{{if eq $role 1}} {{T "admin.users.role_admin"}}{{end}}
{{if $email}}
{{privacy "email" $email}}
{{else}}
—
{{end}} {{if and $nick (ne $nick $uname)}}
{{privacy "text" $nick}}
{{end}}
{{$gname := index . "group_name"}} {{if $gname}}{{$gname}}{{else}}—{{end}} {{if ne $role 1}}
{{T "admin.users.role_user"}}
{{end}}
{{if eq (asInt (index . "status")) 1}}{{T "admin.users.status_ok"}}{{else}}{{T "admin.users.status_disabled"}}{{end}}
{{T "admin.users.lbl_reg"}}:{{if index . "reg_time_str"}}{{index . "reg_time_str"}}{{else}}—{{end}}
{{T "admin.users.lbl_login"}}:{{if index . "last_time_str"}}{{index . "last_time_str"}}{{else}}—{{end}}
{{$lip := index . "last_ip"}} {{if $lip}}
{{privacy "ip" $lip}}
{{if index . "last_ip_geo"}}
{{index . "last_ip_geo"}}
{{end}} {{else}}—{{end}}
{{if ne $role 1}} {{else}} {{end}}
{{T "admin.users.empty"}}
{{$pg := .Data.Page}}{{$ps := .Data.PageSize}}{{if or (gt $pg 1) (eq (len .Data.Rows) $ps)}} {{end}}
{{template "admin_shell_close" .}} {{end}}