Changeset 1233

Show
Ignore:
Timestamp:
11/11/06 20:05:14 (2 years ago)
Author:
james
Message:

add status to orders

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • peasantonline/app/helpers/admin_helper.rb

    r995 r1233  
    2121    return values 
    2222  end 
     23   
     24  def get_status() 
     25     return ["NEW", "Processed", "Shipped", "Cancelled", "Returned"] 
     26   end 
    2327 
    2428end 
  • peasantonline/app/views/admin/_form_orders.rhtml

    r1057 r1233  
    4343<p><label for="order_shipped_on">Shipped On</label><br/> 
    4444<%= date_select 'order', 'shipped_on'  %></p> 
     45 
     46<p><label for="order_status">Status</label><br/> 
     47<%= select('order', 'status', get_status()) %></p> 
    4548<!--[eoform:order]--> 
    4649 
  • peasantonline/app/views/admin/list_orders.rhtml

    r1221 r1233  
    88        <th>Country</th> 
    99        <th>Order Total</th> 
     10        <th>Order Status</th> 
    1011        <th>Comments</th> 
    1112        <th colspan="3"></th> 
     
    2324        format_price(sum) 
    2425        %></td> 
     26        <td><%= order.status %></td> 
    2527        <td><%= order.comments %></td> 
    2628    <td><%= link_to 'Show', :action => 'show_orders', :id => order %></td> 
  • peasantonline/db/schema.rb

    r1138 r1233  
    33# then regenerate this schema definition. 
    44 
    5 ActiveRecord::Schema.define(:version => 23) do 
     5ActiveRecord::Schema.define(:version => 24) do 
    66 
    77  create_table "categories", :force => true do |t| 
     
    4949    t.column "country", :string 
    5050    t.column "sales_tax", :float 
     51    t.column "status", :string, :default => "NEW" 
    5152  end 
    5253