liquid_feedback_frontend
view app/main/member/developer_settings.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
| parents | 733f65c0c0a0 |
| 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
