liquid_feedback_frontend
view app/main/member/history.lua @ 50:ff1926efa6aa
Created french translation file
| author | jbe | 
|---|---|
| date | Wed Mar 31 17:50:32 2010 +0200 (2010-03-31) | 
| parents | aaba4d28dd53 | 
| children | 07177cd8c256 | 
 line source
     1 local member = Member:by_id(param.get_id())
     3 slot.put_into("title", encode.html(_("Member name history for '#{name}'", { name = member.name })))
     5 slot.select("actions", function()
     6   ui.link{
     7     content = function()
     8         ui.image{ static = "icons/16/cancel.png" }
     9         slot.put(_"Back")
    10     end,
    11     module = "member",
    12     view = "show",
    13     id = member.id
    14   }
    15 end)
    17 local entries = member:get_reference_selector("history_entries"):add_order_by("id DESC"):exec()
    19 ui.tag{
    20   tag = "table",
    21   content = function()
    22     ui.tag{
    23       tag = "tr",
    24       content = function()
    25         ui.tag{
    26           tag = "th",
    27           content = _("Name")
    28         }
    29         ui.tag{
    30           tag = "th",
    31           content = _("Used until")
    32         }
    33       end
    34     }
    35     ui.tag{
    36       tag = "tr",
    37       content = function()
    38         ui.tag{
    39           tag = "td",
    40           content = member.name
    41         }
    42         ui.tag{
    43           tag = "td",
    44           content = _"continuing"
    45         }
    46       end
    47     }
    48     for i, entry in ipairs(entries) do
    49       local display = false
    50       if (i == 1) then
    51         if entry.name ~= member.name then
    52           display = true
    53         end
    54       elseif entry.name ~= entries[i-1].name then
    55         display = true
    56       end
    57       if display then
    58         ui.tag{
    59           tag = "tr",
    60           content = function()
    61             ui.tag{
    62               tag = "td",
    63               content = entry.name
    64             }
    65             ui.tag{
    66               tag = "td",
    67               content = format.timestamp(entry["until"])
    68             }
    69           end
    70         }
    71       end
    72     end
    73   end
    74 }
    75 slot.put("<br />")
    76 ui.container{
    77   content = _("This member account has been created at #{created}", { created = format.timestamp(member.created)})
    78 }
