Commit 232539cd authored by Fabián Rodríguez's avatar Fabián Rodríguez

remove unused helpers

parent c5be6be3
......@@ -44,14 +44,6 @@ module ApplicationHelper
without_close_html + link_to(image_tag('deletelabel.png'), "#", :class => 'close')
end
def diaspora_id_host
User.diaspora_id_host
end
def modernizer_responsive_tag
javascript_tag("Modernizr.mq('(min-width:0)') || document.write(unescape('#{j javascript_include_tag("mbp-respond.min")}'));")
end
# Require jQuery from CDN if possible, falling back to vendored copy, and require
# vendored jquery_ujs
def jquery_include_tag
......
......@@ -3,39 +3,6 @@
# the COPYRIGHT file.
module AspectGlobalHelper
def aspects_with_post(aspects, post)
aspects.select do |aspect|
AspectVisibility.exists?(:aspect_id => aspect.id, :shareable_id => post.id, :shareable_type => 'Post')
end
end
def aspect_links(aspects, opts={})
str = ""
aspects.each do |aspect|
str << '<li>'
str << link_for_aspect(aspect, :params => opts, 'data-guid' => aspect.id).html_safe
str << '</li>'
end
str.html_safe
end
def link_for_aspect(aspect, opts={})
opts[:params] ||= {}
params ||= {}
opts[:params] = opts[:params].merge("a_ids[]" => aspect.id, :created_at => params[:created_at])
opts['data-guid'] = aspect.id
link_to aspect.name, aspects_path( opts[:params] ), opts
end
def aspect_or_all_path(aspect)
if @aspect.is_a? Aspect
aspect_path @aspect
else
aspects_path
end
end
def aspect_membership_dropdown(contact, person, hang, aspect=nil)
selected_aspects = all_aspects.select{|aspect| contact.in_aspect?(aspect)}
......
......@@ -3,14 +3,6 @@
# the COPYRIGHT file.
module AspectsHelper
def remove_link(aspect)
if aspect.contacts.size == 0
link_to I18n.t('aspects.helper.remove'), aspect, :method => :delete, :confirm => I18n.t('aspects.helper.are_you_sure')
else
"<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>"
end
end
def add_to_aspect_button(aspect_id, person_id)
link_to image_tag('icons/monotone_plus_add_round.png'),
{:controller => 'aspect_memberships',
......
......@@ -39,14 +39,6 @@ module InterimStreamHackinessHelper
end
end
def what_stream_sentence(post)
from_group(post).map{|x| I18n.t("streams.#{x.to_s}")}.to_sentence
end
def stream_settings_link(post)
link_to "", "#{edit_user_path}#stream-preferences"
end
def publisher_open
if defined?(@stream)
@stream.publisher.open?
......
module InvitationCodesHelper
def invite_welcome_message
if invite.present?
content_tag(:div, :class => 'media well') do
person_image_link(invite.user.person, :class => 'img') +
content_tag(:div, :class => 'bd') do
I18n.translate('invitation_codes.excited', :name => invite.user_name)
end
end
end
end
def invite_hidden_tag(invite)
if invite.present?
hidden_field_tag 'invite[token]', invite.token
......
......@@ -54,10 +54,6 @@ module NotificationsHelper
object_link(note, notification_people_link(note))
end
def peoples_names(note)
note.actors.map{|p| p.name}.join(", ")
end
def the_day(i18n)
i18n[0].match(/\d/) ? i18n[0].gsub('.', '') : i18n[1].gsub('.', '')
end
......
......@@ -23,12 +23,4 @@ module NotifierHelper
text = process_newlines(text) if opts[:process_newlines]
text
end
def invite_email_title
if @inviter.present?
I18n.t 'notifier.invited_you', :name => @inviter.person.name
else
I18n.t 'notifier.accept_invite'
end
end
end
......@@ -3,18 +3,10 @@
# the COPYRIGHT file.
module PublisherHelper
def public_value
params[:controller] == "tags" || params[:controller] == "posts"
end
def remote?
params[:controller] != "tags"
end
def public_helper_text
(public_value)? t('javascripts.publisher.public'): t('javascripts.publisher.limited')
end
def all_aspects_selected?(selected_aspects)
@all_aspects_selected ||= all_aspects.size == selected_aspects.size
end
......
......@@ -6,8 +6,4 @@ module UsersHelper
def owner_image_link
person_image_link(current_user.person, :size => :thumb_small)
end
def mine?(post)
current_user.owns? post
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment