liquid_feedback_frontend
annotate app/main/member/show_tab.lua @ 24:81586ea68d57
Minor bugfixes
app/main/initiative/_list.lua:
Replaced single by optional object mode
locale/translations.de.lua:
Consistent translation
app/main/initiative/_show.lua:
Added missing case "not approved" in voting info box
app/main/initiative/_show_voting.lua:
Added link to initiative
app/main/initiative/_show_voting.lua:
Added missing argument for link
app/main/member/show_tab.lua:
Added outgoing argument to show outgoing delegations correctly
app/main/initiative/_list.lua:
Replaced single by optional object mode
locale/translations.de.lua:
Consistent translation
app/main/initiative/_show.lua:
Added missing case "not approved" in voting info box
app/main/initiative/_show_voting.lua:
Added link to initiative
app/main/initiative/_show_voting.lua:
Added missing argument for link
app/main/member/show_tab.lua:
Added outgoing argument to show outgoing delegations correctly
author | bsw |
---|---|
date | Sun Feb 21 14:09:11 2010 +0100 (2010-02-21) |
parents | 00d1004545f1 |
children | 4f39f0a0d5b5 |
rev | line source |
---|---|
bsw/jbe@19 | 1 local member |
bsw/jbe@19 | 2 |
bsw/jbe@19 | 3 if request.get_json_request_slots() then |
bsw/jbe@19 | 4 member = Member:by_id(param.get("member_id")) |
bsw/jbe@19 | 5 else |
bsw/jbe@19 | 6 member = param.get("member", "table") |
bsw/jbe@19 | 7 end |
bsw/jbe@19 | 8 |
bsw/jbe@19 | 9 local areas_selector = member:get_reference_selector("areas") |
bsw/jbe@19 | 10 local issues_selector = member:get_reference_selector("issues") |
bsw/jbe@19 | 11 local supported_initiatives_selector = member:get_reference_selector("supported_initiatives") |
bsw/jbe@19 | 12 local initiated_initiatives_selector = member:get_reference_selector("initiated_initiatives"):add_where("initiator.accepted = true") |
bsw/jbe@19 | 13 local incoming_delegations_selector = member:get_reference_selector("incoming_delegations") |
bsw/jbe@19 | 14 :left_join("issue", "_member_showtab_issue", "_member_showtab_issue.id = delegation.issue_id") |
bsw/jbe@19 | 15 :add_where("_member_showtab_issue.closed ISNULL") |
bsw/jbe@19 | 16 local outgoing_delegations_selector = member:get_reference_selector("outgoing_delegations") |
bsw/jbe@19 | 17 :left_join("issue", "_member_showtab_issue", "_member_showtab_issue.id = delegation.issue_id") |
bsw/jbe@19 | 18 :add_where("_member_showtab_issue.closed ISNULL") |
bsw/jbe@19 | 19 local contacts_selector = member:get_reference_selector("saved_members"):add_where("public") |
bsw/jbe@19 | 20 |
bsw/jbe@19 | 21 ui.tabs{ |
bsw/jbe@19 | 22 module = "member", |
bsw/jbe@19 | 23 view = "show_tab", |
bsw/jbe@19 | 24 static_params = { member_id = member.id }, |
bsw/jbe@19 | 25 { |
bsw/jbe@19 | 26 name = "profile", |
bsw/jbe@19 | 27 label = _"Profile", |
bsw/jbe@19 | 28 icon = { static = "icons/16/application_form.png" }, |
bsw/jbe@19 | 29 module = "member", |
bsw/jbe@19 | 30 view = "_profile", |
bsw/jbe@19 | 31 params = { member = member }, |
bsw/jbe@19 | 32 }, |
bsw/jbe@19 | 33 { |
bsw/jbe@19 | 34 name = "areas", |
bsw/jbe@19 | 35 label = _"Areas" .. " (" .. tostring(areas_selector:count()) .. ")", |
bsw/jbe@19 | 36 icon = { static = "icons/16/package.png" }, |
bsw/jbe@19 | 37 module = "area", |
bsw/jbe@19 | 38 view = "_list", |
bsw/jbe@19 | 39 params = { areas_selector = areas_selector }, |
bsw/jbe@19 | 40 }, |
bsw/jbe@19 | 41 { |
bsw/jbe@19 | 42 name = "issues", |
bsw/jbe@19 | 43 label = _"Issues" .. " (" .. tostring(issues_selector:count()) .. ")", |
bsw/jbe@19 | 44 icon = { static = "icons/16/folder.png" }, |
bsw/jbe@19 | 45 module = "issue", |
bsw/jbe@19 | 46 view = "_list", |
bsw/jbe@19 | 47 params = { issues_selector = issues_selector }, |
bsw/jbe@19 | 48 }, |
bsw/jbe@19 | 49 { |
bsw/jbe@19 | 50 name = "supported_initiatives", |
bsw/jbe@19 | 51 label = _"Supported initiatives" .. " (" .. tostring(supported_initiatives_selector:count()) .. ")", |
bsw/jbe@19 | 52 icon = { static = "icons/16/thumb_up_green.png" }, |
bsw/jbe@19 | 53 module = "initiative", |
bsw/jbe@19 | 54 view = "_list", |
bsw/jbe@19 | 55 params = { initiatives_selector = supported_initiatives_selector }, |
bsw/jbe@19 | 56 }, |
bsw/jbe@19 | 57 { |
bsw/jbe@19 | 58 name = "initiatied_initiatives", |
bsw/jbe@19 | 59 label = _"Initiated initiatives" .. " (" .. tostring(initiated_initiatives_selector:count()) .. ")", |
bsw/jbe@19 | 60 icon = { static = "icons/16/user_edit.png" }, |
bsw/jbe@19 | 61 module = "initiative", |
bsw/jbe@19 | 62 view = "_list", |
bsw/jbe@19 | 63 params = { initiatives_selector = initiated_initiatives_selector }, |
bsw/jbe@19 | 64 }, |
bsw/jbe@19 | 65 { |
bsw/jbe@19 | 66 name = "incoming_delegations", |
bsw/jbe@19 | 67 label = _"Incoming delegations" .. " (" .. tostring(incoming_delegations_selector:count()) .. ")", |
bsw/jbe@19 | 68 icon = { static = "icons/16/table_go.png" }, |
bsw/jbe@19 | 69 module = "delegation", |
bsw/jbe@19 | 70 view = "_list", |
bsw/jbe@19 | 71 params = { delegations_selector = incoming_delegations_selector, incoming = true }, |
bsw/jbe@19 | 72 }, |
bsw/jbe@19 | 73 { |
bsw/jbe@19 | 74 name = "outgoing_delegations", |
bsw/jbe@19 | 75 label = _"Outgoing delegations" .. " (" .. tostring(outgoing_delegations_selector:count()) .. ")", |
bsw/jbe@19 | 76 icon = { static = "icons/16/table_go.png" }, |
bsw/jbe@19 | 77 module = "delegation", |
bsw/jbe@19 | 78 view = "_list", |
bsw@24 | 79 params = { delegations_selector = outgoing_delegations_selector, outgoing = true }, |
bsw/jbe@19 | 80 }, |
bsw/jbe@19 | 81 { |
bsw/jbe@19 | 82 name = "contacts", |
bsw/jbe@19 | 83 label = _"Contacts" .. " (" .. tostring(contacts_selector:count()) .. ")", |
bsw/jbe@19 | 84 icon = { static = "icons/16/book_edit.png" }, |
bsw/jbe@19 | 85 module = "member", |
bsw/jbe@19 | 86 view = "_list", |
bsw/jbe@19 | 87 params = { members_selector = contacts_selector }, |
bsw/jbe@19 | 88 } |
bsw/jbe@19 | 89 } |