Delete more unused helpers
This commit is contained in:
parent
fb4e967ea1
commit
75a23dfc57
3 changed files with 0 additions and 51 deletions
|
@ -1,9 +0,0 @@
|
|||
module CampaignsHelper
|
||||
def emote_md(text)
|
||||
text = text.
|
||||
gsub(/:\)/, image_tag('emoticons/smiley.gif')).
|
||||
gsub(/:D/, image_tag('emoticons/grin.gif')).
|
||||
gsub(/:P/, image_tag('emoticons/tongue.gif'))
|
||||
md text
|
||||
end
|
||||
end
|
|
@ -27,23 +27,6 @@ module ItemsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def standard_species_images_for(pet_types_by_species_id)
|
||||
pet_types_by_species_id.to_a.sort_by { |s, pt| s.name }.map { |species, pet_types|
|
||||
pet_type_images = pet_types.map { |pet_type|
|
||||
image = pet_type_image(pet_type, :happy, :face)
|
||||
content_tag(:li, image, 'class' => 'pet-type',
|
||||
'data-id' => pet_type.id,
|
||||
'data-body-id' => pet_type.body_id,
|
||||
'data-color-id' => pet_type.color.id,
|
||||
'data-color-name' => pet_type.color.name,
|
||||
'data-species-id' => pet_type.species.id,
|
||||
'data-species-name' => pet_type.species.name)
|
||||
}.join.html_safe
|
||||
content_tag(:li, content_tag(:ul, pet_type_images),
|
||||
'data-id' => species.id)
|
||||
}.join.html_safe
|
||||
end
|
||||
|
||||
def closet_list_verb(owned)
|
||||
ClosetHanger.verb(:you, owned)
|
||||
end
|
||||
|
|
|
@ -11,31 +11,6 @@ module OutfitsHelper
|
|||
:contributed_description => contributed_description(contributed, false)
|
||||
end
|
||||
|
||||
def search_helper(filter, standard_key)
|
||||
key = translate("#{filter}.key")
|
||||
default_value = translate("#{filter}.default_value")
|
||||
content_tag :span, default_value, :class => 'search-helper',
|
||||
'data-search-filter-key' => standard_key,
|
||||
'data-search-filter-name' => key
|
||||
end
|
||||
|
||||
def search_query_description(base, standard_key)
|
||||
translate "#{base}.description_html",
|
||||
:default_value => search_helper("#{base}.filter", standard_key)
|
||||
end
|
||||
|
||||
def search_query_with_helper(base, standard_key)
|
||||
translate "#{base}.query_html",
|
||||
:filter_key => content_tag(:span, translate("#{base}.filter.key")),
|
||||
:filter_value => search_helper("#{base}.filter", standard_key)
|
||||
end
|
||||
|
||||
def search_query(translation_key, filter_key)
|
||||
base = "outfits.edit.search.examples.#{translation_key}"
|
||||
content_tag(:dt, search_query_with_helper(base, filter_key)) +
|
||||
content_tag(:dd, search_query_description(base, filter_key))
|
||||
end
|
||||
|
||||
def render_predicted_missing_species_by_color(species_by_color)
|
||||
key_prefix = 'outfits.new.newest_items.unmodeled.content'
|
||||
|
||||
|
|
Loading…
Reference in a new issue