Avoid long product names of fucking up entire layout
This commit is contained in:
parent
bf52027229
commit
90e270a03e
2 changed files with 22 additions and 1 deletions
|
@ -37,3 +37,21 @@
|
||||||
.form_row .btn-lg {
|
.form_row .btn-lg {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form_row .caption {
|
||||||
|
h4 {
|
||||||
|
position: relative;
|
||||||
|
span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding-right: 50px;
|
||||||
|
}
|
||||||
|
small {
|
||||||
|
margin-left: -45px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
<%= image_tag product.avatar %>
|
<%= image_tag product.avatar %>
|
||||||
</div>
|
</div>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<%= content_tag :h4, "#{product.name} (#{euro(product.price)})" %>
|
<h4 class="text-nowrap">
|
||||||
|
<%= content_tag :span, product.name %>
|
||||||
|
<%= content_tag :small, euro(product.price) %>
|
||||||
|
</h4>
|
||||||
<%= f.counter :count, skip_label: true, wrapper_class: "input-group", class: "row_counter" %>
|
<%= f.counter :count, skip_label: true, wrapper_class: "input-group", class: "row_counter" %>
|
||||||
<%= f.fields_for :product do |product| %>
|
<%= f.fields_for :product do |product| %>
|
||||||
<%= product.hidden_field :price_cents, class: :price %>
|
<%= product.hidden_field :price_cents, class: :price %>
|
||||||
|
|
Loading…
Reference in a new issue