diaspora/app/views/shared/_publisher.haml

37 lines
1.1 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
:javascript
$("div.public_toggle input").live("click", function(evt){
if("#{@logged_in}" == "false" && $(this).attr('checked') == true){
$(".question_mark").click();
};
});
#publisher
= owner_image_tag
= form_for StatusMessage.new, :remote => true do |f|
= f.error_messages
%p
= f.label :message, "Post a message to #{@aspect}"
= f.text_area :message, :rows => 2, :value => params[:prefill]
= f.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id)
- if @aspect == :all
.public_toggle
= f.check_box( :public, :value => false )
make public
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
.fancybox_content
#question_mark_pane
= render 'shared/public_explain'
- if @aspect == :all
= f.submit t('.share'), :title => "Share with all aspects"
- else
= f.submit t('.share'), :title => "Share with #{@aspect.name}"