liquid_feedback_frontend
annotate env/ui/titleMember.lua @ 1734:aebc3b064f85
Automatically add verified member to selected unit
author | bsw |
---|---|
date | Thu Sep 30 22:39:46 2021 +0200 (2021-09-30) |
parents | 9ba82d3a9445 |
children |
rev | line source |
---|---|
bsw@1045 | 1 function ui.titleMember(title, title2) |
bsw@1045 | 2 local member = app.session.member |
bsw@1045 | 3 if type(title) == "table" then |
bsw@1045 | 4 member = title |
bsw@1045 | 5 title = title2 |
bsw@1045 | 6 end |
bsw@1045 | 7 ui.title(function() |
bsw@1045 | 8 if member then |
bsw@1045 | 9 ui.link { module = "member", view = "show", id = member.id, content = member.name } |
bsw@1045 | 10 end |
bsw@1045 | 11 if title then |
bsw@1122 | 12 ui.tag { attr = { class = "spacer" }, content = function() |
bsw@1122 | 13 slot.put ( " ยป " ) |
bsw@1122 | 14 end } |
bsw@1045 | 15 ui.tag { attr = { class = "member" }, content = function() |
bsw@1045 | 16 ui.tag{ tag = "span", content = title } |
bsw@1045 | 17 end } |
bsw@1045 | 18 end |
bsw@1045 | 19 end) |
bsw@1045 | 20 end |