Module: PublisherHelper

Defined in:
app/helpers/publisher_helper.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Instance Method Summary collapse

Instance Method Details

#all_aspects_selected?(selected_aspects) ⇒ Boolean


10
11
12
# File 'app/helpers/publisher_helper.rb', line 10

def all_aspects_selected?(selected_aspects)
  @all_aspects_selected ||= all_aspects.size == selected_aspects.size
end

#remote?Boolean


6
7
8
# File 'app/helpers/publisher_helper.rb', line 6

def remote?
  params[:controller] != "tags"
end

#service_button(service) ⇒ Object


14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/helpers/publisher_helper.rb', line 14

def service_button(service)
   :div,
              :class => "btn btn-link service_icon dim",
              :title => "#{service.provider.titleize} (#{service.nickname})",
              :id => "#{service.provider}",
              :maxchar => "#{service.class::MAX_CHARACTERS}",
              :data  => {:toggle=>'tooltip', :placement=>'bottom'} do
    if service.provider == 'wordpress'
      (:span, '', :class => "social_media_logos-wordpress-16x16")
    else
      (:i, '', :class => "entypo small #{ service.provider }")
    end
  end
end