forked from OpenNeo/impress
Extract outfit-viewer to a separate template
Just cuz this is gonna get more complex down the line!
This commit is contained in:
parent
76d2cc6c21
commit
81a58f8656
2 changed files with 10 additions and 9 deletions
9
app/views/items/_outfit_viewer.html.haml
Normal file
9
app/views/items/_outfit_viewer.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
.outfit-viewer
|
||||||
|
- outfit.visible_layers.each do |swf_asset|
|
||||||
|
%outfit-layer{
|
||||||
|
data: {
|
||||||
|
"asset-id": swf_asset.id,
|
||||||
|
"zone": swf_asset.zone.label,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
= image_tag swf_asset.image_url, alt: ""
|
|
@ -14,15 +14,7 @@
|
||||||
sorry!
|
sorry!
|
||||||
|
|
||||||
= turbo_frame_tag "item-preview" do
|
= turbo_frame_tag "item-preview" do
|
||||||
.outfit-viewer
|
= render partial: "outfit_viewer", locals: {outfit: @preview_outfit}
|
||||||
- @preview_outfit.visible_layers.each do |swf_asset|
|
|
||||||
%outfit-layer{
|
|
||||||
data: {
|
|
||||||
"asset-id": swf_asset.id,
|
|
||||||
"zone": swf_asset.zone.label,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
= image_tag swf_asset.image_url, alt: ""
|
|
||||||
|
|
||||||
= form_for item_path(@item), method: :get, class: "species-color-picker",
|
= form_for item_path(@item), method: :get, class: "species-color-picker",
|
||||||
data: {"is-valid": @preview_error.nil?} do |f|
|
data: {"is-valid": @preview_error.nil?} do |f|
|
||||||
|
|
Loading…
Reference in a new issue