Some view changes to make stuff more obvious

This commit is contained in:
benji 2015-10-07 14:52:44 +02:00
parent e6264fd6c8
commit 4c1a630415
3 changed files with 12 additions and 8 deletions

View file

@ -2,8 +2,6 @@ class WelcomeController < ApplicationController
skip_before_filter :verify_authenticity_token, only: :token_sign_in
def index
user = User.find_by(name: "benji")
sign_in_and_redirect user
end
def token_sign_in

View file

@ -37,7 +37,12 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
options[:value] = number_with_precision(options[:value], precision: 2)
form_group_builder(name, options) do
number_field_without_format(name, options)
content_tag :div, class: "input-group" do
content_tag(:span, class: "input-group-addon") do
content_tag :span, nil, class: "glyphicon glyphicon-euro"
end +
number_field_without_format(name, options)
end
end
end

View file

@ -1,17 +1,18 @@
.center
.row
.col-md-6.col-md-offset-1.barcode-wrapper
.row
.col-md-6.col-md-offset-1.barcode-wrapper
.center
%h1 Order for #{@user.name}
= form_tag nil, id: "from_barcode_form" 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
.col-md-4.col-md-offset-1
.col-md-4.col-md-offset-1
= form_for [@user, @order] do |f|
= render 'errors', object: @order
#current_order
.div.center
= image_tag "logo.png"
= form_for [@user, @order] do |f|
%table
%tr.margin
= f.fields_for :order_items do |ff|