refactor items.show for hierarchy and twl
This commit is contained in:
parent
0cbdc30a15
commit
70ff4974a3
3 changed files with 78 additions and 66 deletions
|
@ -9,17 +9,17 @@
|
||||||
= nc_icon_for(@item)
|
= nc_icon_for(@item)
|
||||||
- unless @item.rarity.blank?
|
- unless @item.rarity.blank?
|
||||||
== #{t '.rarity'}: #{@item.rarity_index} (#{@item.rarity})
|
== #{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?
|
- unless @item.nc?
|
||||||
= link_to t('.shop_wizard'), shop_wizard_url_for(@item)
|
= link_to t('.resources.shop_wizard'), shop_wizard_url_for(@item)
|
||||||
= link_to t('.super_shop_wizard'), super_shop_wizard_url_for(@item)
|
= link_to t('.resources.super_shop_wizard'), super_shop_wizard_url_for(@item)
|
||||||
= link_to t('.trading_post'), trading_post_url_for(@item)
|
= link_to t('.resources.trading_post'), trading_post_url_for(@item)
|
||||||
= link_to t('.auction_genie'), auction_genie_url_for(@item)
|
= link_to t('.resources.auction_genie'), auction_genie_url_for(@item)
|
||||||
|
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
#closet-hangers
|
#closet-hangers
|
||||||
%h3
|
%h3
|
||||||
= t '.hangers_header_html',
|
= t '.closet_hangers.header_html',
|
||||||
:user_items_link => link_to(t('your_items'),
|
:user_items_link => link_to(t('your_items'),
|
||||||
user_closet_hangers_path(current_user))
|
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
|
= 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'),
|
t('closet_lists.unlisted_name'),
|
||||||
:class => 'unlisted'
|
:class => 'unlisted'
|
||||||
- else
|
- else
|
||||||
= label_tag "quantity[#{owned}]", t('.quantity_label')
|
= label_tag "quantity[#{owned}]",
|
||||||
= submit_tag t('.submit_hangers')
|
t('.closet_hangers.quantity_label')
|
||||||
|
= submit_tag t('.closet_hangers.submit')
|
||||||
|
|
||||||
- localized_cache "items/#{@item.id} info" do
|
- localized_cache "items/#{@item.id} info" do
|
||||||
%p= @item.description
|
%p= @item.description
|
||||||
|
|
||||||
#item-zones
|
#item-zones
|
||||||
%p
|
%p
|
||||||
%strong #{t '.occupied_zones_header'}:
|
%strong #{t '.zones.occupied_header'}:
|
||||||
= list_zones @item.occupied_zones, :uncertain_label
|
= list_zones @item.occupied_zones, :uncertain_label
|
||||||
%p
|
%p
|
||||||
%strong #{t '.restricted_zones_header'}:
|
%strong #{t '.zones.restricted_header'}:
|
||||||
- if @item.restricted_zones.empty?
|
- if @item.restricted_zones.empty?
|
||||||
= t '.no_restricted_zones'
|
= t '.zones.none'
|
||||||
- else
|
- else
|
||||||
= list_zones @item.restricted_zones
|
= list_zones @item.restricted_zones
|
||||||
|
|
||||||
|
@ -72,34 +73,33 @@
|
||||||
|
|
||||||
- localized_cache 'items#show preview_header' do
|
- localized_cache 'items#show preview_header' do
|
||||||
#item-preview-header
|
#item-preview-header
|
||||||
%h3= t '.preview_header'
|
%h3= t '.preview.header'
|
||||||
= link_to t('.customize_more'), root_path, :id => 'customize-more',
|
= link_to t('.preview.customize_more'), root_path, :id => 'customize-more',
|
||||||
:class => 'button'
|
:class => 'button'
|
||||||
|
|
||||||
#item-preview
|
#item-preview
|
||||||
#item-preview-species= standard_species_images_for(@item)
|
#item-preview-species= standard_species_images_for(@item)
|
||||||
#item-preview-error
|
#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
|
- localized_cache "items/#{@item.id} contributors" do
|
||||||
- unless @contributors_with_counts.empty?
|
- unless @contributors_with_counts.empty?
|
||||||
#item-contributors
|
#item-contributors
|
||||||
%header #{t '.contributors_header'}:
|
%header #{t '.contributors.header'}:
|
||||||
%ul
|
%ul
|
||||||
- @contributors_with_counts.each do |contributor, count|
|
- @contributors_with_counts.each do |contributor, count|
|
||||||
%li= link_to(contributor.name, user_contributions_path(contributor)) + format_contribution_count(count)
|
%li= link_to(contributor.name, user_contributions_path(contributor)) + format_contribution_count(count)
|
||||||
%footer= t '.contributors_footer'
|
%footer= t '.contributors.footer'
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
|
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
|
||||||
IMPRESS_HOST = #{RemoteImpressHost.inspect};
|
IMPRESS_HOST = #{RemoteImpressHost.inspect};
|
||||||
|
|
||||||
%script#swf-assets-not-found-template{:type => 'text/x-jquery-tmpl'}
|
%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}',
|
:species_name => '${species_name}',
|
||||||
:color_name => '${color_name}',
|
:color_name => '${color_name}',
|
||||||
:modeling_link => link_to(t('.swf_assets_not_found_modeling_link_content'),
|
:modeling_link_url => root_path
|
||||||
root_path)
|
|
||||||
|
|
||||||
- content_for :javascripts do
|
- content_for :javascripts do
|
||||||
= include_javascript_libraries :jquery, :swfobject, :jquery_tmpl
|
= include_javascript_libraries :jquery, :swfobject, :jquery_tmpl
|
||||||
|
|
|
@ -283,17 +283,20 @@ en-meep:
|
||||||
|
|
||||||
show:
|
show:
|
||||||
rarity: Meepity
|
rarity: Meepity
|
||||||
|
resources:
|
||||||
jn_items: JN Meepits
|
jn_items: JN Meepits
|
||||||
shop_wizard: Meep Wizard
|
shop_wizard: Meep Wizard
|
||||||
super_shop_wizard: Meeper Wizard
|
super_shop_wizard: Meeper Wizard
|
||||||
trading_post: Treeps
|
trading_post: Treeps
|
||||||
auction_genie: Aucteeps
|
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?
|
quantity_label: How meepy?
|
||||||
submit_hangers: Save to Your Meeps
|
submit: Save to Your Meeps
|
||||||
occupied_zones_header: Occupeeps
|
zones:
|
||||||
restricted_zones_header: Restreeps
|
occupied_header: Occupeeps
|
||||||
no_restricted_zones: Meepless
|
restricted_header: Restreeps
|
||||||
|
none: Meepless
|
||||||
trading_closet_hangers:
|
trading_closet_hangers:
|
||||||
header:
|
header:
|
||||||
owned:
|
owned:
|
||||||
|
@ -306,17 +309,20 @@ en-meep:
|
||||||
other: "%{count} users meep this item:"
|
other: "%{count} users meep this item:"
|
||||||
show_more: meep more
|
show_more: meep more
|
||||||
show_less: meep less
|
show_less: meep less
|
||||||
preview_header: Meepview
|
preview:
|
||||||
|
header: Meepview
|
||||||
customize_more: Customize meep
|
customize_more: Customize meep
|
||||||
preview_requirements_not_met:
|
requirements_not_met:
|
||||||
Javascript and Flash are required to preview meepits. Meep!
|
Javascript and Flash are required to preview meepits. Meep!
|
||||||
contributors_header: Meeped to you by
|
not_found:
|
||||||
contributors_footer: Meep!
|
main_html:
|
||||||
swf_assets_not_found_html:
|
|
||||||
We've never meeped the %{item_name} on the %{color_name}
|
We've never meeped the %{item_name} on the %{color_name}
|
||||||
%{species_name} before. Have you? If so, please %{modeling_link} and
|
%{species_name} before. Have you? If so, please %{modeling_link} and
|
||||||
we'll meep our datameep instantly. Meep!
|
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:
|
neopets_pages:
|
||||||
create:
|
create:
|
||||||
|
|
|
@ -284,17 +284,20 @@ en:
|
||||||
|
|
||||||
show:
|
show:
|
||||||
rarity: Rarity
|
rarity: Rarity
|
||||||
|
resources:
|
||||||
jn_items: JN Items
|
jn_items: JN Items
|
||||||
shop_wizard: Shop Wizard
|
shop_wizard: Shop Wizard
|
||||||
super_shop_wizard: Super Wizard
|
super_shop_wizard: Super Wizard
|
||||||
trading_post: Trades
|
trading_post: Trades
|
||||||
auction_genie: Auctions
|
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?
|
quantity_label: How many?
|
||||||
submit_hangers: Save to Your Items
|
submit: Save to Your Items
|
||||||
occupied_zones_header: Occupies
|
zones:
|
||||||
restricted_zones_header: Restricts
|
occupied_header: Occupies
|
||||||
no_restricted_zones: None
|
restricted_header: Restricts
|
||||||
|
none: None
|
||||||
trading_closet_hangers:
|
trading_closet_hangers:
|
||||||
header:
|
header:
|
||||||
owned:
|
owned:
|
||||||
|
@ -307,17 +310,20 @@ en:
|
||||||
other: "%{count} users want this item:"
|
other: "%{count} users want this item:"
|
||||||
show_more: more
|
show_more: more
|
||||||
show_less: less
|
show_less: less
|
||||||
preview_header: Preview
|
preview:
|
||||||
|
header: Preview
|
||||||
customize_more: Customize more
|
customize_more: Customize more
|
||||||
preview_requirements_not_met:
|
requirements_not_met:
|
||||||
Javascript and Flash are required to preview wearables. Sorry!
|
Javascript and Flash are required to preview wearables.
|
||||||
contributors_header: Brought to you by
|
not_found:
|
||||||
contributors_footer: Thanks!
|
main_html:
|
||||||
swf_assets_not_found_html:
|
|
||||||
We've never seen the %{item_name} on the %{color_name}
|
We've never seen the %{item_name} on the %{color_name}
|
||||||
%{species_name} before. Have you? If so, please %{modeling_link} and
|
%{species_name} before. Have you? If so, please %{modeling_link} and
|
||||||
we'll update our database instantly. Thanks!
|
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:
|
neopets_pages:
|
||||||
create:
|
create:
|
||||||
|
|
Loading…
Reference in a new issue