Delete more unused helpers

This commit is contained in:
Emi Matchu 2023-11-11 15:55:38 -08:00
parent fb4e967ea1
commit 75a23dfc57
3 changed files with 0 additions and 51 deletions

View file

@ -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

View file

@ -26,23 +26,6 @@ module ItemsHelper
link_to(image, items_path(:q => query))
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)

View file

@ -10,31 +10,6 @@ module OutfitsHelper
:user_link => link_to(user.name, user_contributions_path(user)),
: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'