liquid_feedback_frontend
annotate app/main/member_image/_show.lua @ 111:bf885faf3452
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.
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 | 80c215dbf076 |
children | 6b6c82f9ca9f |
rev | line source |
---|---|
bsw/jbe@4 | 1 local member = param.get("member", "table") |
bsw/jbe@4 | 2 local image_type = param.get("image_type") |
bsw/jbe@4 | 3 local show_dummy = param.get("show_dummy", atom.boolean) |
bsw/jbe@4 | 4 |
bsw/jbe@4 | 5 local image = member:get_reference_selector("images") |
bsw/jbe@4 | 6 :add_where{ "image_type = ?", image_type } |
bsw/jbe@4 | 7 :optional_object_mode() |
bsw/jbe@4 | 8 :exec() |
bsw/jbe@4 | 9 if image or show_dummy then |
bsw/jbe@4 | 10 if config.fastpath_url_func then |
bsw/jbe@4 | 11 ui.image{ |
bsw/jbe@4 | 12 attr = { class = "member_image member_image_" .. image_type }, |
bsw/jbe@4 | 13 external = config.fastpath_url_func(member.id, image_type) |
bsw/jbe@4 | 14 } |
bsw/jbe@4 | 15 else |
bsw/jbe@4 | 16 ui.image{ |
bsw/jbe@4 | 17 attr = { class = "member_image member_image_" .. image_type }, |
bsw/jbe@4 | 18 module = "member_image", |
bsw/jbe@4 | 19 view = "show", |
bsw/jbe@4 | 20 extension = "jpg", |
bsw/jbe@4 | 21 id = member.id, |
bsw/jbe@4 | 22 params = { |
bsw/jbe@4 | 23 image_type = image_type |
bsw/jbe@4 | 24 } |
bsw/jbe@4 | 25 } |
bsw/jbe@4 | 26 end |
bsw/jbe@4 | 27 end |