diff --git a/ERD.pdf b/ERD.pdf
new file mode 100644
index 0000000..fd913dc
Binary files /dev/null and b/ERD.pdf differ
diff --git a/app/overrides/add_banner_to_header.rb b/app/overrides/add_banner_to_header.rb
index 4ca7bb5..3f008a4 100644
--- a/app/overrides/add_banner_to_header.rb
+++ b/app/overrides/add_banner_to_header.rb
@@ -1,22 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/layouts/spree_application',
:name => 'add_banner_to_header',
:insert_after => '#nav-bar',
- :text => "<%= render :partial => 'shared/banner'%>")
-
-Deface::Override.new(:virtual_path => 'spree/static_content/show',
- :name => 'remove_title_from_page',
- :remove => 'h1')
-
-Deface::Override.new(:virtual_path => 'spree/static_content/show',
- :name => 'insert_page_title_for_static_content',
- :insert_after => '#page_content',
- :text => "<% content_for :banner do %>
-
<%= @page.title %>
- <% end %>")
-
-Deface::Override.new(:virtual_path => 'spree/products/index',
- :name => 'insert_page_title_for_products_index',
- :insert_after => "[data-hook='homepage_products']",
- :text => "<% content_for :banner do %>
- Products
- <% end %>")
+ :text => "<%= render :partial => 'shared/banner'%>")
\ No newline at end of file
diff --git a/app/overrides/add_sub_heading_field_to_admin.rb b/app/overrides/add_sub_heading_field_to_admin.rb
new file mode 100644
index 0000000..f7d713d
--- /dev/null
+++ b/app/overrides/add_sub_heading_field_to_admin.rb
@@ -0,0 +1,16 @@
+Deface::Override.new(:virtual_path => 'spree/admin/pages/_form',
+ :name => 'add_sub_heading_to_admin_pages',
+ :insert_before => "code[erb-loud]:contains('f.field_container :slug')",
+ :text => "<%= f.field_container :sub_heading do %>
+ <%= f.label :sub_heading, t(:sub_heading) %>
+ <%= f.text_field :sub_heading, :class => 'fullwidth title' %>
+ <%= f.error_message_on :title %>
+ <% end %>")
+Deface::Override.new(:virtual_path => 'spree/admin/products/_form',
+ :name => 'add_sub_heading_to_admin_products',
+ :insert_before => "code[erb-loud]:contains('f.field_container :permalink')",
+ :text => "<%= f.field_container :sub_heading do %>
+ <%= f.label :sub_heading, t(:sub_heading) %>
+ <%= f.text_field :sub_heading, :class => 'fullwidth title' %>
+ <%= f.error_message_on :title %>
+ <% end %>")
diff --git a/app/overrides/products_banner.rb b/app/overrides/products_banner.rb
new file mode 100644
index 0000000..7d8352e
--- /dev/null
+++ b/app/overrides/products_banner.rb
@@ -0,0 +1,13 @@
+Deface::Override.new(:virtual_path => 'spree/products/index',
+ :name => 'insert_page_title_for_products_index',
+ :insert_before => "[data-hook='homepage_products']",
+ :text => "<%= render 'shared/banner_content', :heading => 'Products', :sub_heading => 'Take a look at the goods' %>")
+
+Deface::Override.new(:virtual_path => 'spree/products/show',
+ :name => 'insert_page_title_for_products_show',
+ :insert_before => "[data-hook='product_show']",
+ :text => "<%= render 'shared/banner_content', :heading => @product.name, :sub_heading => @product.sub_heading %>")
+
+Deface::Override.new(:virtual_path => 'spree/products/show',
+ :name => 'remove_title_from_product'
+ :remove => '.product-title')
diff --git a/app/overrides/static_pages_banner.rb b/app/overrides/static_pages_banner.rb
new file mode 100644
index 0000000..a6392ab
--- /dev/null
+++ b/app/overrides/static_pages_banner.rb
@@ -0,0 +1,8 @@
+Deface::Override.new(:virtual_path => 'spree/static_content/show',
+ :name => 'remove_title_from_page',
+ :remove => 'h1')
+
+Deface::Override.new(:virtual_path => 'spree/static_content/show',
+ :name => 'insert_page_title_for_static_content',
+ :insert_after => '#page_content',
+ :text => "<%= render 'shared/banner_content', :heading => @page.title, :sub_heading => @page.sub_heading %>")
\ No newline at end of file
diff --git a/app/views/shared/_banner_content.html.erb b/app/views/shared/_banner_content.html.erb
new file mode 100644
index 0000000..bce3e1c
--- /dev/null
+++ b/app/views/shared/_banner_content.html.erb
@@ -0,0 +1,3 @@
+<% content_for :banner do %>
+ <%= heading %> - <%= sub_heading%>
+<% end %>
diff --git a/db/migrate/20120321030256_add_subheading_to_spree_pages.rb b/db/migrate/20120321030256_add_subheading_to_spree_pages.rb
new file mode 100644
index 0000000..9918338
--- /dev/null
+++ b/db/migrate/20120321030256_add_subheading_to_spree_pages.rb
@@ -0,0 +1,5 @@
+class AddSubheadingToSpreePages < ActiveRecord::Migration
+ def change
+ add_column :spree_pages, :sub_heading, :string
+ end
+end
diff --git a/db/migrate/20120321033730_add_sub_heading_to_spree_products.rb b/db/migrate/20120321033730_add_sub_heading_to_spree_products.rb
new file mode 100644
index 0000000..a4f44bd
--- /dev/null
+++ b/db/migrate/20120321033730_add_sub_heading_to_spree_products.rb
@@ -0,0 +1,5 @@
+class AddSubHeadingToSpreeProducts < ActiveRecord::Migration
+ def change
+ add_column :spree_products, :sub_heading, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d5a5add..85eb400 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120219020344) do
+ActiveRecord::Schema.define(:version => 20120321033730) do
create_table "spree_activators", :force => true do |t|
t.string "description"
@@ -249,6 +249,7 @@
t.string "layout"
t.boolean "show_in_sidebar", :default => false, :null => false
t.string "meta_title"
+ t.string "sub_heading"
end
add_index "spree_pages", ["slug"], :name => "index_pages_on_slug"
@@ -353,6 +354,7 @@
t.datetime "created_at"
t.datetime "updated_at"
t.integer "count_on_hand", :default => 0, :null => false
+ t.string "sub_heading"
end
add_index "spree_products", ["available_on"], :name => "index_products_on_available_on"