liquid_feedback_frontend

annotate app/main/admin/member_list.lua @ 1477:e11d8f3a663a

Fixed inactive policy view
author bsw
date Thu Oct 18 17:48:21 2018 +0200 (2018-10-18)
parents a006f2e3b5b5
children
rev   line source
bsw@581 1 local search = param.get("search")
bsw@193 2
bsw@1474 3 ui.titleAdmin(_"Member")
bsw@1474 4
bsw@1452 5 ui.grid{ content = function()
bsw/jbe@0 6
bsw@1452 7 ui.cell_main{ content = function()
bsw@1452 8 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
bsw@1452 9 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
bsw@1452 10 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Member list" }
bsw@1452 11 end }
bsw@1452 12 ui.container{ attr = { class = "mdl-card__content" }, content = function()
bsw@1452 13 ui.form{
bsw@1452 14 module = "admin", view = "member_list",
bsw@1452 15 content = function()
bsw@1452 16
bsw@1453 17 ui.field.text{ container_attr = { style = "display: inline-block;" }, label = _"search", name = "search", value = search }
bsw@1452 18
bsw@1452 19 ui.submit{ value = _"search" }
bsw@1452 20
bsw@1452 21 end
bsw@1452 22 }
bsw@581 23
bsw@1452 24 local members_selector = Member:build_selector{
bsw@1452 25 admin_search = search,
bsw@1452 26 order = "identification"
bsw@1452 27 }
bsw@584 28
bsw@1452 29 ui.paginate{
bsw@1452 30 selector = members_selector,
bsw@1452 31 per_page = 30,
bsw@1452 32 content = function()
bsw@1452 33 ui.list{
bsw@1452 34 records = members_selector:exec(),
bsw@1452 35 columns = {
bsw@1452 36 {
bsw@1452 37 label = _"Id",
bsw@1452 38 content = function(record)
bsw@1452 39 ui.link{
bsw@1452 40 text = record.id,
bsw@1452 41 module = "admin",
bsw@1452 42 view = "member_edit",
bsw@1452 43 id = record.id
bsw@1452 44 }
bsw@1452 45 end
bsw@1452 46 },
bsw@1452 47 {
bsw@1452 48 label = _"Identification",
bsw@1452 49 content = function(record)
bsw@1452 50 ui.link{
bsw@1452 51 text = record.identification or "",
bsw@1452 52 module = "admin",
bsw@1452 53 view = "member_edit",
bsw@1452 54 id = record.id
bsw@1452 55 }
bsw@1452 56 end
bsw@1452 57 },
bsw@1452 58 {
bsw@1452 59 label = _"Screen name",
bsw@1452 60 content = function(record)
bsw@1452 61 ui.link{
bsw@1452 62 text = record.name or "",
bsw@1452 63 module = "admin",
bsw@1452 64 view = "member_edit",
bsw@1452 65 id = record.id
bsw@1452 66 }
bsw@1452 67 end
bsw@1452 68 },
bsw@1452 69 {
bsw@1452 70 content = function(record)
bsw@1452 71 if record.admin then
bsw@1452 72 ui.field.text{ value = "admin" }
bsw@1452 73 end
bsw@1452 74 end
bsw@1452 75 },
bsw@1452 76 {
bsw@1452 77 content = function(record)
bsw@1452 78 if not record.activated then
bsw@1452 79 ui.field.text{ value = "not activated" }
bsw@1452 80 elseif not record.active then
bsw@1452 81 ui.field.text{ value = "inactive" }
bsw@1452 82 end
bsw@1452 83 end
bsw@1452 84 },
bsw@1452 85 {
bsw@1452 86 content = function(record)
bsw@1452 87 if record.locked then
bsw@1452 88 ui.field.text{ value = "locked" }
bsw@1452 89 end
bsw@1452 90 end
bsw@1452 91 },
bsw@1452 92 }
bsw@1452 93 }
bsw@1452 94 end
bsw/jbe@0 95 }
bsw@1452 96 end }
bsw@1452 97 end }
bsw@1452 98 end }
bsw@1452 99 end }

Impressum / About Us