liquid_feedback_frontend

view app/main/delegation/new.lua @ 6:8d91bccab0bf

Version beta2

Possibility to browse voters of a closed issue

Registration with invite code

Email confirmation and password recovery

Download function (for database dumps) added

Critical bug solved, which made it impossible to select your opinion on other peoples suggestions

Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted

Fixed wrong sorting order for "supporters" or "potential supporters"

Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)

Strip space characters from certain fields and ensure they contain at least 3 characters

Showing grade in opinion/list as clear text instead of integer value

More information on initiative is displayed while voting

Colored notification box shown on pages of issues or initiatives which are currently in voting state

Changed default filter for issues to "Open"

Back link on suggestion page

Some optical changes

Removed wrong space character in LICENSE file
author bsw/jbe
date Sat Jan 02 12:00:00 2010 +0100 (2010-01-02)
parents 80c215dbf076
children 72c5e0ee7c98
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 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