liquid_feedback_frontend
annotate app/main/initiative/show_static.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 | 0849be391140 |
| children | bf885faf3452 |
| rev | line source |
|---|---|
| bsw/jbe@19 | 1 local initiative = param.get("initiative", "table") |
| bsw/jbe@19 | 2 |
| bsw/jbe@19 | 3 if not initiative then |
| bsw/jbe@19 | 4 initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec() |
| bsw/jbe@19 | 5 end |
| bsw/jbe@19 | 6 |
| bsw/jbe@19 | 7 slot.select("actions", function() |
| bsw/jbe@19 | 8 ui.link{ |
| bsw/jbe@19 | 9 content = function() |
| bsw/jbe@19 | 10 ui.image{ static = "icons/16/script.png" } |
| bsw/jbe@19 | 11 slot.put(_"Show alternative initiatives") |
| bsw/jbe@19 | 12 end, |
| bsw/jbe@19 | 13 module = "issue", |
| bsw/jbe@19 | 14 view = "show", |
| bsw/jbe@19 | 15 id = initiative.issue.id |
| bsw/jbe@19 | 16 } |
| bsw/jbe@19 | 17 end) |
| bsw/jbe@19 | 18 |
| bsw/jbe@19 | 19 execute.view{ |
| bsw/jbe@19 | 20 module = "issue", |
| bsw/jbe@19 | 21 view = "_show_head", |
| bsw/jbe@19 | 22 params = { issue = initiative.issue } |
| bsw/jbe@19 | 23 } |
| bsw/jbe@19 | 24 |
| bsw/jbe@19 | 25 --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />') |
| bsw/jbe@19 | 26 |
| bsw@51 | 27 if app.session.member_id then |
| bsw@51 | 28 slot.select("actions", function() |
| bsw@51 | 29 if not initiative.issue.fully_frozen and not initiative.issue.closed then |
| bsw@51 | 30 ui.link{ |
| bsw@51 | 31 image = { static = "icons/16/script_add.png" }, |
| bsw@51 | 32 attr = { class = "action" }, |
| bsw@51 | 33 text = _"Create alternative initiative", |
| bsw@51 | 34 module = "initiative", |
| bsw@51 | 35 view = "new", |
| bsw@51 | 36 params = { issue_id = initiative.issue.id } |
| bsw@51 | 37 } |
| bsw@51 | 38 end |
| bsw@51 | 39 end) |
| bsw@51 | 40 end |
| bsw/jbe@19 | 41 |
| bsw@35 | 42 slot.put_into("sub_title", encode.html(_("Initiative: '#{name}'", { name = initiative.name }) )) |
| bsw/jbe@19 | 43 |
| bsw/jbe@19 | 44 execute.view{ |
| bsw/jbe@19 | 45 module = "initiative", |
| bsw/jbe@19 | 46 view = "show_partial", |
| bsw/jbe@19 | 47 params = { |
| bsw@23 | 48 initiative = initiative, |
| bsw@23 | 49 expanded = true |
| bsw/jbe@19 | 50 } |
| bsw@31 | 51 } |