refactor outfits.new for hierarchy

This commit is contained in:
Emi Matchu 2013-01-09 18:40:35 -06:00
parent 0ae6762bf5
commit 7aa49f70be
4 changed files with 94 additions and 71 deletions

View file

@ -6,7 +6,7 @@ module OutfitsHelper
def latest_contribution_description(contribution)
user = contribution.user
contributed = contribution.contributed
t 'outfits.new.latest_contribution_description_html',
t 'outfits.new.latest_contribution.description_html',
:user_link => link_to(user.name, user_contributions_path(user)),
:contributed_description => contributed_description(contributed, false)
end

View file

@ -15,18 +15,18 @@
= origin_tag root_path
= destination_tag 'wardrobe'
%fieldset
%legend= t '.load_pet_legend'
%legend= t '.load_pet.legend'
= pet_name_tag :id => 'main-pet-name'
%button{:type => "submit"}
= t '.load_pet_submit'
= t '.load_pet.submit'
= form_tag wardrobe_path, :method => 'get', :id => 'start-from-scratch' do
- localized_cache :action_suffix => 'start_from_scratch_form_content' do
%fieldset
%legend= t '.start_from_scratch_legend'
%legend= t '.start_from_scratch.legend'
= pet_attribute_select 'color', @colors, 8
= pet_attribute_select 'species', @species
%input{:type => "submit", :value => t('.start_from_scratch_submit')}
%input{:type => "submit", :value => t('.start_from_scratch.submit')}
%ul#sections
- localized_cache :action_suffix => 'your_items_module' do
@ -34,40 +34,40 @@
= link_to image_tag('your_items.png'), your_items_path
%h3= link_to t('your_items'), your_items_path
%div
%h4= t '.your_items_tagline'
%p= t '.your_items_description'
%h4= t '.your_items.tagline'
%p= t '.your_items.description'
= form_tag users_path, :method => 'get' do
= text_field_tag 'name', '', :type => 'search',
:placeholder => t('.your_items_user_search_placeholder')
= submit_tag t('.your_items_user_search_submit')
:placeholder => t('.your_items.user_search.placeholder')
= submit_tag t('.your_items.user_search.submit')
- localized_cache :action_suffix => 'infinite_closet_module' do
%li
= link_to image_tag('items.png'), items_path
%h3= link_to t('infinite_closet'), items_path
%div
%h4= t '.infinite_closet_tagline'
%p= t '.infinite_closet_description'
%h4= t '.infinite_closet.tagline'
%p= t '.infinite_closet.description'
= form_tag items_path, :method => 'get' do
= text_field_tag 'q', '', :type => 'search',
:placeholder => t('.infinite_closet_item_search_placeholder')
= submit_tag t('.infinite_closet_item_search_submit')
:placeholder => t('.infinite_closet.item_search.placeholder')
= submit_tag t('.infinite_closet.item_search.submit')
%li
= link_to bulk_pets_path do
= image_tag 'http://images.neopets.com/items/mall_ac_garland_spotlight.gif'
%h3= link_to t('modeling_hub'), bulk_pets_path
%div
%h4= t '.modeling_hub_tagline'
%p= t '.modeling_hub_description'
%h4= t '.modeling_hub.tagline'
%p= t '.modeling_hub.description'
= form_tag load_pet_path do
= origin_tag root_path
= pet_name_tag :placeholder => t('.modeling_hub_load_pet_placeholder')
= submit_tag t('.modeling_hub_load_pet_submit')
= pet_name_tag :placeholder => t('.modeling_hub.load_pet.placeholder')
= submit_tag t('.modeling_hub.load_pet.submit')
- localized_cache 'outfits#new latest_contribution' do
#latest-contribution
= link_to t('.latest_contribution_header'), contributions_path, :id => 'recent-contributions-link'
= link_to t('.latest_contribution.header'), contributions_path, :id => 'recent-contributions-link'
= latest_contribution_description(@latest_contribution)
%abbr#latest-contribution-created-at{:title => @latest_contribution.created_at.getutc.iso8601}
@ -78,11 +78,11 @@
%h2
%div
%a#blog-preview-linkback{:href => 'http://blog.openneo.net/'}
= t '.blog_linkback'
= t '.blog.link'
- localized_cache 'outfits#new newest_items' do
#newest-items
%h2= t '.newest_items_header'
%h2= t '.newest_items.header'
%ul
- @newest_items.each do |item|
= link_to image_tag(item.thumbnail_url), item

View file

@ -590,31 +590,43 @@ en-meep:
new:
tagline: Meeps made meepy!
load_pet_legend: Enter your pet's meep
load_pet_submit: Meep my outfit!
start_from_scratch_legend: Or meep from scratch
start_from_scratch_submit: Meep
your_items_tagline: Meep and meep!
your_items_description:
Meep lists of the items you own and want, and meep them with the world.
your_items_user_search_placeholder: meep a user…
your_items_user_search_submit: meep
infinite_closet_tagline: Meeping for something?
infinite_closet_description: Take a meep through our wearables meep!
infinite_closet_item_search_placeholder: meep an item…
infinite_closet_item_search_submit: meep
modeling_hub_tagline: Found somemeep?
modeling_hub_description:
load_pet:
legend: Enter your pet's meep
submit: Meep my outfit!
start_from_scratch:
legend: Or meep from scratch
submit: Meep
your_items:
tagline: Meep and meep!
description:
Meep lists of the items you own and want, and meep them with the
world.
user_search:
placeholder: meep a user…
submit: meep
infinite_closet:
tagline: Meeping for something?
description: Take a meep through our wearables meep!
item_search:
placeholder: meep an item…
submit: meep
modeling_hub:
tagline: Found somemeep?
description:
Meep a pet's meep here and we'll meep a meep of what it's wearing.
Thanks so meep!
modeling_hub_load_pet_placeholder: meep a pet…
modeling_hub_load_pet_submit: meep
latest_contribution_header: Contribumeeps
latest_contribution_description_html:
load_pet:
placeholder: meep a pet…
submit: meep
latest_contribution:
header: Contribumeeps
description_html:
"%{user_link} meeped us %{contributed_description}.
Meep, %{user_link}!"
blog_linkback: OpenNeo Meep
newest_items_header: New Meeps
blog:
link: OpenNeo Meep
newest_items:
header: New Meeps
show:
default_outfit_name: Meeped outfit

View file

@ -609,32 +609,43 @@ en:
new:
tagline: Neopets wearables made easy!
load_pet_legend: Enter your pet's name
load_pet_submit: Plan my outfit!
start_from_scratch_legend: Or start from scratch
start_from_scratch_submit: Go
your_items_tagline: Track and trade!
your_items_description:
load_pet:
legend: Enter your pet's name
submit: Plan my outfit!
start_from_scratch:
legend: Or start from scratch
submit: Go
your_items:
tagline: Track and trade!
description:
Make lists of the items you own and want,
and share them with the world.
your_items_user_search_placeholder: find a user…
your_items_user_search_submit: search
infinite_closet_tagline: Looking for something?
infinite_closet_description: Take a look through our wearables database!
infinite_closet_item_search_placeholder: find an item…
infinite_closet_item_search_submit: search
modeling_hub_tagline: Found something?
modeling_hub_description:
user_search:
placeholder: find a user…
submit: search
infinite_closet:
tagline: Looking for something?
description: Take a look through our wearables database!
item_search:
placeholder: find an item…
submit: search
modeling_hub:
tagline: Found something?
description:
Enter a pet's name here and we'll keep a copy of what it's wearing.
Thanks so much!
modeling_hub_load_pet_placeholder: model a pet…
modeling_hub_load_pet_submit: submit
latest_contribution_header: Contributions
latest_contribution_description_html:
load_pet:
placeholder: model a pet…
submit: submit
latest_contribution:
header: Contributions
description_html:
"%{user_link} showed us %{contributed_description}.
Thanks, %{user_link}!"
blog_linkback: OpenNeo Blog
newest_items_header: New Items
blog:
link: OpenNeo Blog
newest_items:
header: New Items
show:
default_outfit_name: Shared outfit