Browse Source

More form and css work

master
jimi 16 years ago
committed by jimi
parent
commit
ef6efb95bf
  1. 93
      app/views/employees/_form.html.erb
  2. 2
      app/views/layouts/application.html.erb
  3. 29
      app/views/loads/_form.html.erb
  4. 1
      public/stylesheets/1_elements.css

93
app/views/employees/_form.html.erb

@ -4,46 +4,60 @@
<fieldset>
<legend>Personal Info</legend>
<table cellpadding="0">
<col /><col /><col /><col /><col /><col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<tr>
<td colspan="5"><%= f.label :firstname, "First Name" %></td>
<td colspan="5"><%= f.label :lastname, "Last Name" %></td>
<tr>
<td colspan="5" class="border">
<%= f.text_field :firstname, :size => "12", :maxsize => 30 %></td>
<%= f.text_field :firstname, :maxsize => "16" %></td>
<td colspan="5" class="border">
<%= f.text_field :lastname, :size => "12" %></td>
<%= f.text_field :lastname, :maxsize => "16" %></td>
</tr>
<tr>
<td colspan="10"><%= f.label :street %></td>
</tr>
<tr>
<td colspan="10" class="border">
<%= f.text_field :street, :size => "30" %></td>
<%= f.text_field :street, :maxsize => "30" %></td>
</tr>
<tr>
<td colspan="6"><%= f.label :city %></td>
<td colspan="7"><%= f.label :city %></td>
<td colspan="1"><%= f.label :state, "St" %></td>
<td colspan="3"><%= f.label :zip %></td>
<td colspan="2"><%= f.label :zip %></td>
</tr>
<tr>
<td colspan="6" class="border"><%= f.text_field :city, :size => "16" %></td>
<td class="border"><%= f.text_field :state, :size => "1" %></td>
<td colspan="3" class="border"><%= f.text_field :zip, :size => "6" %></td>
<td colspan="7" class="border">
<%= f.text_field :city, :maxsize => "16" %></td>
<td colspan="1" class="border">
<%= f.text_field :state, :maxsize => "2" %></td>
<td colspan="2" class="border">
<%= f.text_field :zip, :maxsize => "7" %></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Tax Info</legend>
<table cellpadding="0">
<col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<tr>
<td colspan="4"><%= f.label :dob, "Birth Date" %></td>
<td colspan="4"><%= f.label :hired, "Hire Date" %></td>
<td colspan="2"><%= f.label :payrate, "Pay Rate" %></td>
<td colspan="2"><%= f.label :payrate, "Rate" %></td>
</tr>
<tr>
<td colspan="4" class="border"><%= f.calendar_date_select :dob, :size => "8",
<td colspan="4" class="border">
<%= f.calendar_date_select :dob, :maxsize => "10",
:year_range => 70.years.ago..0.years.ago,
:buttons => false %></td>
<td colspan="4" class="border"><%= f.calendar_date_select :hired, :size => "8",
<td colspan="4" class="border">
<%= f.calendar_date_select :hired, :maxsize => "10",
:year_range => 20.years.ago..1.year.from_now,
:buttons => false %></td>
<td colspan="2" class="border"><%= f.text_field :payrate, :size => "2" %></td>
<td colspan="2" class="border">
<%= f.text_field :payrate, :maxsize => "4" %></td>
</tr>
<tr>
<td colspan="10"><label>More Info</label></td>
@ -57,10 +71,14 @@
<td colspan="2"><%= f.label :tax_status, "Tax Info" %></td>
</tr>
<tr>
<td colspan="4" class="border"><%= f.text_field :phone, :size => "10" %></td>
<td colspan="4" class="border"><%= f.text_field :ssn, :size => "9" %></td>
<td colspan="1" class="border"><%= f.text_field :tax_status, :size => "1" %></td>
<td colspan="1" class="border"><%= f.text_field :dependents, :size => "1" %></td>
<td colspan="4" class="border">
<%= f.text_field :phone, :maxsize => "13" %></td>
<td colspan="4" class="border">
<%= f.text_field :ssn, :maxsize => "11" %></td>
<td colspan="1" class="border">
<%= f.text_field :tax_status, :maxsize => "1" %></td>
<td colspan="1" class="border">
<%= f.text_field :dependents, :maxsize => "2" %></td>
</tr>
</table>
</fieldset>
@ -68,17 +86,20 @@
<fieldset>
<legend>Vehicle Info</legend>
<table cellspacing="0">
<col /><col /><col /><col /><col /><col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<tr>
<td colspan="5"><%= f.label :dl_number, "License No." %></td>
<td colspan="1"><%= f.label :dl_state, "St", :class => "label" %></td>
<td colspan="4"><%= f.label :dl_expire, "Expiry", :class => "label" %></td>
<td colspan="1"><%= f.label :dl_state, "St" %></td>
<td colspan="4"><%= f.label :dl_expire, "Expiry" %></td>
</tr>
<tr>
<td colspan="5" class="border"><%= f.text_field :dl_number, :size => "12" %></td>
<td colspan="1" class="border"><%= f.text_field :dl_state, :size => "1" %></td>
<td colspan="5" class="border">
<%= f.text_field :dl_number, :maxsize => "15" %></td>
<td colspan="1" class="border">
<%= f.text_field :dl_state, :maxsize => "2" %></td>
<td colspan="4" class="border">
<%= f.calendar_date_select :dl_expire, :size => "8" %></td>
<%= f.calendar_date_select :dl_expire, :maxsize => "10" %></td>
</tr>
<!-- Truck Info -->
<tr>
@ -87,8 +108,10 @@
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="3" class="border"><%= f.text_field :truck, :size => "12" %></td>
<td colspan="3" class="border"><%= f.text_field :trailer, :size => "12" %></td>
<td colspan="3" class="border">
<%= f.text_field :truck, :maxsize => "12" %></td>
<td colspan="3" class="border">
<%= f.text_field :trailer, :maxsize => "12" %></td>
<td colspan="4" class="border">&nbsp;</td>
</tr>
</table>
@ -97,26 +120,6 @@
<div id="driver_loads">
<fieldset class="loads">
<legend>Recent Loads</legend>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</fieldset>
</div>
<hr class="clear">

2
app/views/layouts/application.html.erb

@ -4,7 +4,7 @@
<head>
<title><%= h(yield(:title) || "Untitled") %></title>
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag 'reset', 'application' %>
<%= stylesheet_link_tag :all %>
<%= calendar_date_select_includes %>
<%= yield(:head) %>
</head>

29
app/views/loads/_form.html.erb

@ -4,21 +4,42 @@
<fieldset>
<legend>Load Detail</legend>
<table cellspacing="0">
<col /><col /><col /><col /><col />
<col /><col /><col /><col /><col />
<col /><col /><col /><col /><col /><col /><col />
<col /><col /><col /><col /><col /><col /><col />
<tr>
<td colspan="4"><%= f.label :number, "Trip Number" %></td>
<td colspan="3"><%= f.label :number, "Trip Number" %></td>
<td colspan="3"><%= f.label :hub_in %></td>
<td colspan="3"><%= f.label :hub_out %></td>
<td colspan="5"></td>
</tr>
<tr>
<td colspan="4" class="border"><%= f.text_field :number %></td>
<td colspan="3" class="border"><%= f.text_field :number %></td>
<td colspan="3" class="border"><%= f.text_field :hub_in %></td>
<td colspan="3" class="border"><%= f.text_field :hub_out %></td>
<td colspan="5" class="border"></td>
</tr>
<tr>
<td colspan="4"><%= f.label :start_date %></td>
<td colspan="4"><%= f.label :end_date %></td>
<td colspan="1"><label>St</label></td>
<td colspan="5"></td>
</tr>
<tr>
<td colspan="4" class="border">
<%= f.calendar_date_select :start_date, :maxsize => "10" %></td>
<td colspan="4" class="border">
<%= f.calendar_date_select :end_date, :maxsize => "10" %></td>
<td colspan="1" class="border"></td>
<td colspan="5" class="border"></td>
</tr>
</table>
</fieldset>
</div>
<div id="load_expense">
<fieldset>
<legend>Load Expenses</legend>
</fieldset>
</div>
<hr noshade size="1" class="clear">
<p><%= f.submit "Submit" %></p>
<% end %>

1
public/stylesheets/1_elements.css

@ -92,6 +92,7 @@ fieldset label {
font-weight: bold;
text-transform: uppercase;
margin-top: 0.25em;
color: #333;
}
fieldset table {