bsw@9: local member = Member:by_id(param.get_id()) bsw@9: bsw@1045: ui.titleMember(member) bsw@1045: bsw@1045: ui.section( function() bsw@1045: bsw@1045: ui.sectionHead( function() bsw@1045: ui.heading{ level = 1, content = _"Account history" } bsw@1045: end) bsw@1045: bsw@1045: ui.sectionRow( function() bsw@1045: ui.form{ bsw@1045: attr = { class = "vertical" }, bsw@564: content = function() bsw@1045: ui.field.text{ label = _"Current name", value = member.name } bsw@1045: ui.field.text{ label = _"Current status", value = member.active and _'activated' or _'deactivated' } bsw@1045: end bsw@564: } bsw@77: bsw@77: bsw@1045: local entries = member:get_reference_selector("history_entries"):add_order_by("id DESC"):exec() bsw@1045: bsw@1045: if #entries > 0 then bsw@77: ui.tag{ bsw@1045: tag = "table", bsw@77: content = function() bsw@77: ui.tag{ bsw@1045: tag = "tr", bsw@1045: content = function() bsw@1045: ui.tag{ bsw@1045: tag = "th", bsw@1045: content = _("Name") bsw@1045: } bsw@1045: ui.tag{ bsw@1045: tag = "th", bsw@1045: content = _("Status") bsw@1045: } bsw@1045: ui.tag{ bsw@1045: tag = "th", bsw@1045: content = _("until") bsw@1045: } bsw@1045: end bsw@77: } bsw@1045: for i, entry in ipairs(entries) do bsw@1045: ui.tag{ bsw@1045: tag = "tr", bsw@1045: content = function() bsw@1045: ui.tag{ bsw@1045: tag = "td", bsw@1045: content = entry.name bsw@1045: } bsw@1045: ui.tag{ bsw@1045: tag = "td", bsw@1045: content = entry.active and _'activated' or _'deactivated', bsw@1045: } bsw@1045: ui.tag{ bsw@1045: tag = "td", bsw@1045: content = format.timestamp(entry["until"]) bsw@1045: } bsw@1045: end bsw@1045: } bsw@1045: end bsw@9: end bsw@77: } bsw@9: end bsw@1045: slot.put("
") bsw@1045: ui.container{ bsw@1045: content = _("This member account has been created at #{created}", { created = format.timestamp(member.activated)}) bsw@1045: } bsw@1045: end) bsw@1045: bsw@1045: end)