app/views/ties/_suggestions.html.erb in social_stream-0.0.5 vs app/views/ties/_suggestions.html.erb in social_stream-0.1.0

- old
+ new

@@ -1,16 +1,20 @@ -<% content_for :javascript do %> - $(".suggestions .tie_close").livequery("click",function(){ - $(this).parents(".tie").replaceWith("<%= escape_javascript(render(current_user.suggestion))%>"); - }); -<% end %> +<% if current_user.suggestion.present? %> + <% content_for :javascript do %> + $(".suggestions .tie_close").livequery("click",function(){ + $(this).parents(".tie").replaceWith("<%= escape_javascript(render(current_user.suggestion))%>"); + }); + <% end %> -<div class="suggestions_header"> - <%= image_tag('notifications.png', :class => "suggestion_icon") %> - <div class="suggestion_text_header"> - <%=t('tie.suggestion.one') %> - </div> -</div> -<div class="suggestions"> - <%= render current_user.suggestions(2) %> -</div> + <div class="suggestions_header"> + <%= image_tag('btn/notifications.png', :class => "suggestion_icon") %> + <div class="suggestion_text_header"> + <%=t('tie.suggestion.one') %> + </div> + </div> + <div class="suggestions"> + <% if (sgs = current_user.suggestions(2)).present? %> + <%= render sgs %> + <% end %> + </div> +<% end %>