Make code not horrible

This commit is contained in:
tl3ilaxu 2016-02-04 14:24:02 +01:00
parent 412cd4b103
commit da166cf7eb
3 changed files with 6 additions and 4 deletions

View file

@ -26,11 +26,13 @@
}
button.product {
width: 100%;
height: 100px;
p {
overflow: hidden;
text-overflow: ellipsis;
}
img {
max-height: 70%;
max-width: 100%;
margin-left: auto;
margin-right: auto;

View file

@ -11,9 +11,9 @@
#product_buttons.container-fluid
- @products.each do |product|
.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
= image_tag product.avatar(:dagschotel), class: "center img-responsive", style: "max-height: 100px"
= image_tag product.avatar(:dagschotel), class: "center img-responsive"
.modal-footer
%button.btn.btn-default{ data: { dismiss: :modal } }
Close

View file

@ -6,9 +6,9 @@
- Product.all.each do |product|
%tr
.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
= 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
%h4 or create a new one
= render 'products/form'