<% if can? :create, new_post(receiver) %>
<% SocialStream.activity_forms.each do |element| %> <%= render :partial => element.to_s.pluralize+'/new_activity', :locals => { :receiver => receiver } %> <% end %> <%= javascript_tag do %> $(function(){ activate_anti_rebounds(); }); <% end %>
<% SocialStream.activity_forms.each do |element| %>
<%= t("#{ element }.form.title") %>
<% end %>
<% if current_subject == receiver %> <%= javascript_tag do %> var relation_public = <%= Relation::Public.instance.id %>; var public_selected = false; var relation_options = <%= escape_javascript(current_subject.activity_relations(receiver).sort.map{ |r| r.id }.to_json) %>; var relation_public_pos = 0; for(id in relation_options){ if(relation_options[id]==relation_public){ break; }else{ relation_public_pos++; } } //For security with check "var default_security_width = '100px';" in activities.js.erb <% end %> <%= select_tag :_relation_ids, options_for_select(current_subject.activity_relations(receiver).sort.map{ |r| [ r.name, r.id ] }), :id => 'security', :multiple => true, :title => t("activity.privacy.myself.contacts.#{ receiver.class.to_s.underscore }") %> <% else %>
<% end %>
<%= submit_tag(t('share'), :class => "button submitActivity", :id => "masterSubmitButton") %>
<% end %>