This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
forked from pero-ict-solutions/spree-static-content
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
282e61e
commit 0627983
Showing
23 changed files
with
97 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.70.3 | ||
1.0.0.beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
app/controllers/admin/pages_controller.rb → ...ntrollers/spree/admin/pages_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
12 changes: 6 additions & 6 deletions
12
app/controllers/static_content_controller.rb → ...ollers/spree/static_content_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Deface::Override.new(:virtual_path => "layouts/admin", | ||
Deface::Override.new(:virtual_path => "spree/layouts/admin", | ||
:name => "static_content_admin_tab", | ||
:insert_bottom => "[data-hook='admin_tabs']", | ||
:text => "<%= tab(:pages) %>") |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
app/views/admin/pages/edit.html.erb → app/views/spree/admin/pages/edit.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/views/admin/pages/new.html.erb → app/views/spree/admin/pages/new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
Rails.application.routes.draw do | ||
Spree::Core::Engine.routes.append do | ||
|
||
namespace :admin do | ||
resources :pages | ||
end | ||
|
||
match '/static/*path', :to => 'static_content#show', :via => :get, :as => 'static' | ||
|
||
match '/*path', :to => 'static_content#show', :via => :get, :as => 'static' | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
class AddVisibleToPages < ActiveRecord::Migration | ||
class Page < ActiveRecord::Base | ||
end | ||
|
||
def self.up | ||
add_column :pages, :visible, :boolean | ||
Page.update_all :visible => true | ||
if Page.table_exists? | ||
Page.update_all :visible => true | ||
else | ||
Spree::Page.update_all :visible => true | ||
end | ||
end | ||
|
||
def self.down | ||
remove_column :pages, :visible | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class PrefixTableNames < ActiveRecord::Migration | ||
def change | ||
rename_table :pages, :spree_pages | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,3 @@ | ||
require 'spree_core' | ||
require 'spree/core' | ||
require 'formtastic' | ||
|
||
module SpreeStaticContent | ||
class Engine < Rails::Engine | ||
engine_name 'spree_static_content' | ||
|
||
def self.activate | ||
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| | ||
Rails.application.config.cache_classes ? require(c) : load(c) | ||
end | ||
|
||
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/**/*.rb")) do |c| | ||
Rails.application.config.cache_classes ? require(c) : load(c) | ||
end | ||
end | ||
config.to_prepare &method(:activate).to_proc | ||
config.autoload_paths += %W(#{config.root}/lib) | ||
end | ||
end | ||
|
||
require 'spree_static_content/engine' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module SpreeStaticContent | ||
class Engine < Rails::Engine | ||
engine_name 'spree_static_content' | ||
|
||
def self.activate | ||
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c| | ||
Rails.application.config.cache_classes ? require(c) : load(c) | ||
end | ||
|
||
Dir.glob(File.join(File.dirname(__FILE__), "../../app/overrides/**/*.rb")) do |c| | ||
Rails.application.config.cache_classes ? require(c) : load(c) | ||
end | ||
end | ||
config.to_prepare &method(:activate).to_proc | ||
config.autoload_paths += %W(#{config.root}/lib) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.