diaspora/app/views/shared/_publisher.haml
2011-01-18 10:51:05 -08:00

58 lines
2.2 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.
#publisher{:class => ("closed" unless params[:op] || params[:prefill])}
#click_to_share
= image_tag 'icons/doc_edit.png'
= publisher_description(@aspect_ids.count, aspect)
.content_creation
= form_for(StatusMessage.new, :remote => true) do |status|
= status.error_messages
#file-upload
= image_tag 'icons/photos.png'
%br
= t('.add_photos')
%p
%params
#publisher_textarea_wrapper
%ul#photodropzone
= status.text_area :message, :rows => 2, :value => h(params[:prefill])
= javascript_tag "if ($('textarea#status_message_message').val() != ''){ $('textarea#status_message_message').focus();}"
- for aspect_id in @aspect_ids
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
.options_and_submit
.right
#fileInfo
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
- if aspect == :all
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting'), :class => 'button'
- else
= status.submit t('.share'), :disable_with => t('.posting'), :class => 'button'
- if aspect == :all
.public_toggle
%p.checkbox_select
= status.check_box( :public, {:title => t('.make_public')}, true, false)
%span#publisher_service_icons.dim
= link_to (image_tag "social_media_logos/feed-16x16.png", :title => "RSS"), current_user.public_url
- if current_user.services
- for service in current_user.services
= image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider
= link_to '(?)', "#question_mark_pane", :class => 'question_mark', :style=>"display:none;", :rel => 'facebox'
.facebox_content
#question_mark_pane
= render 'shared/public_explain'
#publisher_photo_upload
= render 'photos/new_photo', :aspect_ids => @aspect_ids.join(',')