liquid_feedback_frontend
view app/main/draft/_list.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
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 }