liquid_feedback_frontend
view app/main/member_image/_show.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 | 6b6c82f9ca9f |
children | aec9df5b4cd3 |
line source
1 local member = param.get("member", "table")
2 local image_type = param.get("image_type")
3 local show_dummy = param.get("show_dummy", atom.boolean)
5 local image = member:get_reference_selector("images")
6 :add_where{ "image_type = ?", image_type }
7 :optional_object_mode()
8 :exec()
10 if image or show_dummy then
11 if config.fastpath_url_func then
12 ui.image{
13 attr = { class = "member_image member_image_" .. image_type },
14 external = config.fastpath_url_func(member.id, image_type)
15 }
16 else
17 if not image then
18 ui.image{
19 attr = { class = "member_image member_image_" .. image_type },
20 external = encode.url{ static = (config.member_image_default_file[image_type] or 'icons/16/lightning.png')},
21 }
22 else
23 ui.image{
24 attr = { class = "member_image member_image_" .. image_type },
25 module = "member_image",
26 view = "show",
27 extension = "jpg",
28 id = member.id,
29 params = {
30 image_type = image_type
31 }
32 }
33 end
34 end
35 end