Make code not horrible
This commit is contained in:
parent
412cd4b103
commit
da166cf7eb
3 changed files with 6 additions and 4 deletions
|
@ -26,11 +26,13 @@
|
||||||
}
|
}
|
||||||
button.product {
|
button.product {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
p {
|
p {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
|
max-height: 70%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
#product_buttons.container-fluid
|
#product_buttons.container-fluid
|
||||||
- @products.each do |product|
|
- @products.each do |product|
|
||||||
.col-md-2{ data: { name: product.name } }
|
.col-md-2{ data: { name: product.name } }
|
||||||
%button.btn.btn-default.product{ data: { product: product.id, dismiss: :modal }, style: "height: 125px" }
|
%button.btn.btn-default.product{ data: { product: product.id, dismiss: :modal } }
|
||||||
%p= product.name
|
%p= product.name
|
||||||
= image_tag product.avatar(:dagschotel), class: "center img-responsive", style: "max-height: 100px"
|
= image_tag product.avatar(:dagschotel), class: "center img-responsive"
|
||||||
.modal-footer
|
.modal-footer
|
||||||
%button.btn.btn-default{ data: { dismiss: :modal } }
|
%button.btn.btn-default{ data: { dismiss: :modal } }
|
||||||
Close
|
Close
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
- Product.all.each do |product|
|
- Product.all.each do |product|
|
||||||
%tr
|
%tr
|
||||||
.col-md-3
|
.col-md-3
|
||||||
= button_to product_barcodes_path(product), class: "btn btn-default product", data: { product: product.id, dismiss: :modal }, params: { "barcode[code]" => params[:barcode] }, style: "height: 125px;" do
|
= button_to product_barcodes_path(product), class: "btn btn-default product", data: { product: product.id, dismiss: :modal }, params: { "barcode[code]" => params[:barcode] } do
|
||||||
%p= product.name
|
%p= product.name
|
||||||
= image_tag product.avatar(:dagschotel), class: "center img-responsive", style: "max-height: 100px;"
|
= image_tag product.avatar(:dagschotel), class: "center img-responsive"
|
||||||
.col-md-5
|
.col-md-5
|
||||||
%h4 or create a new one
|
%h4 or create a new one
|
||||||
= render 'products/form'
|
= render 'products/form'
|
||||||
|
|
Loading…
Reference in a new issue