annotate app/main/member/history.lua @ 706:7d39b6245e5b
Fixed filtering of areas in my units
author |
bsw |
date |
Tue Jun 26 22:28:37 2012 +0200 (2012-06-26) |
parents |
418b590fa9ed |
children |
701a5cf6b067 |
rev |
line source |
bsw@9
|
1 local member = Member:by_id(param.get_id())
|
bsw@9
|
2
|
bsw@564
|
3 slot.select("head", function()
|
bsw@564
|
4 ui.container{
|
bsw@564
|
5 attr = { class = "title" },
|
bsw@564
|
6 content = _("Member name history for '#{name}'", { name = member.name })
|
bsw@9
|
7 }
|
bsw@564
|
8 ui.container{ attr = { class = "actions" }, content = function()
|
bsw@564
|
9 ui.link{
|
bsw@564
|
10 content = function()
|
bsw@564
|
11 ui.image{ static = "icons/16/cancel.png" }
|
bsw@564
|
12 slot.put(_"Back")
|
bsw@564
|
13 end,
|
bsw@564
|
14 module = "member",
|
bsw@564
|
15 view = "show",
|
bsw@564
|
16 id = member.id
|
bsw@564
|
17 }
|
bsw@564
|
18 end }
|
bsw@9
|
19 end)
|
bsw@9
|
20
|
bsw@77
|
21 ui.form{
|
bsw@77
|
22 attr = { class = "vertical" },
|
bsw@77
|
23 content = function()
|
bsw@77
|
24 ui.field.text{ label = _"Current name", value = member.name }
|
bsw@77
|
25 ui.field.text{ label = _"Current status", value = member.active and _'activated' or _'deactivated' }
|
bsw@77
|
26 end
|
bsw@77
|
27 }
|
bsw@77
|
28
|
bsw@77
|
29
|
bsw@9
|
30 local entries = member:get_reference_selector("history_entries"):add_order_by("id DESC"):exec()
|
bsw@9
|
31
|
bsw@9
|
32 ui.tag{
|
bsw@9
|
33 tag = "table",
|
bsw@9
|
34 content = function()
|
bsw@9
|
35 ui.tag{
|
bsw@9
|
36 tag = "tr",
|
bsw@9
|
37 content = function()
|
bsw@9
|
38 ui.tag{
|
bsw@9
|
39 tag = "th",
|
bsw@9
|
40 content = _("Name")
|
bsw@9
|
41 }
|
bsw@9
|
42 ui.tag{
|
bsw@9
|
43 tag = "th",
|
bsw@77
|
44 content = _("Status")
|
bsw@9
|
45 }
|
bsw@9
|
46 ui.tag{
|
bsw@77
|
47 tag = "th",
|
bsw@77
|
48 content = _("until")
|
bsw@9
|
49 }
|
bsw@9
|
50 end
|
bsw@9
|
51 }
|
bsw@9
|
52 for i, entry in ipairs(entries) do
|
bsw@77
|
53 ui.tag{
|
bsw@77
|
54 tag = "tr",
|
bsw@77
|
55 content = function()
|
bsw@77
|
56 ui.tag{
|
bsw@77
|
57 tag = "td",
|
bsw@77
|
58 content = entry.name
|
bsw@77
|
59 }
|
bsw@77
|
60 ui.tag{
|
bsw@77
|
61 tag = "td",
|
bsw@95
|
62 content = entry.active and _'activated' or _'deactivated',
|
bsw@77
|
63 }
|
bsw@77
|
64 ui.tag{
|
bsw@77
|
65 tag = "td",
|
bsw@77
|
66 content = format.timestamp(entry["until"])
|
bsw@77
|
67 }
|
bsw@9
|
68 end
|
bsw@77
|
69 }
|
bsw@9
|
70 end
|
bsw@9
|
71 end
|
bsw@9
|
72 }
|
bsw@9
|
73 slot.put("<br />")
|
bsw@9
|
74 ui.container{
|
bsw@393
|
75 content = _("This member account has been created at #{created}", { created = format.timestamp(member.activated)})
|
bsw@9
|
76 }
|