bsw@9: local member = Member:by_id(param.get_id()) bsw@9: bsw@46: slot.put_into("title", encode.html(_("Member name history for '#{name}'", { name = member.name }))) bsw@9: bsw@9: slot.select("actions", function() bsw@9: ui.link{ bsw@9: content = function() bsw@9: ui.image{ static = "icons/16/cancel.png" } bsw@9: slot.put(_"Back") bsw@9: end, bsw@9: module = "member", bsw@9: view = "show", bsw@9: id = member.id bsw@9: } bsw@9: end) bsw@9: bsw@77: ui.form{ bsw@77: attr = { class = "vertical" }, bsw@77: content = function() bsw@77: ui.field.text{ label = _"Current name", value = member.name } bsw@77: ui.field.text{ label = _"Current status", value = member.active and _'activated' or _'deactivated' } bsw@77: end bsw@77: } bsw@77: bsw@77: bsw@9: local entries = member:get_reference_selector("history_entries"):add_order_by("id DESC"):exec() bsw@9: bsw@9: ui.tag{ bsw@9: tag = "table", bsw@9: content = function() bsw@9: ui.tag{ bsw@9: tag = "tr", bsw@9: content = function() bsw@9: ui.tag{ bsw@9: tag = "th", bsw@9: content = _("Name") bsw@9: } bsw@9: ui.tag{ bsw@9: tag = "th", bsw@77: content = _("Status") bsw@9: } bsw@9: ui.tag{ bsw@77: tag = "th", bsw@77: content = _("until") bsw@9: } bsw@9: end bsw@9: } bsw@9: for i, entry in ipairs(entries) do bsw@77: ui.tag{ bsw@77: tag = "tr", bsw@77: content = function() bsw@77: ui.tag{ bsw@77: tag = "td", bsw@77: content = entry.name bsw@77: } bsw@77: ui.tag{ bsw@77: tag = "td", bsw@77: content = member.active and _'activated' or _'deactivated', bsw@77: } bsw@77: ui.tag{ bsw@77: tag = "td", bsw@77: content = format.timestamp(entry["until"]) bsw@77: } bsw@9: end bsw@77: } bsw@9: end bsw@9: end bsw@9: } bsw@9: slot.put("
") bsw@9: ui.container{ bsw@9: content = _("This member account has been created at #{created}", { created = format.timestamp(member.created)}) bsw@9: }