From ad2414f8d1b89c9626d60415949bb1a22be35fe1 Mon Sep 17 00:00:00 2001 From: jimi Date: Mon, 16 Mar 2009 07:54:40 -0500 Subject: [PATCH] Entry forms updates Redesigned entry forms and listings w/ { table-layout: fixed } and --- app/views/employees/_form.html.erb | 128 ++++++++++++++-------------- app/views/employees/index.html.erb | 30 ++++--- app/views/loads/_form.html.erb | 37 +++++--- app/views/loads/index.html.erb | 6 -- public/stylesheets/application.css | 131 ++++++++++++++++++++++------- 5 files changed, 213 insertions(+), 119 deletions(-) diff --git a/app/views/employees/_form.html.erb b/app/views/employees/_form.html.erb index 5e46e7b..c8e3013 100644 --- a/app/views/employees/_form.html.erb +++ b/app/views/employees/_form.html.erb @@ -1,71 +1,101 @@ <% form_for @employee do |f| %> <%= f.error_messages %> -
+
+
Personal Info - <%# f.label :number %> - <%# f.text_field :number %> + - - - + + - - + + - + - + - - - - + + + - - - + + + - - + + + - - + + + + + + + - - + + + - - + + + + +
<%= f.label :firstname, "First Name", :class => "label" %> - <%= f.label :lastname, "Last Name", :class => "label" %>
<%= f.label :firstname, "First Name" %><%= f.label :lastname, "Last Name" %>
<%= f.text_field :firstname, :size => "12" %><%= f.text_field :lastname, :size => "12" %> + <%= f.text_field :firstname, :size => "12", :maxsize => 30 %> + <%= f.text_field :lastname, :size => "12" %>
<%= f.label :street, "Street", :class => "label" %>
<%= f.text_field :street %> + <%= f.text_field :street, :size => "30" %>
<%= f.label :city, "City", :class => "label" %> <%= f.label :state, "St", :class => "label" %><%= f.label :zip, "Zip", :class => "label" %>
<%= f.text_field :city, :size => "20" %><%= f.text_field :state, :size => "2" %><%= f.text_field :zip, :size => "6" %><%= f.text_field :city, :size => "16" %><%= f.text_field :state, :size => "1" %><%= f.text_field :zip, :size => "6" %>
<%= f.label :dob, "Birth Date", :class => "label" %><%= f.label :hired, "Hire Date", :class => "label" %>
<%= f.calendar_date_select :dob, :size => "10", + <%= f.calendar_date_select :dob, :size => "8", :year_range => 70.years.ago..0.years.ago, :buttons => false %><%= f.calendar_date_select :hired, :size => "10", + <%= f.calendar_date_select :hired, :size => "8", :year_range => 20.years.ago..1.year.from_now, :buttons => false %><%= f.text_field :payrate, :size => "2" %>
 
<%= f.label :ssn, "Social", :class => "label" %><%= f.label :phone, "Phone", :class => "label" %>
<%= f.text_field :ssn, :size => "10" %><%= f.text_field :phone, :size => "12" %><%= f.text_field :phone, :size => "10" %><%= f.text_field :ssn, :size => "9" %><%= f.text_field :tax_status, :size => "1" %><%= f.text_field :dependents, :size => "1" %>
+
+ +
+ Vehicle Info + + + + + + + + + + + + + - - - - + + + - - - - + + +
<%= f.label :dl_number, "License No." %><%= f.label :dl_state, "St", :class => "label" %><%= f.label :dl_expire, "Expiry", :class => "label" %>
<%= f.text_field :dl_number, :size => "12" %><%= f.text_field :dl_state, :size => "1" %> + <%= f.calendar_date_select :dl_expire, :size => "8" %>
 <%= f.label :tax_status, "Status", :class => "label" %><%= f.label :dependents, "Dep", :class => "label" %><%= f.label :payrate, "Rate", :class => "label" %><%= f.label :truck, "Truck No" %><%= f.label :trailer, "Trailer No" %> 
 <%= f.text_field :tax_status, :size => "1" %><%= f.text_field :dependents, :size => "1" %><%= f.text_field :payrate, :size => "4" %><%= f.text_field :truck, :size => "12" %><%= f.text_field :trailer, :size => "12" %> 
-
+
+
+
Recent Loads

@@ -88,33 +118,7 @@

- -
- Vehicle Info - - - - - - - - - - - - - - - - - - - - -
- <%= f.label :dl_number, "License No.", :class => "label" %><%= f.label :dl_state, "St", :class => "label" %><%= f.label :dl_expire, "Expiry", :class => "label" %>
<%= f.text_field :dl_number, :size => "14" %><%= f.text_field :dl_state, :size => "2" %><%= f.calendar_date_select :dl_expire, - :size => "10" %>
<%= f.label :truck, "Truck No", :class => "label" %><%= f.label :trailer, "Trailer No", :class => "label" %>
<%= f.text_field :truck, :size => "12" %><%= f.text_field :trailer, :size => "12" %>
-
+

<%= f.submit "Submit" %>

<% end %> diff --git a/app/views/employees/index.html.erb b/app/views/employees/index.html.erb index 964589f..95c17b1 100644 --- a/app/views/employees/index.html.erb +++ b/app/views/employees/index.html.erb @@ -1,5 +1,15 @@ <% title "Driver List" -%> + + + + + + + + + + @@ -14,16 +24,16 @@ <% for employee in @employees %> " onclick="location.href='<%= edit_employee_path(employee) %>'"> - - - - - - - - - - + + + + + + + + + + <% end %>
No. First Name
<%= employee.number %><%= employee.firstname %><%= employee.lastname %><%= employee.street %><%= employee.city %><%= employee.state %><%= employee.zip %><%= employee.dob %><%= employee.hired %><%= number_to_currency employee.payrate %><%= employee.number %><%= employee.firstname %><%= employee.lastname %><%= employee.street %><%= employee.city %><%= employee.state %><%= employee.zip %><%= employee.dob %><%= employee.hired %><%= number_to_currency employee.payrate %>
diff --git a/app/views/loads/_form.html.erb b/app/views/loads/_form.html.erb index b760674..4d7338e 100644 --- a/app/views/loads/_form.html.erb +++ b/app/views/loads/_form.html.erb @@ -1,16 +1,29 @@ <% form_for @load do |f| %> <%= f.error_messages %> -
-
<%= f.label :number %>
-
<%= f.text_field :number %>
-
<%= f.label :start_date %>
-
<%= f.date_select :start_date %>
-
<%= f.label :end_date %>
-
<%= f.date_select :end_date %>
-
<%= f.label :hub_in %>
-
<%= f.text_field :hub_in %>
-
<%= f.label :hub_out %>
-
<%= f.text_field :hub_out %>
-
+
+
+ Trip Info + + + + + + + + + + + + + + + +
+ <%= f.text_field :number, :size => "8" %> + <%= f.text_field :hub_in, :size => "8" %> + <%= f.text_field :hub_out, :size => "8" %>
+
+
+

<%= f.submit "Submit" %>

<% end %> diff --git a/app/views/loads/index.html.erb b/app/views/loads/index.html.erb index 85c0414..60d1317 100644 --- a/app/views/loads/index.html.erb +++ b/app/views/loads/index.html.erb @@ -2,10 +2,7 @@ - - - @@ -14,10 +11,7 @@ <% for load in @loads %> " onclick="location.href='<%= edit_load_path(load) %>'"> - - - diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d831b47..c1963c1 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -131,11 +131,15 @@ p.nav { } .left { - float: left; + text-align: left; } .right { - float: right; + text-align: right; +} + +.center { + text-align: center; } .light { @@ -187,22 +191,14 @@ fieldset .date { } fieldset { - width: 19em; + width: 18em; border: solid 1px #aaa; - padding: 0.75em 0.5em 0.875em 0.5em; + padding: 0 0.5em 0.875em 0.5em; margin-bottom: 1.25em; } fieldset.loads { - width: 27.5em; -} - -fieldset table { - width: 100%; -} - -fieldset table td { - border: none; + width: 28.5em; } legend { @@ -221,40 +217,117 @@ table input { border: 1px solid #ccc; } -.name { - width: 8em; +.listing .name { + width: 6em; } -.street { - width: 22em; +.listing .street { + width: 12em; } -.city { - width: 10em; +.listing .city { + width: 7em; } -.state { - width: 1em; +.listing .state { + width: 1.5em; } -.zip { +.listing .zip { width: 3em; } -.date { +.listing .date { + width: 5em; +} + +.listing .payrate { + width: 2.5em; +} + +fieldset input { + border: none; +} + +fieldset label { + font-size: 56%; + font-weight: bold; + text-transform: uppercase; + margin-top: 0.25em; +} + +fieldset table { + margin-top: 0.5em; + width: 100%; +} + +table { + table-layout: fixed; +} + +#employee_data { + width: 19em; + float: left; +} + +#employee_data col { + width: 10%; +} + +#employee_firstname, +#employee_lastname { + width: 10em; +} + +#employee_street { + width: 21em; +} + +#employee_city { + width: 12em; +} + +#employee_state, +#employee_dl_state { + width: 1.5em; +} + +#employee_zip { + width: 5.5em; +} + +#employee_dob, +#employee_hired, +#employee_dl_expire { width: 6em; text-align: center; } -.payrate { - width: 3em; +#employee_phone, +#employee_ssn { + width: 8em; +} + +#employee_payrate { + width: 3.5em; text-align: right; } -.ssn { - width: 8em; +#employee_tax_status, +#employee_dependents { + width: 1.5em; + text-align: center; +} + +#employee_dl_number { + width: 10em; } -.tax { - width: 3.25em; +#employee_truck, +#employee_trailer { + width: 5.5em; +} + +#driver_loads { + float: right; }
NumberStart Date End DateHub InHub Out Start Point Shipper Origin
<%=h load.number %><%=h load.start_date %> <%=h load.end_date %><%=h load.hub_in %><%=h load.hub_out %> <%=h load.start_point %> <%=h load.shipper %> <%=h load.origin %>