1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-if publisher_explain
:javascript
$(document).ready(function() {
if( app.publisher ) app.publisher.triggerGettingStarted();
});
#publisher{:class => ((aspect == :profile || publisher_open) ? "mention_popup" : "closed")}
.content_creation
= form_for(StatusMessage.new) do |status|
= status.error_messages
%div
%params
#publisher_textarea_wrapper
= link_to(content_tag(:div, nil, :class => 'icons-deletelabel'), "#", :id => "hide_publisher", :title => t('shared.publisher.discard_post'))
%ul#photodropzone
- if current_user.getting_started?
= status.text_area :fake_text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => "#{t('contacts.index.start_a_conversation')}...",
:title => popover_with_close_html( '1. ' + t('shared.public_explain.share') ),
'data-content' => t('shared.public_explain.new_user_welcome_message')
- else
= status.text_area :fake_text, :rows => 2, :value => h(publisher_formatted_text), :tabindex => 1, :placeholder => "#{t('contacts.index.start_a_conversation')}..."
= status.hidden_field :text, :value => h(publisher_hidden_text), :class => 'clear_on_submit'
%span#publisher-images
%span.markdownIndications
!= t('shared.publisher.formatWithMarkdown', markdown_link: link_to(t('help.markdown'), 'https://diasporafoundation.org/formatting', target: :blank))
#poll_creator.btn{:title => t('shared.publisher.poll.add_a_poll')}
%i.entypo.bar-graph{:class => "publisher_image"}
#locator.btn{:title => t('shared.publisher.get_location')}
= image_tag 'icons/marker.png', :alt => t('shared.publisher.get_location').titleize, :class => 'publisher_image'
#file-upload.btn{:title => t('shared.publisher.upload_photos')}
= image_tag 'icons/camera.png', :alt => t('shared.publisher.upload_photos').titleize, :class => 'publisher_image'
= hidden_field :location, :coords
#location_container
#poll_creator_container
- if publisher_public
= hidden_field_tag 'aspect_ids[]', "public"
- elsif all_aspects_selected?(selected_aspects)
= hidden_field_tag 'aspect_ids[]', "all_aspects"
- else
- for aspect_id in aspect_ids
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
#publisher_spinner{:class => 'hidden'}
= image_tag 'ajax-loader.gif'
.options_and_submit
.public_toggle
%span#publisher_service_icons
- if current_user.services
- for service in current_user.services
= content_tag :div, nil,
:title => "#{service.provider.titleize} (#{service.nickname})",
:class => "social_media_logos-#{service.provider}-16x16 service_icon dim",
:id => "#{service.provider}",
:maxchar => "#{service.class::MAX_CHARACTERS}",
:data => {:toggle=>'tooltip', :placement=>'bottom'}
%a{ :href => "#question_mark_pane", :class => 'question_mark', :rel => 'facebox', :title => t('shared.public_explain.manage') }
.icons-monotone_wrench_settings
.dropdown{ ! current_user.getting_started? ? {:class => "hang_right"} : { :class => "hang_right", :title => popover_with_close_html("2. #{t('shared.public_explain.control_your_audience')}"), 'data-content'=> t('shared.public_explain.visibility_dropdown')} }
.button.toggle.publisher
- if publisher_public
%i#visibility-icon.entypo.small.globe
%span.text
= t('public')
- else
%i#visibility-icon.entypo.small.lock
%span.text
- if all_aspects_selected?(selected_aspects)
= t('all_aspects')
- elsif selected_aspects.size == 1
= selected_aspects.first.name
- else
= t('shared.aspect_dropdown.toggle', :count => selected_aspects.size)
▼
.wrapper
%ul.dropdown_list{:unSelectable => 'on', 'data-person_id' => (person.id if defined?(person) && person), 'data-service_uid' => (service_uid if defined?(service_uid))}
%li.public.radio{"data-aspect_id" => "public", :class => ("selected" if publisher_public)}
= t('public')
%li.divider.all_aspects.radio{:style => "padding-bottom: 5px; border-bottom: 1px solid #ddd;", "data-aspect_id" => "all_aspects", :class => ("selected" if (!publisher_public && all_aspects_selected?(selected_aspects)))}
= t('all_aspects')
- for aspect in all_aspects
= aspect_dropdown_list_item(aspect, !all_aspects_selected?(selected_aspects) && selected_aspects.include?(aspect) )
%button{ :disabled => ("disabled" if publisher_hidden_text.blank?), :class => 'button post_preview_button'}
= t('shared.publisher.preview')
= status.submit t('shared.publisher.share'), :disabled => publisher_hidden_text.blank?, :class => 'button creation', :tabindex => 2
.facebox_content
#question_mark_pane
= render 'shared/public_explain'
= link_to '', contacts_path(:aspect_ids => aspect_ids), :class => 'selected_contacts_link hidden'
#publisher_photo_upload
|