liquid_feedback_frontend

diff app/main/member/show.lua @ 57:4f39f0a0d5b5

Listing of updated drafts on start page; Code cleanup; Minor bugfix

MOTD, initiator invite, issues to vote and listing of updated drafts shown as tabs on start page;
Bugfix: Initiator icon only shown when initiatorship has been accepted
author bsw
date Sat Apr 17 21:59:02 2010 +0200 (2010-04-17)
parents 00d1004545f1
children 733f65c0c0a0
line diff
     1.1 --- a/app/main/member/show.lua	Fri Apr 16 14:51:30 2010 +0200
     1.2 +++ b/app/main/member/show.lua	Sat Apr 17 21:59:02 2010 +0200
     1.3 @@ -13,11 +13,12 @@
     1.4  
     1.5  slot.put_into("title", encode.html(_"Member '#{member}'":gsub("#{member}", member.name)))
     1.6  
     1.7 -if member.id ~= app.session.member.id then
     1.8 -  --TODO performance
     1.9 -  local contact = Contact:by_pk(app.session.member.id, member.id)
    1.10 -  if contact then
    1.11 -    slot.select("actions", function()
    1.12 +slot.select("actions", function()
    1.13 +  if member.id == app.session.member.id then
    1.14 +  else
    1.15 +    --TODO performance
    1.16 +    local contact = Contact:by_pk(app.session.member.id, member.id)
    1.17 +    if contact then
    1.18        ui.container{
    1.19          attr = { class = "interest" },
    1.20          content = _"You have saved this member as contact."
    1.21 @@ -38,9 +39,7 @@
    1.22            }
    1.23          }
    1.24        }
    1.25 -    end)
    1.26 -  else
    1.27 -    slot.select("actions", function()
    1.28 +    else
    1.29        ui.link{
    1.30          image   = { static = "icons/16/book_add.png" },
    1.31          text    = _"Add to my contacts",
    1.32 @@ -57,9 +56,9 @@
    1.33            }
    1.34          }
    1.35        }
    1.36 -    end)
    1.37 +    end
    1.38    end
    1.39 -end
    1.40 +end)
    1.41  
    1.42  slot.select("actions", function()
    1.43    ui.link{

Impressum / About Us