forked from OpenNeo/impress
Move item description into header
This commit is contained in:
parent
e4fb067e45
commit
e8832f2c36
4 changed files with 71 additions and 80 deletions
|
@ -6,56 +6,46 @@ body.items-show
|
||||||
.item-header
|
.item-header
|
||||||
+item-header
|
+item-header
|
||||||
|
|
||||||
#item-info-section
|
#your-items-form
|
||||||
display: grid
|
border: 1px solid $module-border-color
|
||||||
|
font-size: 85%
|
||||||
|
margin-bottom: 2em
|
||||||
|
margin-left: auto
|
||||||
|
margin-right: auto
|
||||||
|
padding: 1em
|
||||||
|
width: 30em
|
||||||
|
|
||||||
grid-template-areas: "info form"
|
h3
|
||||||
grid-template-columns: 1fr auto
|
font-size: 150%
|
||||||
|
font-weight: bold
|
||||||
|
margin-bottom: .25em
|
||||||
|
|
||||||
#item-info
|
#closet-hangers-ownership-groups
|
||||||
grid-area: info
|
+clearfix
|
||||||
|
margin-bottom: .5em
|
||||||
|
|
||||||
#your-items-form
|
div
|
||||||
grid-area: form
|
float: left
|
||||||
|
margin: 0 5%
|
||||||
|
text-align: left
|
||||||
|
width: 40%
|
||||||
|
|
||||||
border: 1px solid $module-border-color
|
li
|
||||||
font-size: 85%
|
list-style: none
|
||||||
margin-bottom: 3em
|
word-wrap: break-word
|
||||||
margin-left: 1em
|
|
||||||
padding: 1em
|
|
||||||
width: 30em
|
|
||||||
|
|
||||||
h3
|
label.unlisted
|
||||||
font-size: 150%
|
font-style: italic
|
||||||
font-weight: bold
|
|
||||||
margin-bottom: .25em
|
|
||||||
|
|
||||||
#closet-hangers-ownership-groups
|
form
|
||||||
+clearfix
|
padding: .5em 0
|
||||||
margin-bottom: .5em
|
|
||||||
|
|
||||||
div
|
select
|
||||||
float: left
|
width: 9em
|
||||||
margin: 0 5%
|
|
||||||
text-align: left
|
|
||||||
width: 40%
|
|
||||||
|
|
||||||
li
|
input[type=number]
|
||||||
list-style: none
|
margin-right: .5em
|
||||||
word-wrap: break-word
|
width: 3em
|
||||||
|
|
||||||
label.unlisted
|
|
||||||
font-style: italic
|
|
||||||
|
|
||||||
form
|
|
||||||
padding: .5em 0
|
|
||||||
|
|
||||||
select
|
|
||||||
width: 9em
|
|
||||||
|
|
||||||
input[type=number]
|
|
||||||
margin-right: .5em
|
|
||||||
width: 3em
|
|
||||||
|
|
||||||
#item-contributors
|
#item-contributors
|
||||||
+subtle-banner
|
+subtle-banner
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
=item-header
|
=item-header
|
||||||
border-bottom: 1px solid $module-border-color
|
border-bottom: 1px solid $module-border-color
|
||||||
|
margin-top: 1em
|
||||||
margin-bottom: 1em
|
margin-bottom: 1em
|
||||||
|
|
||||||
.item-header-main
|
.item-header-main
|
||||||
padding: 1em 0
|
|
||||||
|
|
||||||
display: grid
|
display: grid
|
||||||
grid-template-areas: "img gap1" "img name" "img links" "img gap2" "nav nav"
|
grid-template-areas: "img gap1" "img name" "img links" "img gap2" "nav nav"
|
||||||
align-items: center
|
align-items: center
|
||||||
|
@ -36,6 +35,10 @@
|
||||||
font-size: 75%
|
font-size: 75%
|
||||||
margin-left: 1em
|
margin-left: 1em
|
||||||
|
|
||||||
|
.item-description
|
||||||
|
margin-top: .5em
|
||||||
|
margin-bottom: 1em
|
||||||
|
|
||||||
.item-subpages-nav
|
.item-subpages-nav
|
||||||
display: flex
|
display: flex
|
||||||
align-items: flex-end
|
align-items: flex-end
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
|
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
|
||||||
= link_to t('items.show.resources.auction_genie'), auction_genie_url_for(item)
|
= link_to t('items.show.resources.auction_genie'), auction_genie_url_for(item)
|
||||||
|
|
||||||
|
%p.item-description= @item.description
|
||||||
|
|
||||||
%nav.item-subpages-nav
|
%nav.item-subpages-nav
|
||||||
= link_to t('items.show.subpages_nav.preview'), item,
|
= link_to t('items.show.subpages_nav.preview'), item,
|
||||||
class: ['preview-link'], 'data-is-current' => current_subpage == 'preview'
|
class: ['preview-link'], 'data-is-current' => current_subpage == 'preview'
|
||||||
|
|
|
@ -4,40 +4,36 @@
|
||||||
= render partial: "item_header",
|
= render partial: "item_header",
|
||||||
locals: {item: @item, trades: @trades, current_subpage: "preview"}
|
locals: {item: @item, trades: @trades, current_subpage: "preview"}
|
||||||
|
|
||||||
%section#item-info-section
|
- if user_signed_in?
|
||||||
#item-info
|
#your-items-form
|
||||||
%p= @item.description
|
%h3
|
||||||
|
= t '.closet_hangers.header_html',
|
||||||
- if user_signed_in?
|
:user_items_link => link_to(t('your_items'),
|
||||||
#your-items-form
|
user_closet_hangers_path(current_user))
|
||||||
%h3
|
= form_tag update_quantities_user_item_closet_hangers_path(:user_id => current_user, :item_id => @item), :method => :put do
|
||||||
= t '.closet_hangers.header_html',
|
#closet-hangers-ownership-groups
|
||||||
:user_items_link => link_to(t('your_items'),
|
- @current_user_lists.each do |owned, lists|
|
||||||
user_closet_hangers_path(current_user))
|
%div
|
||||||
= form_tag update_quantities_user_item_closet_hangers_path(:user_id => current_user, :item_id => @item), :method => :put do
|
%h4= closet_lists_group_name(:you, owned)
|
||||||
#closet-hangers-ownership-groups
|
%ul
|
||||||
- @current_user_lists.each do |owned, lists|
|
- lists.each do |list|
|
||||||
%div
|
|
||||||
%h4= closet_lists_group_name(:you, owned)
|
|
||||||
%ul
|
|
||||||
- lists.each do |list|
|
|
||||||
%li
|
|
||||||
= number_field_tag "quantity[#{list.id}]",
|
|
||||||
@current_user_quantities[list.id], :min => 0
|
|
||||||
= label_tag "quantity[#{list.id}]", list.name
|
|
||||||
|
|
||||||
%li
|
%li
|
||||||
= number_field_tag "quantity[#{owned}]",
|
= number_field_tag "quantity[#{list.id}]",
|
||||||
@current_user_quantities[owned], :min => 0
|
@current_user_quantities[list.id], :min => 0
|
||||||
|
= label_tag "quantity[#{list.id}]", list.name
|
||||||
|
|
||||||
- unless lists.empty?
|
%li
|
||||||
= label_tag "quantity[#{owned}]",
|
= number_field_tag "quantity[#{owned}]",
|
||||||
t('closet_lists.unlisted_name'),
|
@current_user_quantities[owned], :min => 0
|
||||||
:class => 'unlisted'
|
|
||||||
- else
|
- unless lists.empty?
|
||||||
= label_tag "quantity[#{owned}]",
|
= label_tag "quantity[#{owned}]",
|
||||||
t('.closet_hangers.quantity_label')
|
t('closet_lists.unlisted_name'),
|
||||||
= submit_tag t('.closet_hangers.submit')
|
:class => 'unlisted'
|
||||||
|
- else
|
||||||
|
= label_tag "quantity[#{owned}]",
|
||||||
|
t('.closet_hangers.quantity_label')
|
||||||
|
= submit_tag t('.closet_hangers.submit')
|
||||||
|
|
||||||
#outfit-preview-root{'data-item-id': @item.id}
|
#outfit-preview-root{'data-item-id': @item.id}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue