liquid_feedback_frontend

view app/main/delegation/new.lua @ 10:72c5e0ee7c98

Version beta6

Bugfixes:
- Security fix: Every user was able to change the discussion URL of an initiative
- Creation of new issues in areas without default policies is now possible
- Members can now be sorted in different ways
- No error when trying to compare a draft with itself
- Added missing local statement to variable initialization in app/main/delegation/new.lua
- CSS flaw in initiative action bar fixed

New features:
- Possiblity to invite other users to become initiator
- Revokation of initiatives implemented
- Number of suggestions, supporters, etc. is shown on corresponding tabs of initiative view
- Members can now be sorted by account creation (default sorting is "newest first")
- Configuration option to create an automatic discussion link for all issues
- First draft of global timeline feature (not accessible via link yet)
- Custom stylesheet URL for users marked as developers

In area listing the number of closed issues is shown too

Renamed "author" field of initiative to "last author"

Removed wrongly included file app/main/member/_show_thumb.lua.orig in the distribution

Help texts updated
author bsw
date Sun Jan 10 12:00:00 2010 +0100 (2010-01-10)
parents 80c215dbf076
children bf885faf3452
line source
1 local area = Area:by_id(param.get("area_id", atom.integer))
2 if area then
3 slot.put_into("title", encode.html(_"Set delegation for Area '#{name}'":gsub("#{name}", area.name)))
4 util.help("delegation.new.area")
5 end
7 local issue = Issue:by_id(param.get("issue_id", atom.integer))
8 if issue then
9 slot.put_into("title", encode.html(_"Set delegation for Issue ##{number} in Area '#{area_name}'":gsub("#{number}", issue.id):gsub("#{area_name}", issue.area.name)))
10 util.help("delegation.new.issue")
11 end
13 if not area and not issue then
14 slot.put_into("title", encode.html(_"Set global delegation"))
15 util.help("delegation.new.global")
16 end
18 slot.select("actions", function()
19 if issue then
20 ui.link{
21 module = "issue",
22 view = "show",
23 id = issue.id,
24 content = function()
25 ui.image{ static = "icons/16/cancel.png" }
26 slot.put(_"Cancel")
27 end,
28 }
29 elseif area then
30 ui.link{
31 module = "area",
32 view = "show",
33 id = area.id,
34 content = function()
35 ui.image{ static = "icons/16/cancel.png" }
36 slot.put(_"Cancel")
37 end,
38 }
39 else
40 ui.link{
41 module = "index",
42 view = "index",
43 content = function()
44 ui.image{ static = "icons/16/cancel.png" }
45 slot.put(_"Cancel")
46 end,
47 }
48 end
49 end)
53 local contact_members = Member:new_selector()
54 :add_where{ "contact.member_id = ?", app.session.member.id }
55 :join("contact", nil, "member.id = contact.other_member_id")
56 :add_order_by("member.name")
57 :exec()
60 ui.form{
61 attr = { class = "vertical" },
62 module = "delegation",
63 action = "update",
64 params = {
65 area_id = area and area.id or nil,
66 issue_id = issue and issue.id or nil,
67 },
68 routing = {
69 default = {
70 mode = "redirect",
71 module = area and "area" or issue and "issue" or "index",
72 view = (area or issue) and "show" or "index",
73 id = area and area.id or issue and issue.id or nil,
74 }
75 },
76 content = function()
77 local records = {
78 {
79 id = "-1",
80 name = _"No delegation"
81 }
82 }
83 for i, record in ipairs(contact_members) do
84 records[#records+1] = record
85 end
87 ui.field.select{
88 label = _"Trustee",
89 name = "trustee_id",
90 foreign_records = records,
91 foreign_id = "id",
92 foreign_name = "name",
93 }
94 ui.submit{ text = _"Save" }
95 end
96 }

Impressum / About Us