# HG changeset patch # User bsw # Date 1340124286 -7200 # Node ID 53f93f0ffa6e1414a21988e2ff579d5afa22dbba # Parent 3d9cf824f9dfc3b7019fd89e2a02723f503fec1a Fix public event line (do not use member_info when no member logged in) diff -r 3d9cf824f9df -r 53f93f0ffa6e app/main/initiative/_list_element.lua --- a/app/main/initiative/_list_element.lua Tue Jun 19 18:41:29 2012 +0200 +++ b/app/main/initiative/_list_element.lua Tue Jun 19 18:44:46 2012 +0200 @@ -58,44 +58,46 @@ end end } - ui.container{ attr = { class = "interest" }, content = function() - if initiative.member_info.initiated then - local label = _"You are initiator of this initiative" - ui.image{ - attr = { alt = label, title = label }, - static = "icons/16/user_edit.png" - } - elseif initiative.member_info.directly_supported then - if initiative.member_info.satisfied then - local label = _"You are supporter of this initiative" - ui.image{ - attr = { alt = label, title = label }, - static = "icons/16/thumb_up_green.png" - } - else - local label = _"You are potential supporter of this initiative" + if app.session.member_id then + ui.container{ attr = { class = "interest" }, content = function() + if initiative.member_info.initiated then + local label = _"You are initiator of this initiative" ui.image{ attr = { alt = label, title = label }, - static = "icons/16/thumb_up.png" - } - end - elseif initiative.member_info.supported then - if initiative.member_info.satisfied then - local label = _"You are supporter of this initiative via delegation" - ui.image{ - attr = { alt = label, title = label }, - static = "icons/16/thumb_up_green_arrow.png" + static = "icons/16/user_edit.png" } - else - local label = _"You are potential supporter of this initiative via delegation" - ui.image{ - attr = { alt = label, title = label }, - static = "icons/16/thumb_up_arrow.png" - } + elseif initiative.member_info.directly_supported then + if initiative.member_info.satisfied then + local label = _"You are supporter of this initiative" + ui.image{ + attr = { alt = label, title = label }, + static = "icons/16/thumb_up_green.png" + } + else + local label = _"You are potential supporter of this initiative" + ui.image{ + attr = { alt = label, title = label }, + static = "icons/16/thumb_up.png" + } + end + elseif initiative.member_info.supported then + if initiative.member_info.satisfied then + local label = _"You are supporter of this initiative via delegation" + ui.image{ + attr = { alt = label, title = label }, + static = "icons/16/thumb_up_green_arrow.png" + } + else + local label = _"You are potential supporter of this initiative via delegation" + ui.image{ + attr = { alt = label, title = label }, + static = "icons/16/thumb_up_arrow.png" + } + end end - end - end } - + end } + end + ui.container{ attr = { class = "name" }, content = function() local link_class = "initiative_link" if initiative.revoked then