1
0
Fork 0
forked from OpenNeo/impress

refactor items.show for hierarchy and twl

This commit is contained in:
Emi Matchu 2013-01-09 18:05:06 -06:00
parent 04679bfd00
commit abd327f08e
3 changed files with 78 additions and 66 deletions

View file

@ -9,17 +9,17 @@
= nc_icon_for(@item)
- unless @item.rarity.blank?
== #{t '.rarity'}: #{@item.rarity_index} (#{@item.rarity})
= link_to t('.jn_items'), jn_items_url_for(@item)
= link_to t('.resources.jn_items'), jn_items_url_for(@item)
- unless @item.nc?
= link_to t('.shop_wizard'), shop_wizard_url_for(@item)
= link_to t('.super_shop_wizard'), super_shop_wizard_url_for(@item)
= link_to t('.trading_post'), trading_post_url_for(@item)
= link_to t('.auction_genie'), auction_genie_url_for(@item)
= link_to t('.resources.shop_wizard'), shop_wizard_url_for(@item)
= link_to t('.resources.super_shop_wizard'), super_shop_wizard_url_for(@item)
= link_to t('.resources.trading_post'), trading_post_url_for(@item)
= link_to t('.resources.auction_genie'), auction_genie_url_for(@item)
- if user_signed_in?
#closet-hangers
%h3
= t '.hangers_header_html',
= t '.closet_hangers.header_html',
:user_items_link => link_to(t('your_items'),
user_closet_hangers_path(current_user))
= form_tag update_quantities_user_item_closet_hangers_path(:user_id => current_user, :item_id => @item), :method => :put do
@ -43,20 +43,21 @@
t('closet_lists.unlisted_name'),
:class => 'unlisted'
- else
= label_tag "quantity[#{owned}]", t('.quantity_label')
= submit_tag t('.submit_hangers')
= label_tag "quantity[#{owned}]",
t('.closet_hangers.quantity_label')
= submit_tag t('.closet_hangers.submit')
- localized_cache "items/#{@item.id} info" do
%p= @item.description
#item-zones
%p
%strong #{t '.occupied_zones_header'}:
%strong #{t '.zones.occupied_header'}:
= list_zones @item.occupied_zones, :uncertain_label
%p
%strong #{t '.restricted_zones_header'}:
%strong #{t '.zones.restricted_header'}:
- if @item.restricted_zones.empty?
= t '.no_restricted_zones'
= t '.zones.none'
- else
= list_zones @item.restricted_zones
@ -72,34 +73,33 @@
- localized_cache 'items#show preview_header' do
#item-preview-header
%h3= t '.preview_header'
= link_to t('.customize_more'), root_path, :id => 'customize-more',
%h3= t '.preview.header'
= link_to t('.preview.customize_more'), root_path, :id => 'customize-more',
:class => 'button'
#item-preview
#item-preview-species= standard_species_images_for(@item)
#item-preview-error
#item-preview-swf= t '.preview_requirements_not_met'
#item-preview-swf= t '.preview.requirements_not_met'
- localized_cache "items/#{@item.id} contributors" do
- unless @contributors_with_counts.empty?
#item-contributors
%header #{t '.contributors_header'}:
%header #{t '.contributors.header'}:
%ul
- @contributors_with_counts.each do |contributor, count|
%li= link_to(contributor.name, user_contributions_path(contributor)) + format_contribution_count(count)
%footer= t '.contributors_footer'
%footer= t '.contributors.footer'
:javascript
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
IMPRESS_HOST = #{RemoteImpressHost.inspect};
%script#swf-assets-not-found-template{:type => 'text/x-jquery-tmpl'}
= t '.swf_assets_not_found_html', :item_name => h(@item.name),
= twl '.preview.not_found', :item_name => h(@item.name),
:species_name => '${species_name}',
:color_name => '${color_name}',
:modeling_link => link_to(t('.swf_assets_not_found_modeling_link_content'),
root_path)
:modeling_link_url => root_path
- content_for :javascripts do
= include_javascript_libraries :jquery, :swfobject, :jquery_tmpl

View file

@ -283,17 +283,20 @@ en-meep:
show:
rarity: Meepity
resources:
jn_items: JN Meepits
shop_wizard: Meep Wizard
super_shop_wizard: Meeper Wizard
trading_post: Treeps
auction_genie: Aucteeps
hangers_header_html: Meep this in %{user_items_link}
closet_hangers:
header_html: Meep this in %{user_items_link}
quantity_label: How meepy?
submit_hangers: Save to Your Meeps
occupied_zones_header: Occupeeps
restricted_zones_header: Restreeps
no_restricted_zones: Meepless
submit: Save to Your Meeps
zones:
occupied_header: Occupeeps
restricted_header: Restreeps
none: Meepless
trading_closet_hangers:
header:
owned:
@ -306,17 +309,20 @@ en-meep:
other: "%{count} users meep this item:"
show_more: meep more
show_less: meep less
preview_header: Meepview
preview:
header: Meepview
customize_more: Customize meep
preview_requirements_not_met:
requirements_not_met:
Javascript and Flash are required to preview meepits. Meep!
contributors_header: Meeped to you by
contributors_footer: Meep!
swf_assets_not_found_html:
not_found:
main_html:
We've never meeped the %{item_name} on the %{color_name}
%{species_name} before. Have you? If so, please %{modeling_link} and
we'll meep our datameep instantly. Meep!
swf_assets_not_found_modeling_link_content: meep it for us
modeling_link_content: meep it for us
contributors:
header: Meeped to you by
footer: Meep!
neopets_pages:
create:

View file

@ -284,17 +284,20 @@ en:
show:
rarity: Rarity
resources:
jn_items: JN Items
shop_wizard: Shop Wizard
super_shop_wizard: Super Wizard
trading_post: Trades
auction_genie: Auctions
hangers_header_html: Track this in %{user_items_link}
closet_hangers:
header_html: Track this in %{user_items_link}
quantity_label: How many?
submit_hangers: Save to Your Items
occupied_zones_header: Occupies
restricted_zones_header: Restricts
no_restricted_zones: None
submit: Save to Your Items
zones:
occupied_header: Occupies
restricted_header: Restricts
none: None
trading_closet_hangers:
header:
owned:
@ -307,17 +310,20 @@ en:
other: "%{count} users want this item:"
show_more: more
show_less: less
preview_header: Preview
preview:
header: Preview
customize_more: Customize more
preview_requirements_not_met:
Javascript and Flash are required to preview wearables. Sorry!
contributors_header: Brought to you by
contributors_footer: Thanks!
swf_assets_not_found_html:
requirements_not_met:
Javascript and Flash are required to preview wearables.
not_found:
main_html:
We've never seen the %{item_name} on the %{color_name}
%{species_name} before. Have you? If so, please %{modeling_link} and
we'll update our database instantly. Thanks!
swf_assets_not_found_modeling_link_content: model it for us
modeling_link_content: model it for us
contributors:
header: Brought to you by
footer: Thanks!
neopets_pages:
create: