From 412cd4b1035e1d20a16082a03f08cb80220b33d9 Mon Sep 17 00:00:00 2001 From: tl3ilaxu Date: Thu, 4 Feb 2016 00:23:12 +0100 Subject: [PATCH] Minor interface fixes --- app/views/orders/_products_modal.html.haml | 4 ++-- app/views/orders/new.html.haml | 5 +++-- app/views/products/link.html.haml | 16 +++++++++------- app/views/welcome/index.html.haml | 3 ++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/views/orders/_products_modal.html.haml b/app/views/orders/_products_modal.html.haml index 140f390..76690ec 100644 --- a/app/views/orders/_products_modal.html.haml +++ b/app/views/orders/_products_modal.html.haml @@ -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 } } + %button.btn.btn-default.product{ data: { product: product.id, dismiss: :modal }, style: "height: 125px" } %p= product.name - = image_tag product.avatar(:dagschotel), class: "center" + = image_tag product.avatar(:dagschotel), class: "center img-responsive", style: "max-height: 100px" .modal-footer %button.btn.btn-default{ data: { dismiss: :modal } } Close diff --git a/app/views/orders/new.html.haml b/app/views/orders/new.html.haml index a8632e3..6771d96 100644 --- a/app/views/orders/new.html.haml +++ b/app/views/orders/new.html.haml @@ -5,8 +5,9 @@ = form_tag nil, id: "from_barcode_form", data: { url: URI.join(root_url, "barcodes").to_s } do %input.center-block{ type: :number, name: :id, autofocus: true } = "- OR -" - %button.btn.btn-default.center-block{ data: { toggle: :modal, target: "#products_modal" } } - Select Product Without Barcode + %p + %button.btn.btn-default.center-block{ data: { toggle: :modal, target: "#products_modal" } } + Select Product Without Barcode .col-md-4.col-md-offset-1 = form_for [@user, @order] do |f| = render 'errors', object: @order diff --git a/app/views/products/link.html.haml b/app/views/products/link.html.haml index 2129714..1a6f0cc 100644 --- a/app/views/products/link.html.haml +++ b/app/views/products/link.html.haml @@ -1,12 +1,14 @@ .row .col-md-7 - %h4.pull-right Select a product to link the barcode to an existing product ... - #product_buttons.row - - Product.all.each do |product| - .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] } do - %p= product.name - = image_tag product.avatar(:dagschotel), class: "center" + %h4.center Select a product to link the barcode to an existing product ... + %p + #product_buttons.row + - 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 + %p= product.name + = image_tag product.avatar(:dagschotel), class: "center img-responsive", style: "max-height: 100px;" .col-md-5 %h4 or create a new one = render 'products/form' diff --git a/app/views/welcome/index.html.haml b/app/views/welcome/index.html.haml index 8537b15..09a6b75 100644 --- a/app/views/welcome/index.html.haml +++ b/app/views/welcome/index.html.haml @@ -1,4 +1,5 @@ = content_for :title, "Login" -If this is the first time you log in, an account will be created for you. +%p + If this is the first time you log in, an account will be created for you. %div = link_to "Sign in with Zeus WPI account.", omniauth_authorize_path("user", "zeuswpi"), class: "btn btn-large btn-primary"