bsw@9: local member = Member:by_id(param.get_id()) bsw@9: bsw@9: slot.put_into("title", _("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@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@9: content = _("Used until") bsw@9: } bsw@9: end bsw@9: } bsw@9: ui.tag{ bsw@9: tag = "tr", bsw@9: content = function() bsw@9: ui.tag{ bsw@9: tag = "td", bsw@9: content = member.name bsw@9: } bsw@9: ui.tag{ bsw@9: tag = "td", bsw@9: content = _"continuing" bsw@9: } bsw@9: end bsw@9: } bsw@9: for i, entry in ipairs(entries) do bsw@9: local display = false bsw@9: if (i == 1) then bsw@9: if entry.name ~= member.name then bsw@9: display = true bsw@9: end bsw@9: elseif entry.name ~= entries[i-1].name then bsw@9: display = true bsw@9: end bsw@9: if display then bsw@9: ui.tag{ bsw@9: tag = "tr", bsw@9: content = function() bsw@9: ui.tag{ bsw@9: tag = "td", bsw@9: content = entry.name bsw@9: } bsw@9: ui.tag{ bsw@9: tag = "td", bsw@9: content = format.timestamp(entry["until"]) bsw@9: } bsw@9: end bsw@9: } bsw@9: end 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: }