liquid_feedback_frontend

view app/main/registration_admin/role_verification_accredited.lua @ 1858:3d1f0464a3ea

Handle missing ldap.member.allowed function
author bsw
date Tue Sep 20 17:35:29 2022 +0200 (20 months ago)
parents 7e328a78da93
children
line source
1 local mode = param.get("mode")
3 ui.title(function()
4 ui.link { module = "registration_admin", view = "index", content = _"Role management" }
5 slot.put ( " ยป " )
6 ui.tag { tag = "span", content = "Accredited role accounts"}
7 end)
8 app.html_title.title = _"User management"
10 ui.container{ attr = { class = "mdl-grid" }, content = function()
11 ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function()
13 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
14 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
15 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = function()
16 ui.tag{ content = _"Accredited role accounts" }
17 end }
18 end }
20 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
22 local verifications_selector = RoleVerification:new_selector()
23 :join("member", nil, "member.id = role_verification.verified_member_id")
24 :add_where("member.deleted ISNULL")
25 :add_order_by("member.identification")
27 if mode == "activated" then
28 verifications_selector:add_where("member.activated NOTNULL")
29 elseif mode == "not_activated" then
30 verifications_selector:add_where("member.activated ISNULL")
31 end
33 local verifications = verifications_selector:exec()
35 if #verifications > 0 then
36 ui.list{
37 records = verifications,
38 columns = {
39 {
40 label = _"Identification",
41 content = function(record)
42 ui.container{ content = function()
43 local member = Member:by_id(record.verified_member_id)
44 if member then
45 ui.link{ module = "registration_admin", view = "role_verification", id = record.id, content = member.identification }
46 end
47 end }
48 end
49 },
50 {
51 label = _"Account",
52 content = function(record)
53 local member = Member:by_id(record.verified_member_id)
54 if member and member.activated then
55 ui.link{ module = "member", view = "show", id = record.verified_member_id, content = "ID " .. record.verified_member_id }
56 else
57 ui.tag{ content = "ID " }
58 ui.tag{ content = record.verified_member_id }
59 ui.tag{ content = ", " }
60 ui.tag{ content = _"not activated (yet)" }
62 end
63 end
64 },
65 {
66 label = _"Verified at",
67 content = function(record)
68 ui.tag{ content = format.timestamp(record.verified) }
69 end
70 },
71 {
72 label = _"Verified by",
73 content = function(record)
74 local member = Member:by_id(record.verifying_member_id)
75 ui.link{ module = "member", view = "show", id = member.id, content = member.identification or (member.id .. " " .. member.name) }
76 end
77 },
78 }
79 }
80 end
81 end }
82 end }
84 end }
85 end }

Impressum / About Us