liquid_feedback_frontend
view app/main/draft/_list.lua @ 154:6b6c82f9ca9f
speedup member image loading when non set
we can add the location of the default file directy instead of going through another slow request
we can add the location of the default file directy instead of going through another slow request
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Fri Oct 08 15:25:10 2010 +0200 (2010-10-08) |
parents | de6b80867eb7 |
children |
line source
1 ui.form{
2 method = "get",
3 module = "draft",
4 view = "diff",
5 content = function()
6 ui.list{
7 records = param.get("drafts", "table"),
8 columns = {
9 {
10 label = _"Created at",
11 content = function(record)
12 ui.field.text{ readonly = true, value = format.timestamp(record.created) }
13 end
14 },
15 {
16 label = _"Author",
17 content = function(record)
18 if record.author then
19 return record.author:ui_field_text()
20 end
21 end
22 },
23 {
24 content = function(record)
25 ui.link{
26 attr = { class = "action" },
27 text = _"Show",
28 module = "draft",
29 view = "show",
30 id = record.id
31 }
32 end
33 },
34 {
35 label = _"Compare",
36 content = function(record)
37 slot.put('<input type="radio" name="old_draft_id" value="' .. tostring(record.id) .. '">')
38 slot.put('<input type="radio" name="new_draft_id" value="' .. tostring(record.id) .. '">')
39 end
40 }
41 }
42 }
43 ui.submit{ text = _"Compare" }
44 end
45 }