liquid_feedback_frontend

view app/main/area/_head.lua @ 528:305329da1c75

Wording and css changes
author bsw
date Fri May 18 21:03:10 2012 +0200 (2012-05-18)
parents 18cd8595459b
children 5ca9de94cb13
line source
1 local area = param.get("area", "table")
3 execute.view{ module = "unit", view = "_head", params = { unit = area.unit } }
5 ui.container{ attr = { class = "area_head" }, content = function()
7 execute.view{ module = "delegation", view = "_info", params = { area = area } }
9 ui.container{ attr = { class = "title" }, content = function()
10 -- area name
11 ui.link{
12 module = "area", view = "show", id = area.id,
13 attr = { class = "area_name" }, content = area.name
14 }
15 end }
17 ui.container{ attr = { class = "content" }, content = function()
19 -- actions (members with appropriate voting right only)
20 if app.session.member_id then
22 -- membership
23 local membership = Membership:by_pk(area.id, app.session.member.id)
25 if membership then
27 ui.tag{ content = _"You are participating in this area" }
29 slot.put(" ")
31 ui.tag{ content = function()
32 slot.put("(")
33 ui.link{
34 text = _"Withdraw",
35 module = "membership",
36 action = "update",
37 params = { area_id = area.id, delete = true },
38 routing = {
39 default = {
40 mode = "redirect",
41 module = request.get_module(),
42 view = request.get_view(),
43 id = param.get_id_cgi(),
44 params = param.get_all_cgi()
45 }
46 }
47 }
48 slot.put(")")
49 end }
51 slot.put(" · ")
53 elseif app.session.member:has_voting_right_for_unit_id(area.unit_id) then
54 ui.link{
55 text = _"Participate in this area",
56 module = "membership",
57 action = "update",
58 params = { area_id = area.id },
59 routing = {
60 default = {
61 mode = "redirect",
62 module = request.get_module(),
63 view = request.get_view(),
64 id = param.get_id_cgi(),
65 params = param.get_all_cgi()
66 }
67 }
68 }
70 slot.put(" · ")
72 end
74 -- create new issue
75 if app.session.member:has_voting_right_for_unit_id(area.unit_id) then
76 ui.link{
77 content = function()
78 slot.put(_"Create new issue")
79 end,
80 module = "initiative",
81 view = "new",
82 params = { area_id = area.id }
83 }
84 end
86 end
88 end }
90 end }

Impressum / About Us