liquid_feedback_frontend

annotate 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
rev   line source
bsw@75 1 slot.put_into("title", _"Developer settings")
bsw@10 2
bsw@10 3 slot.select("actions", function()
bsw@10 4 ui.link{
bsw@10 5 content = function()
bsw@10 6 ui.image{ static = "icons/16/cancel.png" }
bsw@10 7 slot.put(_"Cancel")
bsw@10 8 end,
bsw@10 9 module = "member",
bsw@10 10 view = "settings"
bsw@10 11 }
bsw@10 12 end)
bsw@10 13
bsw@51 14 local setting_key = "liquidfeedback_frontend_developer_features"
bsw@51 15 local setting = Setting:by_pk(app.session.member.id, setting_key)
bsw@51 16
bsw@51 17 if setting then
bsw@51 18 ui.form{
bsw@51 19 attr = { class = "vertical" },
bsw@51 20 module = "member",
bsw@51 21 action = "update_stylesheet_url",
bsw@51 22 routing = {
bsw@51 23 ok = {
bsw@51 24 mode = "redirect",
bsw@51 25 module = "index",
bsw@51 26 view = "index"
bsw@51 27 }
bsw@51 28 },
bsw@51 29 content = function()
bsw@51 30 local setting_key = "liquidfeedback_frontend_stylesheet_url"
bsw@51 31 local setting = Setting:by_pk(app.session.member.id, setting_key)
bsw@51 32 local value = setting and setting.value
bsw@51 33 ui.field.text{
bsw@51 34 label = _"Stylesheet URL",
bsw@51 35 name = "stylesheet_url",
bsw@51 36 value = value
bsw@51 37 }
bsw@51 38 ui.submit{ value = _"Set URL" }
bsw@51 39 end
bsw@10 40 }
bsw@51 41 end
bsw@51 42
bsw@51 43 local setting_key = "liquidfeedback_frontend_api_key"
bsw@51 44 local setting = Setting:by_pk(app.session.member.id, setting_key)
bsw@51 45 local api_key
bsw@51 46 if setting then
bsw@51 47 api_key = setting.value
bsw@51 48 end
bsw@51 49
bsw@51 50 ui.heading{ content = _"Generate / change API key" }
bsw@51 51 util.help("member.developer_settings.api_key", _"API key")
bsw@51 52
bsw@51 53 if api_key then
bsw@51 54 slot.put(_"Your API key:")
bsw@51 55 slot.put(" ")
bsw@51 56 slot.put("<tt>", api_key, "</tt>")
bsw@51 57 slot.put(" ")
bsw@51 58 ui.link{
bsw@51 59 text = _"Change API key",
bsw@51 60 module = "member",
bsw@51 61 action = "update_api_key",
bsw@51 62 routing = {
bsw@51 63 default = {
bsw@51 64 mode = "redirect",
bsw@51 65 module = "member",
bsw@51 66 view = "developer_settings"
bsw@51 67 }
bsw@51 68 }
bsw@10 69 }
bsw@51 70 slot.put(" ")
bsw@51 71 ui.link{
bsw@51 72 text = _"Delete API key",
bsw@51 73 module = "member",
bsw@51 74 action = "update_api_key",
bsw@51 75 params = { delete = true },
bsw@51 76 routing = {
bsw@51 77 default = {
bsw@51 78 mode = "redirect",
bsw@51 79 module = "member",
bsw@51 80 view = "developer_settings",
bsw@51 81 }
bsw@51 82 }
bsw@51 83 }
bsw@51 84 else
bsw@51 85 slot.put(_"Currently no API key is set.")
bsw@51 86 slot.put(" ")
bsw@51 87 ui.link{
bsw@51 88 text = _"Generate API key",
bsw@51 89 module = "member",
bsw@51 90 action = "update_api_key",
bsw@51 91 routing = {
bsw@51 92 default = {
bsw@51 93 mode = "redirect",
bsw@51 94 module = "member",
bsw@51 95 view = "developer_settings"
bsw@51 96 }
bsw@51 97 }
bsw@51 98 }
bsw@10 99 end

Impressum / About Us