impress/app/views/outfits/new.html.haml
Emi Matchu e4e81f0694 Update modeling bug announcement, now that things are working again
Also, while we're here! To restore the lost data, I:

1. Downloaded this scheduled public data backup, which was taken
   thankfully the day before we updated modeling code!
   https://impress.openneo.net/public-data/2024-11-03T08_15_02Z-scheduled.sql.gz
2. Trimmed it just to the section about the `parents_swf_assets` table:
   dropping it, then rebuilding it from scratch.
3. Ran this modified backup SQL dump on the production server.
4. Ran the code from `db/migrate/20241001052510_add_cached_fields_to_items.rb`
   to bring items' cached fields back into the correct state.

I also had to fix some errors in the item data that prevented some
items from passing the latest validations:

```rb
Item.where(rarity: "").update_all(rarity: "???")
Item.where(description: "").update_all(description: "???")
Item.where(zones_restrict: "").update_all(zones_restrict: "00000
00000000000000000000000000000000000000000000000")
```
2024-11-06 14:34:15 -08:00

128 lines
4.9 KiB
Text

- hide_home_link
= advertise_campaign_progress @campaign
%p#pet-not-found.alert= t 'pets.load.not_found'
- if show_announcement?
%section.announcement
= image_tag "/images/error-grundo.png", width: 70, height: 70,
srcset: {"/images/error-grundo.png": "2x"}
.content
%p
%strong
Oops, sorry for the bugs recently!
For the first time in One Million Years, we made some changes to our
modeling code—and it looks like we goofed it, and started gradually
losing some data!
%p
We've restored a backup from before we made these changes, so most
everything is back in order! None of your personal data was affected.
Sorry for the disruption, and hope everyone is doing okay! 💜
#outfit-forms
#pet-preview
= image_tag 'default_preview.png', :alt => ''
%span
%h1= t 'app_name'
%h2= t '.tagline'
= form_tag load_pet_path, method: 'POST', class: 'primary load-pet-to-wardrobe' do
= hidden_field_tag 'destination', 'wardrobe'
%fieldset
%legend= t '.load_pet'
= pet_name_tag class: 'main-pet-name'
%button{:type => "submit"}
= t '.submit.primary'
= form_tag wardrobe_path, method: 'GET', class: 'secondary start-from-scratch', authenticity_token: false do
%fieldset
%legend= t '.start_from_scratch'
= pet_attribute_select 'color', @colors, 8
= pet_attribute_select 'species', @species
%button{:type => "submit"}
= t('.submit.secondary')
%ul#sections
%li
%h3= link_to t('your_items'), your_items_path
= link_to image_tag('your_items.png'), your_items_path
.section-info
%strong= 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')
%li
%h3= link_to t('infinite_closet'), items_path
= link_to image_tag('items.png'), items_path
.section-info
%strong= 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')
%li
%h3= link_to t('rainbow_pool'), pet_types_path
= link_to pet_types_path do
= image_tag 'rainbow_pool.png'
.section-info
%strong= t('.rainbow_pool.tagline')
%p= t('.rainbow_pool.description')
= form_with url: pet_types_path, method: 'GET' do |form|
= form.select :color, @colors.map(&:human_name),
include_blank: t('.rainbow_pool.filters.color')
= form.select :species, @species.map(&:human_name),
include_blank: t('.rainbow_pool.filters.species')
= form.submit t('.rainbow_pool.filters.submit'), name: nil
- 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?
%h3= t '.newest_items.unmodeled.header'
%ul#newest-unmodeled-items
- @newest_unmodeled_items.each do |item|
%li{'data-item-id' => item.id}
= link_to image_tag(item.thumbnail_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_url
= nc_icon_for(item)
%script#pet-query-notice-template{:type => 'text/x-jquery-tmpl'}
.notice
%img.inline-image{:src => '${pet_image_url}'}
= t '.pet_query.notice_html', :pet_name => '${pet_name}'
%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'
- content_for :javascripts do
= javascript_include_tag 'jquery', 'jquery.tmpl', 'jquery.timeago',
defer: true
- content_for :javascripts_body do
= javascript_include_tag 'outfits/new', defer: true