Permalink
Browse files

Added spree_static_content

  • Loading branch information...
1 parent 839d5f2 commit d3962da9b733c040a535b5cd2e8d318529d2b2f2 @BDQ BDQ committed Feb 1, 2011
View
@@ -17,7 +17,8 @@ gem 'spree_email_to_friend'
gem 'spree_related_products', :git => 'git://github.com/spree/spree_related_products.git'
gem 'spree_social', :git => 'git://github.com/spree/spree_social.git'
gem 'spree_wishlist', :git => 'git://github.com/spree/spree_wishlist.git', :branch => 'rails3'
-
+gem 'spree_static_content', :git => 'git://github.com/spree/spree-static-content.git'
+gem 'spree_editor', :git => 'git://github.com/divineforest/spree_editor.git'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
gem 'ruby-debug'
View
@@ -1,4 +1,11 @@
GIT
+ remote: git://github.com/divineforest/spree_editor.git
+ revision: bf7153607e737348b3643f2911be18b4c6127cdd
+ specs:
+ spree_editor (1.0.0)
+ spree_core (>= 0.30.0)
+
+GIT
remote: git://github.com/jzw/spree_recently_viewed.git
revision: d64436670766b54da26b82b29c5cfd5766d985d1
specs:
@@ -16,6 +23,14 @@ GIT
spree_core (>= 0.30.1)
GIT
+ remote: git://github.com/spree/spree-static-content.git
+ revision: f622601fb9d417347245fdb060f7dabf3b148faf
+ specs:
+ spree_static_content (0.40.0)
+ spree_core (>= 0.30.0)
+ spree_editor
+
+GIT
remote: git://github.com/spree/spree.git
revision: 5e248eadb9f5b0e6ff6f2e522126687f56940f8d
specs:
@@ -316,8 +331,10 @@ DEPENDENCIES
rspec-rails (>= 2.0.1)
ruby-debug
spree!
+ spree_editor!
spree_email_to_friend
spree_recently_viewed!
spree_related_products!
spree_social!
+ spree_static_content!
spree_wishlist!
@@ -3,7 +3,7 @@
private
def load_root_taxons
- @taxons = Taxonomy.where(:name => "Categories").first.root.children
+ @taxons ||= Taxonomy.where(:name => "Categories").first.root.children
end
end
@@ -36,7 +36,7 @@
<% end %>
<nav>
<%= link_to "products", products_path %>
- <a href="#">help</a>
+ <a href="/help">help</a>
<% if current_user %>
<%= link_to t('my_account'), account_path, :class => "cart" %>
<%= link_to t('logout'), destroy_user_session_path, :class => "cart" %>
@@ -110,12 +110,12 @@
<div id="menu">
<h3>Menu</h3>
<p>
- <a href="#">About us</a><br />
- <a href="#">Privacy policy</a>
+ <a href="/about">About us</a><br />
+ <a href="/privacy">Privacy policy</a>
</p>
</div>
- <p id="copyright">&copy; Copyright 2010 Railsdog Radio. All rights reserved</p>
+ <p id="copyright">&copy; Copyright <%= Time.zone.now.year %> Railsdog Radio. All rights reserved</p>
</div>
</footer>
@@ -12,6 +12,8 @@
<% end %>
<% end %>
+<p class="breadcrumbs"><%= link_to 'Home', root_url %> &raquo; <%= @product_group.present? ? @product_group.name : "Products" %></p>
+
<% content_for :sidebar do %>
<%= render 'shared/all_products' %>
<%= render 'shared/recently_viewed_products' %>
@@ -1,20 +0,0 @@
-<div id="aside" role="aside">
- <div>
- <h2>ALL PRODUCTS</h2>
- <hr/>
- <ul>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">Slingbox &amp; Slingbox Accessories</a></li>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">SIRIUS XM Satellite Radios</a></li>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">Slingbox &amp; Slingbox Accessories</a></li>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">SIRIUS XM Satellite Radios</a></li>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">Slingbox &amp; Slingbox Accessories</a></li>
- <li><a href="#">Holiday Sale Items</a></li>
- <li><a href="#">SIRIUS XM Satellite Radios</a></li>
- </ul>
- </div>
-</div>
@@ -0,0 +1,16 @@
+<% content_for :head do -%>
+ <meta name="title" content="<%=@page.title%>">
+ <% if @page.attribute_present? :meta_keywords -%>
+ <meta name="keywords" content="<%=@page.meta_keywords%>">
+ <% end -%>
+ <% if @page.attribute_present? :meta_description -%>
+ <meta name="description" content="<%=@page.meta_description%>">
+ <% end -%>
+<% end -%>
+<% content_for :sidebar do %>
+ <% @taxons ||= Taxonomy.where(:name => "Categories").first.root.children %>
+ <br />
+ <%= render 'shared/all_products' %>
+<% end %>
+<h2><%= @page.title %></h2>
+<%= raw @page.body %>
@@ -0,0 +1,15 @@
+class CreatePages < ActiveRecord::Migration
+ def self.up
+ create_table :pages do |t|
+ t.string :title
+ t.text :body
+ t.string :slug
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :pages
+ end
+end
@@ -0,0 +1,21 @@
+class ExtendPages < ActiveRecord::Migration
+ def self.up
+ change_table :pages do |t|
+ t.boolean :show_in_header, :default => false, :null => false
+ t.boolean :show_in_footer, :default => false, :null => false
+ t.string :foreign_link
+ t.integer :position, :default => 1, :null => false
+ Page.all(:order => "updated_at ASC").each_with_index{|page,x| page.update_attribute(:position, x+1)}
+
+ end
+ end
+
+ def self.down
+ change_table :pages do |t|
+ t.remove :show_in_header
+ t.remove :show_in_footer
+ t.remove :foreign_link
+ t.remove :position
+ end
+ end
+end
@@ -0,0 +1,10 @@
+class AddVisibleToPages < ActiveRecord::Migration
+ def self.up
+ add_column :pages, :visible, :boolean
+ Page.update_all :visible => true
+ end
+
+ def self.down
+ remove_column :pages, :visible
+ end
+end
@@ -0,0 +1,8 @@
+class AddDefaultTrueToVisibleForPage < ActiveRecord::Migration
+ def self.up
+ change_column :pages, :visible, :boolean, :default=> true
+ end
+
+ def self.down
+ end
+end
@@ -0,0 +1,10 @@
+class AddIndexForPage < ActiveRecord::Migration
+ def self.up
+ add_index(:pages, :slug)
+ end
+
+ def self.down
+ remove_index(:pages, :slug)
+ end
+end
+
@@ -0,0 +1,9 @@
+class AddMetaFieldsToPages < ActiveRecord::Migration
+ def self.up
+ add_column :pages, :meta_keywords, :string
+ add_column :pages, :meta_description, :string
+ end
+
+ def self.down
+ end
+end
@@ -0,0 +1,9 @@
+class AddLayoutToPages < ActiveRecord::Migration
+ def self.up
+ add_column :pages, :layout, :string
+ end
+
+ def self.down
+ remove_column :pages, :layout
+ end
+end
@@ -0,0 +1,9 @@
+class AddShowInSidebarOptionToPages < ActiveRecord::Migration
+ def self.up
+ add_column :pages, :show_in_sidebar, :boolean, :default=> false, :null=>false
+ end
+
+ def self.down
+ remove_column :pages, :show_in_sidebar
+ end
+end
View
@@ -220,6 +220,25 @@
add_index "orders", ["number"], :name => "index_orders_on_number"
+ create_table "pages", :force => true do |t|
+ t.string "title"
+ t.text "body"
+ t.string "slug"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "show_in_header", :default => false, :null => false
+ t.boolean "show_in_footer", :default => false, :null => false
+ t.string "foreign_link"
+ t.integer "position", :default => 1, :null => false
+ t.boolean "visible", :default => true
+ t.string "meta_keywords"
+ t.string "meta_description"
+ t.string "layout"
+ t.boolean "show_in_sidebar", :default => false, :null => false
+ end
+
+ add_index "pages", ["slug"], :name => "index_pages_on_slug"
+
create_table "payment_methods", :force => true do |t|
t.string "type"
t.string "name"
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.
View
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit d3962da

Please sign in to comment.