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,9 +37,14 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
options[:value] = number_with_precision(options[:value], precision: 2)
form_group_builder(name, options) do
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
def check_box_with_format(name, options = {}, checked_value = "1", unchecked_value = "0", &block)
options.symbolize_keys!

View file

@ -1,6 +1,6 @@
.center
.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 }
@ -8,10 +8,11 @@
%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
#current_order
.div.center
= image_tag "logo.png"
= form_for [@user, @order] do |f|
%table
%tr.margin
= f.fields_for :order_items do |ff|