liquid_feedback_frontend

view app/main/draft/list.lua @ 725:344e5fdce8c9

Fixed public search, made draft history available again
author bsw
date Thu Jun 28 13:52:42 2012 +0200 (2012-06-28)
parents
children
line source
1 local initiative = Initiative:by_id(param.get("initiative_id", atom.number))
3 execute.view{
4 module = "initiative", view = "_show", params = {
5 initiative = initiative, show_as_head = true
6 }
7 }
9 ui.link{
10 text = _"Back to initiative",
11 module = "initiative", view = "show", id = initiative.id
12 }
14 slot.put("<br />")
15 slot.put("<br />")
17 ui.form{
18 method = "get",
19 module = "draft",
20 view = "diff",
21 content = function()
22 ui.list{
23 records = initiative.drafts,
24 columns = {
25 {
26 label = _"Created at",
27 content = function(record)
28 ui.field.text{ readonly = true, value = format.timestamp(record.created) }
29 end
30 },
31 {
32 label = _"Author",
33 content = function(record)
34 if record.author then
35 return record.author:ui_field_text()
36 end
37 end
38 },
39 {
40 content = function(record)
41 ui.link{
42 attr = { class = "action" },
43 text = _"Show",
44 module = "draft",
45 view = "show",
46 id = record.id
47 }
48 end
49 },
50 {
51 label = _"Compare",
52 content = function(record)
53 slot.put('<input type="radio" name="old_draft_id" value="' .. tostring(record.id) .. '">')
54 slot.put('<input type="radio" name="new_draft_id" value="' .. tostring(record.id) .. '">')
55 end
56 }
57 }
58 }
59 ui.submit{ text = _"Compare" }
60 end
61 }

Impressum / About Us