impress/app/views/outfits/new.html.haml

155 lines
6.8 KiB
Text
Raw Normal View History

2010-11-30 13:52:38 -08:00
- hide_home_link
= advertise_campaign_progress @campaign
2014-04-04 13:53:53 -07:00
%p#pet-not-found.alert= t 'pets.load.not_found'
%p#neopia-error.alert= t 'pets.load.neopia_error'
2023-10-12 17:51:44 -07:00
%section.pardon-our-dust
= image_tag 'pardon-our-dust/worker.png', class: 'thumbnail',
alt: 'A blue Kacheek wearing a construction hat, pencil over ear, looking at a blueprint'
%header Pardon our dust!
%p
A surprise tech issue shut down the site, oops! We're fixing it by releasing this beta version a bit early!
%p
There's some rough edges, and also some new things we think you'll like, too!
= link_to "Here's the details.", pardon_our_dust_path
2010-11-05 15:45:05 -07:00
#outfit-forms
- localized_cache :action_suffix => 'outfit_forms_intro' do
#pet-preview
= image_tag 'default_preview.png', :alt => ''
%span
%h1= t 'app_name'
%h2= t '.tagline'
%div{'data-require-neopia-status' => 'online'}
= form_tag remote_load_pet_path, method: 'GET', class: 'primary load-pet-to-wardrobe' do
= hidden_field_tag 'impress_user', current_user.try(:id)
- localized_cache action_suffix: 'outfits#new neopia_online main_load_pet_form_content' do
= hidden_field_tag 'redirect', "#{wardrobe_url}\#{q}"
%fieldset
%legend= t '.neopia_online.load_pet'
= pet_name_tag class: 'main-pet-name'
%button{:type => "submit"}
= t '.submit.primary'
- localized_cache "outfits#new neopia_online start_from_scratch_form pranks_funny=#{Color.pranks_funny?}" do
= form_tag wardrobe_path, method: 'GET', class: 'secondary start-from-scratch', authenticity_token: false do
%fieldset
%legend= t '.neopia_online.start_from_scratch'
= pet_attribute_select 'color', @colors, 8
= pet_attribute_select 'species', @species
%button{:type => "submit"}
= t('.submit.secondary')
%div{'data-require-neopia-status' => 'offline'}
- localized_cache "outfits#new neopia_offline start_from_scratch_form pranks_funny=#{Color.pranks_funny?}" do
= form_tag wardrobe_path, method: 'GET', class: 'primary start-from-scratch', authenticity_token: false do
%fieldset
%legend= t '.neopia_offline.start_from_scratch'
= pet_attribute_select 'color', @colors, 8
= pet_attribute_select 'species', @species
%button{:type => "submit"}
= t('.submit.primary')
= form_tag remote_load_pet_path, method: 'GET', class: 'secondary load-pet-to-wardrobe' do
= hidden_field_tag 'impress_user', current_user.try(:id)
- localized_cache action_suffix: 'outfits#new neopia_offline main_load_pet_form_content' do
= hidden_field_tag 'redirect', "#{wardrobe_url}\#{q}"
%fieldset
%legend= t '.neopia_offline.load_pet.main_html', link: link_to(t('.neopia_offline.load_pet.link_content'), 'http://blog.openneo.net/')
= pet_name_tag class: 'main-pet-name'
%button{:type => "submit"}
= t '.submit.secondary'
%ul#sections
- localized_cache :action_suffix => 'your_items_module' do
2011-07-31 19:55:29 -07:00
%li#your-items-module
2011-07-31 15:45:53 -07:00
= link_to image_tag('your_items.png'), your_items_path
%h3= link_to t('your_items'), your_items_path
%div
2013-01-09 16:40:35 -08:00
%h4= t '.your_items.tagline'
%p= t '.your_items.description'
2011-08-05 08:28:11 -07:00
= form_tag users_path, :method => 'get' do
= text_field_tag 'name', '', :type => 'search',
2013-01-09 16:40:35 -08:00
:placeholder => t('.your_items.user_search.placeholder')
= submit_tag t('.your_items.user_search.submit')
2011-07-31 15:45:53 -07:00
- 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
2013-01-09 16:40:35 -08:00
%h4= t '.infinite_closet.tagline'
%p= t '.infinite_closet.description'
= form_tag items_path, :method => 'get' do
= text_field_tag 'q', '', :type => 'search',
2013-01-09 16:40:35 -08:00
: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
2013-01-09 16:40:35 -08:00
%h4= t '.modeling_hub.tagline'
%p= t '.modeling_hub.description'
= form_tag remote_load_pet_path, method: 'POST' do
= hidden_field_tag 'impress_user', current_user.try(:id)
2013-12-08 20:59:36 -08:00
= hidden_field_tag 'redirect', "#{root_url}\#{q}"
= pet_name_tag placeholder: t('.modeling_hub.load_pet.placeholder'),
required: true
2013-01-09 16:40:35 -08:00
= submit_tag t('.modeling_hub.load_pet.submit')
- if @latest_contribution # will be nil for a fresh copy of the site ;P
#latest-contribution
= 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}
#whats-new
- if @newest_unmodeled_items.present?
#modeling-neopets-users{'data-usernames' => @neopets_usernames.to_json}
%h3= t '.newest_items.unmodeled.header'
%ul#newest-unmodeled-items
- @newest_unmodeled_items.each do |item|
- localized_cache "items/#{item.id} modeling_progress updated_at=#{item.updated_at.to_i}" do
%li{'data-item-id' => item.id}
= link_to image_tag(item.thumbnail.secure_url), item, :class => 'image-link'
= link_to item, :class => 'header' do
%h2= item.name
%span.meter{style: "width: #{@newest_unmodeled_items_predicted_modeled_ratio[item]*100}%"}
.missing-bodies
= render_predicted_missing_species_by_color(@newest_unmodeled_items_predicted_missing_species_by_color[item])
.models
- if @newest_modeled_items.present?
%h3= t '.newest_items.modeled.header'
%ul#newest-modeled-items
- @newest_modeled_items.each do |item|
%li.object
= link_to item, title: item.name, alt: item.name do
= image_tag item.thumbnail.secure_url
= nc_icon_for(item)
2013-01-10 16:24:12 -08:00
- localized_cache :action_suffix => 'templates' do
2013-01-10 14:47:46 -08:00
%script#pet-query-notice-template{:type => 'text/x-jquery-tmpl'}
.notice
2013-01-10 14:47:46 -08:00
%img.inline-image{:src => '${pet_image_url}'}
= t '.pet_query.notice_html', :pet_name => '${pet_name}'
2013-01-10 16:24:12 -08:00
%script#preview-pet-type-not-found-template{:type => 'text/x-jquery-tmpl'}
= t '.preview.pet_type_not_found', :color_name => '${color_name}',
:species_name => '${species_name}'
%script#preview-pet-not-found-template{:type => 'text/x-jquery-tmpl'}
= t '.preview.pet_not_found'
2013-01-10 14:47:46 -08:00
- content_for :meta do
%meta{name: 'neopia-host', content: neopia_host}
- content_for :javascripts do
= include_javascript_libraries :jquery20, :jquery_tmpl
2014-01-20 11:56:19 -08:00
= modeling_i18n_tag
= javascript_include_tag 'ajax_auth', 'react', 'jquery.timeago', 'pet_query', 'modeling', 'outfits/new'