From 8d94115bbcd317f59ffc9acdb45b4db5396c5401 Mon Sep 17 00:00:00 2001 From: Ilyaaaaaaaaaaaaa Zhitomirskiy Date: Wed, 6 Jul 2011 16:04:43 -0700 Subject: [PATCH] added the start conversation button back with a message if you try to add more than 16 people --- app/views/contacts/index.html.haml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/contacts/index.html.haml b/app/views/contacts/index.html.haml index 5c7714eb8..f0b9970e0 100644 --- a/app/views/contacts/index.html.haml +++ b/app/views/contacts/index.html.haml @@ -9,6 +9,8 @@ - content_for :head do = include_javascripts :people + + #section_header %h2 = t('.title') @@ -20,7 +22,13 @@ #people_stream.stream.contacts - if @aspect_ #aspect_controls - /= link_to t('.start_a_conversation'), new_conversation_path(:aspect_id => @aspect_.id, :name => @aspect_.name), :class => "button conversation_button", :rel => "facebox" + - suggested_limit = 16 + - conv_opts = { :class => "button conversation_button", :rel => "facebox"} + - conv_opts[:title] = "Are you sure you want to start a private conversation with more than #{suggested_limit} contacts? Posting to this aspect may be a better way to contact them." if @contacts.size > suggested_limit + + = link_to t('.start_a_conversation'), new_conversation_path(:aspect_id => @aspect_.id, :name => @aspect_.name), conv_opts + - if @contacts.size > suggested_limit + = javascript_tag "$('.conversation_button').tipsy({trigger: 'hover', gravity: 'n'});" = link_to t('.edit_aspect', :name => @aspect_.name), edit_aspect_path(@aspect_), :rel => "facebox" - if @contacts.size > 0