liquid_feedback_frontend
diff app/main/member/show.lua @ 61:f77ca23f9ebd
merge
author | jbe |
---|---|
date | Thu Apr 22 16:03:53 2010 +0200 (2010-04-22) |
parents | 4f39f0a0d5b5 |
children | 733f65c0c0a0 |
line diff
1.1 --- a/app/main/member/show.lua Tue Apr 20 10:19:37 2010 +0200 1.2 +++ b/app/main/member/show.lua Thu Apr 22 16:03:53 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{