bsw@197: local area = Area:by_id(param.get_id()) bsw@197: bsw/jbe@0: jorges@103: app.html_title.title = area.name jorges@103: app.html_title.subtitle = _("Area") jorges@103: bsw@197: util.help("area.show") bsw@197: bsw@197: bsw/jbe@52: if config.feature_rss_enabled then bsw/jbe@52: util.html_rss_head{ title = _"Initiatives in this area (last created first)", module = "initiative", view = "list_rss", params = { area_id = area.id } } bsw/jbe@52: util.html_rss_head{ title = _"Initiatives in this area (last updated first)", module = "initiative", view = "list_rss", params = { area_id = area.id } } bsw/jbe@52: end bsw/jbe@52: bsw@197: bsw@265: slot.select("title", function() bsw@285: ui.link{ bsw@285: content = area.name, bsw@285: module = "area", view = "show", id = area.id bsw@285: } bsw@271: bsw@265: if not config.single_unit_id then bsw@271: slot.put(" · ") bsw@265: ui.link{ bsw@265: content = area.unit.name, bsw@301: module = "unit", bsw@301: view = "show", bsw@301: id = area.unit_id bsw@265: } bsw@265: end bsw@197: bsw@265: bsw@265: end) bsw/jbe@0: bsw/jbe@0: ui.container{ bsw/jbe@0: attr = { class = "vertical"}, bsw/jbe@0: content = function() bsw/jbe@0: ui.field.text{ value = area.description } bsw/jbe@0: end bsw/jbe@0: } bsw/jbe@0: bsw@197: bsw@51: if app.session.member_id then bsw@271: execute.view{ bsw@271: module = "membership", bsw@271: view = "_show_box", bsw@271: params = { area = area } bsw@271: } bsw@271: bsw@271: execute.view{ bsw@271: module = "delegation", bsw@271: view = "_show_box", bsw@271: params = { area_id = area.id } bsw@271: } bsw@197: bsw@281: if app.session.member:has_voting_right_for_unit_id(area.unit_id) then bsw@281: slot.select("actions", function() bsw@281: ui.link{ bsw@281: content = function() bsw@281: ui.image{ static = "icons/16/folder_add.png" } bsw@281: slot.put(_"Create new issue") bsw@281: end, bsw@281: module = "initiative", bsw@281: view = "new", bsw@281: params = { area_id = area.id } bsw@281: } bsw@281: end) bsw@281: end bsw/jbe@0: bsw@51: bsw@51: end bsw/jbe@0: bsw@277: if app.session.member then bsw@277: execute.view{ bsw@277: module = "area", bsw@277: view = "show_tab", bsw@277: params = { area = area } bsw@277: } bsw@277: else bsw@277: execute.view{ bsw@277: module = "issue", bsw@277: view = "_list", bsw@277: params = { bsw@277: issues_selector = area:get_reference_selector("issues"), bsw@277: filter = cgi.params["filter"], bsw@277: filter_voting = param.get("filter_voting"), bsw@277: for_area_list = true bsw@277: } bsw@277: } bsw@277: end