From ccecf32f9b631fb4079069a2b3a12de0885d440f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Sch=C3=B6lling?= Date: Fri, 29 Jul 2011 20:03:06 +0200 Subject: [PATCH] Show aspect title if message is posted only to one aspect --- app/views/shared/_stream_element.html.haml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 4caa6130c..98395e602 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -43,12 +43,18 @@ - else - if post.author.owner_id == current_user.id %span.post_scope{:title => t('.shared_with', :aspect_names => aspects_with_post(all_aspects, post).map!{|a| a.name}.join(', '))} - = t('limited') - (#{aspects_with_post(all_aspects, post).size}) + - if aspects_with_post(all_aspects, post).size == 1 + = aspects_with_post(all_aspects, post).first + - else + = t('limited') + (#{aspects_with_post(all_aspects, post).size}) - else %span.post_scope - = t('limited') - (#{aspects_with_post(all_aspects, post).size}) + - if aspects_with_post(all_aspects, post).size == 1 + = aspects_with_post(all_aspects, post).first + - else + = t('limited') + (#{aspects_with_post(all_aspects, post).size}) ยท %span.via