liquid_feedback_frontend

view app/main/member/developer_settings.lua @ 75:733f65c0c0a0

Bugfixes, feature enhancements, code-cleanup, and major work on API

Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
author bsw
date Thu Jul 08 18:44:02 2010 +0200 (2010-07-08)
parents 0849be391140
children 976d493106a1
line source
1 slot.put_into("title", _"Developer settings")
3 slot.select("actions", function()
4 ui.link{
5 content = function()
6 ui.image{ static = "icons/16/cancel.png" }
7 slot.put(_"Cancel")
8 end,
9 module = "member",
10 view = "settings"
11 }
12 end)
14 local setting_key = "liquidfeedback_frontend_developer_features"
15 local setting = Setting:by_pk(app.session.member.id, setting_key)
17 if setting then
18 ui.form{
19 attr = { class = "vertical" },
20 module = "member",
21 action = "update_stylesheet_url",
22 routing = {
23 ok = {
24 mode = "redirect",
25 module = "index",
26 view = "index"
27 }
28 },
29 content = function()
30 local setting_key = "liquidfeedback_frontend_stylesheet_url"
31 local setting = Setting:by_pk(app.session.member.id, setting_key)
32 local value = setting and setting.value
33 ui.field.text{
34 label = _"Stylesheet URL",
35 name = "stylesheet_url",
36 value = value
37 }
38 ui.submit{ value = _"Set URL" }
39 end
40 }
41 end
43 local setting_key = "liquidfeedback_frontend_api_key"
44 local setting = Setting:by_pk(app.session.member.id, setting_key)
45 local api_key
46 if setting then
47 api_key = setting.value
48 end
50 ui.heading{ content = _"Generate / change API key" }
51 util.help("member.developer_settings.api_key", _"API key")
53 if api_key then
54 slot.put(_"Your API key:")
55 slot.put(" ")
56 slot.put("<tt>", api_key, "</tt>")
57 slot.put(" ")
58 ui.link{
59 text = _"Change API key",
60 module = "member",
61 action = "update_api_key",
62 routing = {
63 default = {
64 mode = "redirect",
65 module = "member",
66 view = "developer_settings"
67 }
68 }
69 }
70 slot.put(" ")
71 ui.link{
72 text = _"Delete API key",
73 module = "member",
74 action = "update_api_key",
75 params = { delete = true },
76 routing = {
77 default = {
78 mode = "redirect",
79 module = "member",
80 view = "developer_settings",
81 }
82 }
83 }
84 else
85 slot.put(_"Currently no API key is set.")
86 slot.put(" ")
87 ui.link{
88 text = _"Generate API key",
89 module = "member",
90 action = "update_api_key",
91 routing = {
92 default = {
93 mode = "redirect",
94 module = "member",
95 view = "developer_settings"
96 }
97 }
98 }
99 end

Impressum / About Us