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!
|
||||
|
||||
= turbo_frame_tag "item-preview" do
|
||||
.outfit-viewer
|
||||
- @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: ""
|
||||
= render partial: "outfit_viewer", locals: {outfit: @preview_outfit}
|
||||
|
||||
= form_for item_path(@item), method: :get, class: "species-color-picker",
|
||||
data: {"is-valid": @preview_error.nil?} do |f|
|
||||
|
|
Loading…
Reference in a new issue