liquid_feedback_frontend
annotate app/main/issue/show.lua @ 2:5c601807d397
Version alpha3
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
author | bsw |
---|---|
date | Mon Nov 23 12:00:00 2009 +0100 (2009-11-23) |
parents | 3bfb2fcf7ab9 |
children | 768faea1096d |
rev | line source |
---|---|
bsw/jbe@0 | 1 local issue = Issue:by_id(param.get_id()) |
bsw/jbe@0 | 2 |
bsw/jbe@0 | 3 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />') |
bsw/jbe@0 | 4 |
bsw/jbe@0 | 5 slot.select("path", function() |
bsw/jbe@0 | 6 ui.link{ |
bsw/jbe@0 | 7 content = _"Area '#{name}'":gsub("#{name}", issue.area.name), |
bsw/jbe@0 | 8 module = "area", |
bsw/jbe@0 | 9 view = "show", |
bsw/jbe@0 | 10 id = issue.area.id |
bsw/jbe@0 | 11 } |
bsw/jbe@0 | 12 end) |
bsw/jbe@0 | 13 |
bsw/jbe@0 | 14 slot.put_into("title", encode.html(_"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name))) |
bsw/jbe@0 | 15 |
bsw/jbe@0 | 16 slot.select("actions", function() |
bsw/jbe@0 | 17 if not issue.closed then |
bsw/jbe@0 | 18 ui.link{ |
bsw/jbe@0 | 19 content = function() |
bsw/jbe@0 | 20 ui.image{ static = "icons/16/table_go.png" } |
bsw/jbe@0 | 21 slot.put(_"Delegate") |
bsw/jbe@0 | 22 end, |
bsw/jbe@0 | 23 module = "delegation", |
bsw/jbe@0 | 24 view = "new", |
bsw/jbe@0 | 25 params = { issue_id = issue.id } |
bsw/jbe@0 | 26 } |
bsw/jbe@0 | 27 end |
bsw/jbe@0 | 28 |
bsw/jbe@0 | 29 ui.twitter("http://example.com/t" .. tostring(issue.id)) |
bsw/jbe@0 | 30 |
bsw/jbe@0 | 31 end) |
bsw/jbe@0 | 32 |
bsw/jbe@0 | 33 execute.view{ |
bsw/jbe@0 | 34 module = "interest", |
bsw/jbe@0 | 35 view = "_show_box", |
bsw/jbe@0 | 36 params = { issue = issue } |
bsw/jbe@0 | 37 } |
bsw/jbe@0 | 38 |
bsw/jbe@0 | 39 execute.view{ |
bsw/jbe@0 | 40 module = "delegation", |
bsw/jbe@0 | 41 view = "_show_box", |
bsw/jbe@0 | 42 params = { issue_id = issue.id } |
bsw/jbe@0 | 43 } |
bsw/jbe@0 | 44 |
bsw@2 | 45 execute.view{ |
bsw@2 | 46 module = "issue", |
bsw@2 | 47 view = "_show_box", |
bsw@2 | 48 params = { issue = issue } |
bsw@2 | 49 } |
bsw@2 | 50 |
bsw/jbe@0 | 51 ui.tabs{ |
bsw/jbe@0 | 52 { |
bsw/jbe@0 | 53 name = "initiatives", |
bsw/jbe@0 | 54 label = _"Initiatives", |
bsw@2 | 55 content = function() execute.view{ |
bsw/jbe@0 | 56 module = "initiative", |
bsw/jbe@0 | 57 view = "_list", |
bsw/jbe@0 | 58 params = { |
bsw/jbe@0 | 59 issue = issue, |
bsw/jbe@0 | 60 initiatives_selector = issue:get_reference_selector("initiatives") |
bsw/jbe@0 | 61 } |
bsw/jbe@0 | 62 } |
bsw/jbe@0 | 63 slot.put("<br />") |
bsw/jbe@0 | 64 if not issue.frozen and not issue.closed then |
bsw/jbe@0 | 65 ui.link{ |
bsw/jbe@0 | 66 attr = { class = "action" }, |
bsw/jbe@0 | 67 content = function() |
bsw/jbe@0 | 68 ui.image{ static = "icons/16/script_add.png" } |
bsw/jbe@0 | 69 slot.put(_"Add new initiative to issue") |
bsw/jbe@0 | 70 end, |
bsw/jbe@0 | 71 module = "initiative", |
bsw/jbe@0 | 72 view = "new", |
bsw/jbe@0 | 73 params = { issue_id = issue.id } |
bsw/jbe@0 | 74 } |
bsw/jbe@0 | 75 end |
bsw/jbe@0 | 76 end |
bsw/jbe@0 | 77 }, |
bsw/jbe@0 | 78 --[[ { |
bsw/jbe@0 | 79 name = "voting_requests", |
bsw/jbe@0 | 80 label = _"Voting requests", |
bsw/jbe@0 | 81 content = function() |
bsw/jbe@0 | 82 execute.view{ |
bsw/jbe@0 | 83 module = "issue_voting_request", |
bsw/jbe@0 | 84 view = "_list", |
bsw/jbe@0 | 85 params = { issue = issue } |
bsw/jbe@0 | 86 } |
bsw/jbe@0 | 87 end |
bsw/jbe@0 | 88 }, |
bsw/jbe@0 | 89 --]] |
bsw/jbe@0 | 90 { |
bsw@2 | 91 name = "delegations", |
bsw@2 | 92 label = _"Delegations", |
bsw@2 | 93 content = function() |
bsw@2 | 94 execute.view{ |
bsw@2 | 95 module = "delegation", |
bsw@2 | 96 view = "_list", |
bsw@2 | 97 params = { delegations_selector = issue:get_reference_selector("delegations") } |
bsw@2 | 98 } |
bsw@2 | 99 end |
bsw@2 | 100 }, |
bsw@2 | 101 { |
bsw/jbe@0 | 102 name = "details", |
bsw/jbe@0 | 103 label = _"Details", |
bsw/jbe@0 | 104 content = function() |
bsw@2 | 105 local policy = issue.policy |
bsw/jbe@0 | 106 ui.form{ |
bsw/jbe@0 | 107 record = issue, |
bsw/jbe@0 | 108 readonly = true, |
bsw/jbe@0 | 109 attr = { class = "vertical" }, |
bsw/jbe@0 | 110 content = function() |
bsw/jbe@0 | 111 ui.field.text{ label = _"State", name = "state" } |
bsw@2 | 112 ui.field.timestamp{ label = _"Created at", name = "created" } |
bsw@2 | 113 ui.field.text{ label = _"admission_time", value = policy.admission_time } |
bsw@2 | 114 ui.field.integer{ label = _"issue_quorum_num", value = policy.issue_quorum_num } |
bsw@2 | 115 ui.field.integer{ label = _"issue_quorum_den", value = policy.issue_quorum_den } |
bsw@2 | 116 ui.field.timestamp{ label = _"Accepted", name = "accepted" } |
bsw@2 | 117 ui.field.text{ label = _"discussion_time", value = policy.discussion_time } |
bsw@2 | 118 ui.field.vote_now{ label = _"Vote now", name = "vote_now" } |
bsw/jbe@0 | 119 ui.field.vote_later{ label = _"Vote later", name = "vote_later" } |
bsw@2 | 120 ui.field.timestamp{ label = _"Half frozen", name = "half_frozen" } |
bsw@2 | 121 ui.field.text{ label = _"verification_time", value = policy.verification_time } |
bsw@2 | 122 ui.field.integer{ label = _"initiative_quorum_num", value = policy.initiative_quorum_num } |
bsw@2 | 123 ui.field.integer{ label = _"initiative_quorum_den", value = policy.initiative_quorum_den } |
bsw@2 | 124 ui.field.timestamp{ label = _"Fully frozen", name = "fully_frozen" } |
bsw@2 | 125 ui.field.text{ label = _"voting_time", value = policy.voting_time } |
bsw@2 | 126 ui.field.timestamp{ label = _"Closed", name = "closed" } |
bsw@2 | 127 end |
bsw@2 | 128 } |
bsw@2 | 129 ui.form{ |
bsw@2 | 130 record = issue.policy, |
bsw@2 | 131 readonly = true, |
bsw@2 | 132 content = function() |
bsw/jbe@0 | 133 end |
bsw/jbe@0 | 134 } |
bsw/jbe@0 | 135 end |
bsw/jbe@0 | 136 }, |
bsw/jbe@0 | 137 } |
bsw/jbe@0 | 138 |
bsw/jbe@0 | 139 |