solidus_static_content 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gem_release.yml +5 -0
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/lint.yml +29 -0
- data/.github/workflows/test.yml +25 -0
- data/.gitignore +18 -6
- data/.rspec +2 -3
- data/.standard.yml +6 -0
- data/CHANGELOG.md +110 -0
- data/Gemfile +48 -7
- data/Guardfile +9 -7
- data/README.md +94 -69
- data/Rakefile +4 -13
- data/app/assets/stylesheets/spree/frontend/solidus_static_content.css +7 -0
- data/app/assets/stylesheets/spree/frontend/spree_static_content.css +2 -7
- data/app/helpers/spree/pages_helper.rb +9 -5
- data/app/models/solidus_static_content/permission_sets/page_display.rb +21 -0
- data/app/models/solidus_static_content/permission_sets/page_management.rb +21 -0
- data/app/models/spree/page.rb +36 -37
- data/app/overrides/solidus_static_content/pages_in_footer.rb +11 -0
- data/app/overrides/solidus_static_content/pages_in_header.rb +11 -0
- data/app/overrides/solidus_static_content/pages_in_sidebar.rb +11 -0
- data/bin/console +17 -0
- data/bin/r +9 -0
- data/bin/rails +7 -6
- data/bin/rails-engine +15 -0
- data/bin/rails-sandbox +17 -0
- data/bin/rake +7 -0
- data/bin/sandbox +77 -0
- data/bin/sandbox_rails +9 -0
- data/bin/setup +8 -0
- data/config/locales/de.yml +7 -5
- data/config/locales/en.yml +7 -6
- data/config/locales/es-MX.yml +38 -0
- data/config/locales/es.yml +6 -5
- data/config/locales/et.yml +6 -5
- data/config/locales/fr.yml +7 -5
- data/config/locales/it.yml +6 -5
- data/config/locales/nl.yml +7 -5
- data/config/locales/pl.yml +6 -5
- data/config/locales/pt-BR.yml +6 -5
- data/config/locales/pt.yml +7 -5
- data/config/locales/ro.yml +11 -9
- data/config/locales/ru.yml +7 -5
- data/config/locales/sv.yml +7 -5
- data/config/routes.rb +13 -3
- data/db/migrate/20081216193152_create_pages.rb +3 -1
- data/db/migrate/20090625125735_extend_pages.rb +10 -9
- data/db/migrate/20090814113100_add_visible_to_pages.rb +6 -4
- data/db/migrate/20090814142845_add_default_true_to_visible_for_page.rb +5 -3
- data/db/migrate/20090829000527_add_index_for_page.rb +3 -2
- data/db/migrate/20091219021134_add_meta_fields_to_pages.rb +3 -1
- data/db/migrate/20100204105222_add_layout_to_pages.rb +4 -2
- data/db/migrate/20100323085528_add_show_in_sidebar_option_to_pages.rb +5 -3
- data/db/migrate/20110717103112_add_meta_title_to_page.rb +3 -1
- data/db/migrate/20120723144115_add_render_as_partial_for_layout_for_spree_pages.rb +9 -7
- data/db/migrate/20140926121757_add_pages_stores.rb +3 -3
- data/db/migrate/20180305193240_update_spree_page_position.rb +15 -0
- data/lib/controllers/backend/spree/admin/pages_controller.rb +22 -0
- data/lib/controllers/frontend/spree/static_content_controller.rb +32 -0
- data/lib/generators/solidus_static_content/install/install_generator.rb +35 -5
- data/lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb +28 -0
- data/lib/generators/solidus_static_content/install/templates/app/views/static_content/show.html.erb +28 -0
- data/lib/solidus_static_content/engine.rb +43 -0
- data/lib/solidus_static_content/route_matcher.rb +15 -0
- data/lib/solidus_static_content/testing_support/factories.rb +18 -0
- data/lib/solidus_static_content/version.rb +5 -0
- data/lib/solidus_static_content.rb +5 -20
- data/lib/views/backend/spree/admin/pages/_form.html.erb +119 -0
- data/lib/views/backend/spree/admin/pages/edit.html.erb +32 -0
- data/lib/views/backend/spree/admin/pages/index.html.erb +68 -0
- data/lib/views/backend/spree/admin/pages/new.html.erb +31 -0
- data/lib/views/backend/spree/admin/shared/_pages_tabs.html.erb +9 -0
- data/{app/views → lib/views/frontend}/spree/static_content/_static_content_sidebar.html.erb +1 -1
- data/lib/views/frontend/spree/static_content/show.html.erb +18 -0
- data/solidus_static_content.gemspec +35 -31
- metadata +75 -184
- data/.travis.yml +0 -21
- data/app/assets/javascripts/spree/backend/spree_static_content.js +0 -1
- data/app/assets/javascripts/spree/frontend/spree_static_content.js +0 -1
- data/app/assets/stylesheets/spree/backend/spree_static_content.css +0 -3
- data/app/controllers/spree/admin/pages_controller.rb +0 -3
- data/app/controllers/spree/static_content_controller.rb +0 -20
- data/app/overrides/pages_in_footer.rb +0 -5
- data/app/overrides/pages_in_header.rb +0 -5
- data/app/overrides/pages_in_menu.rb +0 -5
- data/app/overrides/pages_in_sidebar.rb +0 -5
- data/app/views/spree/admin/pages/_form.html.erb +0 -98
- data/app/views/spree/admin/pages/edit.html.erb +0 -18
- data/app/views/spree/admin/pages/index.html.erb +0 -51
- data/app/views/spree/admin/pages/new.html.erb +0 -18
- data/app/views/spree/static_content/show.html.erb +0 -26
- data/lib/spree_static_content/engine.rb +0 -17
- data/spec/controllers/static_content_controller_spec.rb +0 -37
- data/spec/factories/page_factory.rb +0 -18
- data/spec/features/admin/pages_spec.rb +0 -67
- data/spec/features/static_content_spec.rb +0 -53
- data/spec/helpers/page_helper_spec.rb +0 -14
- data/spec/lib/spree_static.content_spec.rb +0 -34
- data/spec/models/page_spec.rb +0 -46
- data/spec/spec_helper.rb +0 -50
- /data/{LICENSE.md → LICENSE} +0 -0
- /data/{app/views → lib/views/frontend}/spree/static_content/_static_content_footer.html.erb +0 -0
- /data/{app/views → lib/views/frontend}/spree/static_content/_static_content_header.html.erb +0 -0
- /data/{app/views → lib/views/frontend}/spree/static_content/_static_content_list.html.erb +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<%= render 'spree/admin/shared/pages_tabs' %>
|
|
2
|
+
|
|
3
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Page), spree.admin_pages_path) %>
|
|
4
|
+
|
|
5
|
+
<% content_for :page_title do %>
|
|
6
|
+
<%= t("spree.new_page") %>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<% content_for :page_actions do %>
|
|
10
|
+
<li>
|
|
11
|
+
<%= button_to t("spree.back_to_static_pages_list"), spree.admin_pages_path %>
|
|
12
|
+
</li>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<%= render "spree/shared/error_messages", :target => @page %>
|
|
16
|
+
|
|
17
|
+
<div data-hook='admin_page_new_form'>
|
|
18
|
+
<%= form_for [:admin, @page] do |f| %>
|
|
19
|
+
<fieldset class='no-border-top'>
|
|
20
|
+
<%= render partial: 'form', locals: { f: f } %>
|
|
21
|
+
|
|
22
|
+
<div class='clear'></div>
|
|
23
|
+
|
|
24
|
+
<% if can?(:create, Spree::Page) %>
|
|
25
|
+
<div data-hook='admin_page_new_form_buttons'>
|
|
26
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
|
27
|
+
</div>
|
|
28
|
+
<% end %>
|
|
29
|
+
</fieldset>
|
|
30
|
+
<% end %>
|
|
31
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if Spree::Page.by_store(current_store).visible.sidebar_links.any? %>
|
|
2
2
|
<nav id="pages" class="sidebar-item">
|
|
3
|
-
<h6 class="pages-root"><%=
|
|
3
|
+
<h6 class="pages-root"><%= t("spree.pages") %></h6>
|
|
4
4
|
<ul class="pages-list"><%= render :partial => "spree/static_content/static_content_list", :collection => Spree::Page.visible.sidebar_links, :as => :page %></ul>
|
|
5
5
|
</nav>
|
|
6
6
|
<% end %>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<% if @page.layout.present? and @page.render_layout_as_partial? %>
|
|
2
|
+
<%= render :partial => @page.layout %>
|
|
3
|
+
<% else %>
|
|
4
|
+
<% content_for :sidebar do %>
|
|
5
|
+
<div data-hook="homepage_sidebar_navigation">
|
|
6
|
+
<% if "spree/products" == params[:controller] && @taxon %>
|
|
7
|
+
<%= render partial: 'spree/shared/filters' %>
|
|
8
|
+
<% else %>
|
|
9
|
+
<%= render partial: 'spree/shared/taxonomies' %>
|
|
10
|
+
<% end %>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<h1><%= @page.title %></h1>
|
|
15
|
+
<div id="page_content">
|
|
16
|
+
<%= raw @page.body %>
|
|
17
|
+
</div>
|
|
18
|
+
<% end %>
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/solidus_static_content/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "solidus_static_content"
|
|
7
|
+
spec.version = SolidusStaticContent::VERSION
|
|
8
|
+
spec.authors = ["Peter Berkenbosch", "Roman Smirnov"]
|
|
9
|
+
spec.email = "peter@pero-ict.nl"
|
|
10
|
+
|
|
11
|
+
spec.summary = "Extension to manage the static pages for your Solidus store."
|
|
12
|
+
spec.description = "Manage the static pages of your Solidus store or replace existing pages with a static version"
|
|
13
|
+
spec.homepage = "https://github.com/solidusio-contrib/solidus_static_content#readme"
|
|
14
|
+
spec.license = "BSD-3-Clause"
|
|
15
|
+
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/solidusio-contrib/solidus_static_content#readme"
|
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/solidusio-contrib/solidus_static_content/releases"
|
|
19
|
+
|
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
|
|
21
|
+
|
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
24
|
+
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
|
|
25
|
+
|
|
26
|
+
spec.files = files.grep_v(%r{^(test|spec|features)/})
|
|
27
|
+
spec.bindir = "exe"
|
|
28
|
+
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
|
+
spec.require_paths = ["lib"]
|
|
30
|
+
|
|
31
|
+
spec.add_dependency "deface", "~> 1.0"
|
|
32
|
+
spec.add_dependency "solidus_core", [">= 2.0.0", "< 5"]
|
|
33
|
+
spec.add_dependency "solidus_support", "~> 0.8"
|
|
34
|
+
|
|
35
|
+
spec.add_development_dependency "solidus_dev_support", "~> 2.7"
|
|
32
36
|
end
|
metadata
CHANGED
|
@@ -1,228 +1,118 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solidus_static_content
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Berkenbosch
|
|
8
8
|
- Roman Smirnov
|
|
9
|
-
|
|
10
|
-
bindir: bin
|
|
9
|
+
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: solidus
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - ">="
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '1.1'
|
|
21
|
-
- - "<"
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version: '3'
|
|
24
|
-
type: :runtime
|
|
25
|
-
prerelease: false
|
|
26
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
27
|
-
requirements:
|
|
28
|
-
- - ">="
|
|
29
|
-
- !ruby/object:Gem::Version
|
|
30
|
-
version: '1.1'
|
|
31
|
-
- - "<"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '3'
|
|
34
13
|
- !ruby/object:Gem::Dependency
|
|
35
14
|
name: deface
|
|
36
15
|
requirement: !ruby/object:Gem::Requirement
|
|
37
16
|
requirements:
|
|
38
17
|
- - "~>"
|
|
39
18
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.0
|
|
19
|
+
version: '1.0'
|
|
41
20
|
type: :runtime
|
|
42
21
|
prerelease: false
|
|
43
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
44
23
|
requirements:
|
|
45
24
|
- - "~>"
|
|
46
25
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.0
|
|
26
|
+
version: '1.0'
|
|
48
27
|
- !ruby/object:Gem::Dependency
|
|
49
|
-
name:
|
|
50
|
-
requirement: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '2.7'
|
|
55
|
-
type: :development
|
|
56
|
-
prerelease: false
|
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '2.7'
|
|
62
|
-
- !ruby/object:Gem::Dependency
|
|
63
|
-
name: factory_girl
|
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '4.7'
|
|
69
|
-
type: :development
|
|
70
|
-
prerelease: false
|
|
71
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '4.7'
|
|
76
|
-
- !ruby/object:Gem::Dependency
|
|
77
|
-
name: ffaker
|
|
28
|
+
name: solidus_core
|
|
78
29
|
requirement: !ruby/object:Gem::Requirement
|
|
79
30
|
requirements:
|
|
80
31
|
- - ">="
|
|
81
32
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
83
|
-
|
|
84
|
-
prerelease: false
|
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
90
|
-
- !ruby/object:Gem::Dependency
|
|
91
|
-
name: database_cleaner
|
|
92
|
-
requirement: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - "~>"
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '1.5'
|
|
97
|
-
type: :development
|
|
98
|
-
prerelease: false
|
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.5'
|
|
104
|
-
- !ruby/object:Gem::Dependency
|
|
105
|
-
name: rspec-rails
|
|
106
|
-
requirement: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
33
|
+
version: 2.0.0
|
|
34
|
+
- - "<"
|
|
109
35
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
111
|
-
type: :
|
|
36
|
+
version: '5'
|
|
37
|
+
type: :runtime
|
|
112
38
|
prerelease: false
|
|
113
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
114
40
|
requirements:
|
|
115
|
-
- - "
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '3.5'
|
|
118
|
-
- !ruby/object:Gem::Dependency
|
|
119
|
-
name: sqlite3
|
|
120
|
-
requirement: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - "~>"
|
|
41
|
+
- - ">="
|
|
123
42
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
125
|
-
|
|
126
|
-
prerelease: false
|
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - "~>"
|
|
43
|
+
version: 2.0.0
|
|
44
|
+
- - "<"
|
|
130
45
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
46
|
+
version: '5'
|
|
132
47
|
- !ruby/object:Gem::Dependency
|
|
133
|
-
name:
|
|
48
|
+
name: solidus_support
|
|
134
49
|
requirement: !ruby/object:Gem::Requirement
|
|
135
50
|
requirements:
|
|
136
51
|
- - "~>"
|
|
137
52
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
139
|
-
type: :
|
|
53
|
+
version: '0.8'
|
|
54
|
+
type: :runtime
|
|
140
55
|
prerelease: false
|
|
141
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
142
57
|
requirements:
|
|
143
58
|
- - "~>"
|
|
144
59
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '
|
|
60
|
+
version: '0.8'
|
|
146
61
|
- !ruby/object:Gem::Dependency
|
|
147
|
-
name:
|
|
62
|
+
name: solidus_dev_support
|
|
148
63
|
requirement: !ruby/object:Gem::Requirement
|
|
149
64
|
requirements:
|
|
150
65
|
- - "~>"
|
|
151
66
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
67
|
+
version: '2.7'
|
|
153
68
|
type: :development
|
|
154
69
|
prerelease: false
|
|
155
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
156
71
|
requirements:
|
|
157
72
|
- - "~>"
|
|
158
73
|
- !ruby/object:Gem::Version
|
|
159
|
-
version: '
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
requirement: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - ">="
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0'
|
|
167
|
-
type: :development
|
|
168
|
-
prerelease: false
|
|
169
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
170
|
-
requirements:
|
|
171
|
-
- - ">="
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: '0'
|
|
174
|
-
- !ruby/object:Gem::Dependency
|
|
175
|
-
name: test-unit
|
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
|
177
|
-
requirements:
|
|
178
|
-
- - ">="
|
|
179
|
-
- !ruby/object:Gem::Version
|
|
180
|
-
version: '0'
|
|
181
|
-
type: :development
|
|
182
|
-
prerelease: false
|
|
183
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - ">="
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: '0'
|
|
188
|
-
description: Extention to manage the static pages for your Spree shop.
|
|
74
|
+
version: '2.7'
|
|
75
|
+
description: Manage the static pages of your Solidus store or replace existing pages
|
|
76
|
+
with a static version
|
|
189
77
|
email: peter@pero-ict.nl
|
|
190
78
|
executables: []
|
|
191
79
|
extensions: []
|
|
192
80
|
extra_rdoc_files: []
|
|
193
81
|
files:
|
|
82
|
+
- ".gem_release.yml"
|
|
83
|
+
- ".github/dependabot.yml"
|
|
84
|
+
- ".github/workflows/lint.yml"
|
|
85
|
+
- ".github/workflows/test.yml"
|
|
194
86
|
- ".gitignore"
|
|
195
87
|
- ".rspec"
|
|
196
|
-
- ".
|
|
88
|
+
- ".standard.yml"
|
|
89
|
+
- CHANGELOG.md
|
|
197
90
|
- Gemfile
|
|
198
91
|
- Guardfile
|
|
199
|
-
- LICENSE
|
|
92
|
+
- LICENSE
|
|
200
93
|
- README.md
|
|
201
94
|
- Rakefile
|
|
202
|
-
- app/assets/
|
|
203
|
-
- app/assets/javascripts/spree/frontend/spree_static_content.js
|
|
204
|
-
- app/assets/stylesheets/spree/backend/spree_static_content.css
|
|
95
|
+
- app/assets/stylesheets/spree/frontend/solidus_static_content.css
|
|
205
96
|
- app/assets/stylesheets/spree/frontend/spree_static_content.css
|
|
206
|
-
- app/controllers/spree/admin/pages_controller.rb
|
|
207
|
-
- app/controllers/spree/static_content_controller.rb
|
|
208
97
|
- app/helpers/spree/pages_helper.rb
|
|
98
|
+
- app/models/solidus_static_content/permission_sets/page_display.rb
|
|
99
|
+
- app/models/solidus_static_content/permission_sets/page_management.rb
|
|
209
100
|
- app/models/spree/page.rb
|
|
210
|
-
- app/overrides/pages_in_footer.rb
|
|
211
|
-
- app/overrides/pages_in_header.rb
|
|
212
|
-
- app/overrides/
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
- app/views/spree/admin/pages/edit.html.erb
|
|
216
|
-
- app/views/spree/admin/pages/index.html.erb
|
|
217
|
-
- app/views/spree/admin/pages/new.html.erb
|
|
218
|
-
- app/views/spree/static_content/_static_content_footer.html.erb
|
|
219
|
-
- app/views/spree/static_content/_static_content_header.html.erb
|
|
220
|
-
- app/views/spree/static_content/_static_content_list.html.erb
|
|
221
|
-
- app/views/spree/static_content/_static_content_sidebar.html.erb
|
|
222
|
-
- app/views/spree/static_content/show.html.erb
|
|
101
|
+
- app/overrides/solidus_static_content/pages_in_footer.rb
|
|
102
|
+
- app/overrides/solidus_static_content/pages_in_header.rb
|
|
103
|
+
- app/overrides/solidus_static_content/pages_in_sidebar.rb
|
|
104
|
+
- bin/console
|
|
105
|
+
- bin/r
|
|
223
106
|
- bin/rails
|
|
107
|
+
- bin/rails-engine
|
|
108
|
+
- bin/rails-sandbox
|
|
109
|
+
- bin/rake
|
|
110
|
+
- bin/sandbox
|
|
111
|
+
- bin/sandbox_rails
|
|
112
|
+
- bin/setup
|
|
224
113
|
- config/locales/de.yml
|
|
225
114
|
- config/locales/en.yml
|
|
115
|
+
- config/locales/es-MX.yml
|
|
226
116
|
- config/locales/es.yml
|
|
227
117
|
- config/locales/et.yml
|
|
228
118
|
- config/locales/fr.yml
|
|
@@ -246,23 +136,35 @@ files:
|
|
|
246
136
|
- db/migrate/20110717103112_add_meta_title_to_page.rb
|
|
247
137
|
- db/migrate/20120723144115_add_render_as_partial_for_layout_for_spree_pages.rb
|
|
248
138
|
- db/migrate/20140926121757_add_pages_stores.rb
|
|
139
|
+
- db/migrate/20180305193240_update_spree_page_position.rb
|
|
140
|
+
- lib/controllers/backend/spree/admin/pages_controller.rb
|
|
141
|
+
- lib/controllers/frontend/spree/static_content_controller.rb
|
|
249
142
|
- lib/generators/solidus_static_content/install/install_generator.rb
|
|
143
|
+
- lib/generators/solidus_static_content/install/templates/app/controllers/static_content_controller.rb
|
|
144
|
+
- lib/generators/solidus_static_content/install/templates/app/views/static_content/show.html.erb
|
|
250
145
|
- lib/solidus_static_content.rb
|
|
251
|
-
- lib/
|
|
146
|
+
- lib/solidus_static_content/engine.rb
|
|
147
|
+
- lib/solidus_static_content/route_matcher.rb
|
|
148
|
+
- lib/solidus_static_content/testing_support/factories.rb
|
|
149
|
+
- lib/solidus_static_content/version.rb
|
|
150
|
+
- lib/views/backend/spree/admin/pages/_form.html.erb
|
|
151
|
+
- lib/views/backend/spree/admin/pages/edit.html.erb
|
|
152
|
+
- lib/views/backend/spree/admin/pages/index.html.erb
|
|
153
|
+
- lib/views/backend/spree/admin/pages/new.html.erb
|
|
154
|
+
- lib/views/backend/spree/admin/shared/_pages_tabs.html.erb
|
|
155
|
+
- lib/views/frontend/spree/static_content/_static_content_footer.html.erb
|
|
156
|
+
- lib/views/frontend/spree/static_content/_static_content_header.html.erb
|
|
157
|
+
- lib/views/frontend/spree/static_content/_static_content_list.html.erb
|
|
158
|
+
- lib/views/frontend/spree/static_content/_static_content_sidebar.html.erb
|
|
159
|
+
- lib/views/frontend/spree/static_content/show.html.erb
|
|
252
160
|
- solidus_static_content.gemspec
|
|
253
|
-
|
|
254
|
-
- spec/factories/page_factory.rb
|
|
255
|
-
- spec/features/admin/pages_spec.rb
|
|
256
|
-
- spec/features/static_content_spec.rb
|
|
257
|
-
- spec/helpers/page_helper_spec.rb
|
|
258
|
-
- spec/lib/spree_static.content_spec.rb
|
|
259
|
-
- spec/models/page_spec.rb
|
|
260
|
-
- spec/spec_helper.rb
|
|
261
|
-
homepage: http://spreecommerce.com/extensions/139-static-content
|
|
161
|
+
homepage: https://github.com/solidusio-contrib/solidus_static_content#readme
|
|
262
162
|
licenses:
|
|
263
|
-
- BSD-3
|
|
264
|
-
metadata:
|
|
265
|
-
|
|
163
|
+
- BSD-3-Clause
|
|
164
|
+
metadata:
|
|
165
|
+
homepage_uri: https://github.com/solidusio-contrib/solidus_static_content#readme
|
|
166
|
+
source_code_uri: https://github.com/solidusio-contrib/solidus_static_content#readme
|
|
167
|
+
changelog_uri: https://github.com/solidusio-contrib/solidus_static_content/releases
|
|
266
168
|
rdoc_options: []
|
|
267
169
|
require_paths:
|
|
268
170
|
- lib
|
|
@@ -270,25 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
270
172
|
requirements:
|
|
271
173
|
- - ">="
|
|
272
174
|
- !ruby/object:Gem::Version
|
|
273
|
-
version:
|
|
175
|
+
version: '2.5'
|
|
274
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
177
|
requirements:
|
|
276
178
|
- - ">="
|
|
277
179
|
- !ruby/object:Gem::Version
|
|
278
180
|
version: '0'
|
|
279
|
-
requirements:
|
|
280
|
-
|
|
281
|
-
rubyforge_project:
|
|
282
|
-
rubygems_version: 2.5.1
|
|
283
|
-
signing_key:
|
|
181
|
+
requirements: []
|
|
182
|
+
rubygems_version: 4.0.17
|
|
284
183
|
specification_version: 4
|
|
285
|
-
summary:
|
|
286
|
-
test_files:
|
|
287
|
-
- spec/controllers/static_content_controller_spec.rb
|
|
288
|
-
- spec/factories/page_factory.rb
|
|
289
|
-
- spec/features/admin/pages_spec.rb
|
|
290
|
-
- spec/features/static_content_spec.rb
|
|
291
|
-
- spec/helpers/page_helper_spec.rb
|
|
292
|
-
- spec/lib/spree_static.content_spec.rb
|
|
293
|
-
- spec/models/page_spec.rb
|
|
294
|
-
- spec/spec_helper.rb
|
|
184
|
+
summary: Extension to manage the static pages for your Solidus store.
|
|
185
|
+
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
before_script:
|
|
2
|
-
- "bundle exec rake test_app"
|
|
3
|
-
script: "bundle exec rspec spec"
|
|
4
|
-
sudo: false
|
|
5
|
-
language: ruby
|
|
6
|
-
rvm:
|
|
7
|
-
- 2.3.1
|
|
8
|
-
env:
|
|
9
|
-
matrix:
|
|
10
|
-
- SOLIDUS_BRANCH=v1.1 DB=postgres
|
|
11
|
-
- SOLIDUS_BRANCH=v1.2 DB=postgres
|
|
12
|
-
- SOLIDUS_BRANCH=v1.3 DB=postgres
|
|
13
|
-
- SOLIDUS_BRANCH=v1.4 DB=postgres
|
|
14
|
-
- SOLIDUS_BRANCH=v2.0 DB=postgres
|
|
15
|
-
- SOLIDUS_BRANCH=master DB=postgres
|
|
16
|
-
- SOLIDUS_BRANCH=v1.1 DB=mysql
|
|
17
|
-
- SOLIDUS_BRANCH=v1.2 DB=mysql
|
|
18
|
-
- SOLIDUS_BRANCH=v1.3 DB=mysql
|
|
19
|
-
- SOLIDUS_BRANCH=v1.4 DB=mysql
|
|
20
|
-
- SOLIDUS_BRANCH=v2.0 DB=mysql
|
|
21
|
-
- SOLIDUS_BRANCH=master DB=mysql
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//= require spree/backend
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//= require spree/frontend
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class Spree::StaticContentController < Spree::StoreController
|
|
2
|
-
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
|
|
3
|
-
|
|
4
|
-
helper 'spree/products'
|
|
5
|
-
layout :determine_layout
|
|
6
|
-
|
|
7
|
-
def show
|
|
8
|
-
@page = Spree::Page.by_store(current_store).visible.find_by_slug!(request.path)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
def determine_layout
|
|
13
|
-
return @page.layout if @page and @page.layout.present? and not @page.render_layout_as_partial?
|
|
14
|
-
Spree::Config.layout
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def accurate_title
|
|
18
|
-
@page ? (@page.meta_title.present? ? @page.meta_title : @page.title) : nil
|
|
19
|
-
end
|
|
20
|
-
end
|