liquid_feedback_frontend

annotate app/main/issue/show.lua @ 4:80c215dbf076

Version alpha5

Many optical changes and improved usability

Support for different wiki-formatting-engines

Help system
author bsw/jbe
date Thu Dec 10 12:00:00 2009 +0100 (2009-12-10)
parents 768faea1096d
children afd9f769c7ae
rev   line source
bsw/jbe@0 1 local issue = Issue:by_id(param.get_id())
bsw/jbe@0 2
bsw/jbe@0 3 execute.view{
bsw/jbe@4 4 module = "issue",
bsw/jbe@4 5 view = "_show_head",
bsw/jbe@0 6 params = { issue = issue }
bsw/jbe@0 7 }
bsw/jbe@0 8
bsw/jbe@4 9 util.help("issue.show")
bsw@2 10
bsw/jbe@0 11 ui.tabs{
bsw/jbe@0 12 {
bsw/jbe@0 13 name = "initiatives",
bsw/jbe@0 14 label = _"Initiatives",
bsw@2 15 content = function() execute.view{
bsw/jbe@0 16 module = "initiative",
bsw/jbe@0 17 view = "_list",
bsw/jbe@0 18 params = {
bsw/jbe@0 19 issue = issue,
bsw/jbe@0 20 initiatives_selector = issue:get_reference_selector("initiatives")
bsw/jbe@0 21 }
bsw/jbe@0 22 }
bsw/jbe@0 23 slot.put("<br />")
bsw@3 24 if not issue.fully_frozen and not issue.closed then
bsw/jbe@0 25 ui.link{
bsw/jbe@0 26 attr = { class = "action" },
bsw/jbe@0 27 content = function()
bsw/jbe@0 28 ui.image{ static = "icons/16/script_add.png" }
bsw/jbe@0 29 slot.put(_"Add new initiative to issue")
bsw/jbe@0 30 end,
bsw/jbe@0 31 module = "initiative",
bsw/jbe@0 32 view = "new",
bsw/jbe@0 33 params = { issue_id = issue.id }
bsw/jbe@0 34 }
bsw/jbe@0 35 end
bsw/jbe@0 36 end
bsw/jbe@0 37 },
bsw/jbe@0 38 --[[ {
bsw/jbe@0 39 name = "voting_requests",
bsw/jbe@0 40 label = _"Voting requests",
bsw/jbe@0 41 content = function()
bsw/jbe@0 42 execute.view{
bsw/jbe@0 43 module = "issue_voting_request",
bsw/jbe@0 44 view = "_list",
bsw/jbe@0 45 params = { issue = issue }
bsw/jbe@0 46 }
bsw/jbe@0 47 end
bsw/jbe@0 48 },
bsw/jbe@0 49 --]]
bsw/jbe@0 50 {
bsw@3 51 name = "interested_members",
bsw@3 52 label = _"Interested members",
bsw@3 53 content = function()
bsw@3 54 execute.view{
bsw@3 55 module = "member",
bsw@3 56 view = "_list",
bsw@3 57 params = {
bsw@3 58 issue = issue,
bsw@3 59 members_selector = issue:get_reference_selector("interested_members_snapshot")
bsw@3 60 :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id")
bsw@3 61 :add_field("direct_interest_snapshot.weight")
bsw@3 62 :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event")
bsw@3 63 }
bsw@3 64 }
bsw@3 65 end
bsw@3 66 },
bsw@3 67 {
bsw@2 68 name = "delegations",
bsw@2 69 label = _"Delegations",
bsw@2 70 content = function()
bsw@2 71 execute.view{
bsw@2 72 module = "delegation",
bsw@2 73 view = "_list",
bsw@2 74 params = { delegations_selector = issue:get_reference_selector("delegations") }
bsw@2 75 }
bsw@2 76 end
bsw@2 77 },
bsw@2 78 {
bsw/jbe@0 79 name = "details",
bsw/jbe@0 80 label = _"Details",
bsw/jbe@0 81 content = function()
bsw@2 82 local policy = issue.policy
bsw/jbe@0 83 ui.form{
bsw/jbe@0 84 record = issue,
bsw/jbe@0 85 readonly = true,
bsw/jbe@0 86 attr = { class = "vertical" },
bsw/jbe@0 87 content = function()
bsw/jbe@0 88 ui.field.text{ label = _"State", name = "state" }
bsw@2 89 ui.field.timestamp{ label = _"Created at", name = "created" }
bsw@3 90 ui.field.text{ label = _"Admission time", value = policy.admission_time }
bsw@3 91 ui.field.text{
bsw@3 92 label = _"Issue quorum",
bsw@3 93 value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den)
bsw@3 94 }
bsw@3 95 ui.field.timestamp{ label = _"Accepted at", name = "accepted" }
bsw@3 96 ui.field.text{ label = _"Discussion time", value = policy.discussion_time }
bsw@2 97 ui.field.vote_now{ label = _"Vote now", name = "vote_now" }
bsw/jbe@0 98 ui.field.vote_later{ label = _"Vote later", name = "vote_later" }
bsw@3 99 ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" }
bsw@3 100 ui.field.text{ label = _"Verification time", value = policy.verification_time }
bsw@3 101 ui.field.text{
bsw@3 102 label = _"Initiative quorum",
bsw@3 103 value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den)
bsw@3 104 }
bsw@3 105 ui.field.timestamp{ label = _"Fully frozen at", name = "fully_frozen" }
bsw@3 106 ui.field.text{ label = _"Voting time", value = policy.voting_time }
bsw@2 107 ui.field.timestamp{ label = _"Closed", name = "closed" }
bsw@2 108 end
bsw@2 109 }
bsw@2 110 ui.form{
bsw@2 111 record = issue.policy,
bsw@2 112 readonly = true,
bsw@2 113 content = function()
bsw/jbe@0 114 end
bsw/jbe@0 115 }
bsw/jbe@0 116 end
bsw/jbe@0 117 },
bsw/jbe@0 118 }
bsw/jbe@0 119
bsw/jbe@0 120

Impressum / About Us