liquid_feedback_frontend

annotate app/main/member_image/show.lua @ 159:5d797c6706d5

implement quorum display

show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sat Oct 09 03:42:48 2010 +0200 (2010-10-09)
parents 034f96181e59
children f52f918b38b8
rev   line source
bsw/jbe@4 1 local image_type = param.get("image_type")
bsw/jbe@4 2 local record = MemberImage:by_pk(param.get_id(), image_type, true)
bsw/jbe@4 3
poelzi@148 4 print('Cache-Control: max-age=300'); -- let the client cache the image for 5 minutes
poelzi@148 5
bsw/jbe@4 6 if record == nil then
bsw/jbe@4 7 local default_file = config.member_image_default_file[image_type]
bsw/jbe@4 8 if default_file then
bsw/jbe@4 9 print('Location: ' .. encode.url{ static = default_file } .. '\n\n')
bsw/jbe@4 10 else
bsw/jbe@4 11 print('Location: ' .. encode.url{ static = 'icons/16/lightning.png' } .. '\n\n')
bsw/jbe@4 12 end
bsw/jbe@4 13 exit()
bsw/jbe@4 14 end
bsw/jbe@4 15
bsw/jbe@52 16 assert(record.content_type, "No content-type set for image.")
bsw/jbe@52 17
bsw/jbe@52 18 slot.set_layout(nil, record.content_type)
bsw/jbe@4 19
bsw/jbe@4 20 if record then
bsw/jbe@52 21 slot.put_into("data", record.data)
bsw/jbe@4 22 end

Impressum / About Us