liquid_feedback_frontend
view app/main/draft/new.lua @ 95:6a12fb7e4963
Suggestion API, draft preview, word based diff, multiple fixes
- Added suggestion API
- Initiative API: Drafts optionally delivered as rendered html fragment
- Initiative API: Fixed wrong output of revoked timestamp when using JSON
- Preview added for initiative drafts
- Improved (word based) diff added
- Improved suggestion list
- Added missing sorting of initiative in vote list
- Filter state for member page initiative lists
- Fixed wrong status output in member history
- Fixed wrongly closed div in layout
- Added suggestion API
- Initiative API: Drafts optionally delivered as rendered html fragment
- Initiative API: Fixed wrong output of revoked timestamp when using JSON
- Preview added for initiative drafts
- Improved (word based) diff added
- Improved suggestion list
- Added missing sorting of initiative in vote list
- Filter state for member page initiative lists
- Fixed wrong status output in member history
- Fixed wrongly closed div in layout
author | bsw |
---|---|
date | Mon Aug 30 21:52:19 2010 +0200 (2010-08-30) |
parents | 80c215dbf076 |
children | fa55c8ded9fd |
line source
1 slot.put_into("title", _"Edit draft")
3 local initiative = Initiative:by_id(param.get("initiative_id"))
5 slot.select("actions", function()
6 ui.link{
7 content = function()
8 ui.image{ static = "icons/16/cancel.png" }
9 slot.put(_"Cancel")
10 end,
11 module = "initiative",
12 view = "show",
13 id = initiative.id
14 }
15 end)
19 ui.form{
20 record = initiative.current_draft,
21 attr = { class = "vertical" },
22 module = "draft",
23 action = "add",
24 params = { initiative_id = initiative.id },
25 routing = {
26 ok = {
27 mode = "redirect",
28 module = "initiative",
29 view = "show",
30 id = initiative.id
31 }
32 },
33 content = function()
35 ui.field.text{ label = _"Author", value = app.session.member.name, readonly = true }
37 if param.get("preview") then
38 ui.container{
39 attr = { class = "draft_content wiki" },
40 content = function()
41 slot.put(format.wiki_text(param.get("content"), param.get("formatting_engine")))
42 end
43 }
44 slot.put("<br />")
45 ui.submit{ text = _"Save" }
46 slot.put("<br />")
47 slot.put("<br />")
48 end
49 slot.put("<br />")
52 ui.field.select{
53 label = _"Wiki engine",
54 name = "formatting_engine",
55 foreign_records = {
56 { id = "rocketwiki", name = "RocketWiki" },
57 { id = "compat", name = _"Traditional wiki syntax" }
58 },
59 foreign_id = "id",
60 foreign_name = "name"
61 }
62 ui.field.text{
63 label = _"Content",
64 name = "content",
65 multiline = true,
66 attr = { style = "height: 50ex;" },
67 value = param.get("content")
68 }
70 ui.submit{ name = "preview", text = _"Preview" }
71 ui.submit{ text = _"Save" }
72 end
73 }