liquid_feedback_frontend

annotate app/main/timeline/_action/save.lua @ 124:f740026b1518

add initiator support in delegation

if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Mon Sep 20 20:32:04 2010 +0200 (2010-09-20)
parents 77d58efe99fd
children 7c3e8a1678fc
rev   line source
bsw@11 1 local id = param.get("id", atom.number)
bsw@11 2
bsw@11 3 local setting_key = "liquidfeedback_frontend_timeline_current_options"
bsw@11 4 local setting = Setting:by_pk(app.session.member.id, setting_key)
bsw@11 5 local options_string = setting.value
bsw@11 6
bsw@11 7 local timeline_filter
bsw@11 8
bsw@11 9 local subkey = param.get("name")
bsw@11 10
bsw@11 11 setting_map = SettingMap:new()
bsw@11 12 setting_map.member_id = app.session.member.id
bsw@11 13 setting_map.key = "timeline_filters"
bsw@11 14 setting_map.subkey = subkey
bsw@11 15 setting_map.value = options_string
bsw@11 16 setting_map:save()
bsw@11 17
bsw@11 18 local timeline_params = {}
bsw@11 19 if options_string then
bsw@11 20 for event_ident, filter_idents in setting.value:gmatch("(%S+):(%S+)") do
bsw@11 21 timeline_params["option_" .. event_ident] = true
bsw@11 22 if filter_idents ~= "*" then
bsw@11 23 for filter_ident in filter_idents:gmatch("([^\|]+)") do
bsw@11 24 timeline_params["option_" .. event_ident .. "_" .. filter_ident] = true
bsw@11 25 end
bsw@11 26 end
bsw@11 27 end
bsw@11 28 end
bsw@11 29
bsw@11 30 local setting_key = "liquidfeedback_frontend_timeline_current_date"
bsw@11 31 local setting = Setting:by_pk(app.session.member.id, setting_key)
bsw@11 32
bsw@11 33 if setting then
bsw@11 34 timeline_params.date = setting.value
bsw@11 35 end
bsw@11 36
bsw@11 37 request.redirect{
bsw@11 38 module = "timeline",
bsw@11 39 view = "index",
bsw@11 40 params = timeline_params
bsw@11 41 }

Impressum / About Us