Emi Matchu
c011e99819
First one, Turbo reasonably yelled at us in the JS console that we should put its script tag in the `head` rather than the `body`, because it re-executes scripts in the `body` and we don't want to spin up Turbo multiple times! I also removed some scripts that aren't relevant anymore, fixed a bug in `outfits/new.js` where failing to load a donation pet would cause the preview thing to not work when you type (I think this might've already been an issue?), reworked `item_header.js` to just run once in the `head`, and split scripts into `:javascripts` (run once in `head`) vs `:javascripts_body` (run every page load in `body`).
28 lines
1,010 B
Text
28 lines
1,010 B
Text
- title @item.name
|
|
- canonical_path @item
|
|
|
|
= render partial: "item_header",
|
|
locals: {item: @item, trades: @trades, current_subpage: "preview",
|
|
current_user_lists: @current_user_lists,
|
|
current_user_quantities: @current_user_quantities}
|
|
|
|
- if @item.name.include? "Baby Body Paint"
|
|
%p.warning
|
|
The Baby Body Paint items seem to have new zone restriction rules that our
|
|
system doesn't support yet, whuh oh! This might require major changes to
|
|
how we handle zones. Until then, these items will be <em>very</em> buggy,
|
|
sorry!
|
|
|
|
#outfit-preview-root{'data-item-id': @item.id}
|
|
|
|
- unless @contributors_with_counts.empty?
|
|
#item-contributors
|
|
%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'
|
|
|
|
- content_for :javascripts_body do
|
|
= javascript_include_tag 'item-page', defer: true
|
|
|