liquid_feedback_frontend
annotate env/ui/titleMember.lua @ 1535:770ab0a7f79b
Added optional callback after creation of new draft
| author | bsw | 
|---|---|
| date | Tue Oct 06 19:31:19 2020 +0200 (2020-10-06) | 
| 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 |