fullstack-cms 0.2.22 → 0.2.23
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fullstack-cms.gemspec +1 -1
- data/lib/generators/fullstack/cms/install_generator.rb +28 -12
- data/lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb +5 -0
- data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb +4 -120
- data/lib/generators/fullstack/cms/templates/rails/config/fullstack.rb +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.23
|
data/fullstack-cms.gemspec
CHANGED
@@ -46,20 +46,35 @@ eos
|
|
46
46
|
|
47
47
|
def routes_rb
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
|
50
|
+
if !localize
|
51
|
+
route '''
|
52
|
+
constraints(:host => /^#{Regexp.escape(Settings.app.domain)}/) do
|
53
|
+
root :to => redirect("http://www.#{Settings.app.domain}")
|
54
|
+
match \'/*path\', :to => redirect {|params| "http://www.#{Settings.app.domain}/#{params[:path]}"}
|
55
|
+
end
|
56
|
+
|
57
|
+
# namespace :site, :path => "/" do
|
58
|
+
# mount_controller "site"
|
59
|
+
# end
|
60
|
+
|
61
|
+
'''
|
62
|
+
else
|
63
|
+
route '''
|
64
|
+
constraints(:host => /^#{Regexp.escape(Settings.app.domain)}/) do
|
65
|
+
root :to => redirect("http://www.#{Settings.app.domain}/#{I18n.default_locale}/")
|
66
|
+
match \'/*path\', :to => redirect {|params| "http://www.#{Settings.app.domain}/#{params[:path]}"}
|
67
|
+
end
|
53
68
|
|
54
|
-
|
69
|
+
# root :to => redirect("/#{I18n.default_locale}/")
|
70
|
+
# namespace :site, :path => "/" do
|
71
|
+
# mount_controller "site"
|
72
|
+
# end
|
73
|
+
|
74
|
+
|
75
|
+
'''
|
76
|
+
end
|
55
77
|
|
56
|
-
route '''
|
57
|
-
constraints(:host => /^#{Regexp.escape(Settings.app.domain)}/) do
|
58
|
-
root :to => redirect("http://www.#{Settings.app.domain}")
|
59
|
-
match \'/*path\', :to => redirect {|params| "http://www.#{Settings.app.domain}/#{params[:path]}"}
|
60
|
-
end
|
61
|
-
|
62
|
-
'''
|
63
78
|
end
|
64
79
|
|
65
80
|
def set_localization
|
@@ -76,6 +91,7 @@ eos
|
|
76
91
|
end
|
77
92
|
end
|
78
93
|
|
94
|
+
|
79
95
|
def install_migrations
|
80
96
|
generate "migration:from link menu page_part page redirect setting attachment photo text_page_part text_with_title_page_part"
|
81
97
|
end
|
@@ -16,6 +16,7 @@ class Site::SiteController < ApplicationController
|
|
16
16
|
# ===========
|
17
17
|
|
18
18
|
helper_method :current_locale
|
19
|
+
helper_method :home_page?
|
19
20
|
|
20
21
|
protected
|
21
22
|
|
@@ -23,6 +24,10 @@ class Site::SiteController < ApplicationController
|
|
23
24
|
I18n.locale.to_s
|
24
25
|
end
|
25
26
|
|
27
|
+
def home_page?
|
28
|
+
current_page?( Fullstack::Cms.localized? ? url_for([:site, :home, I18n.locale]) : url_for([:site, :home]) )
|
29
|
+
end
|
30
|
+
|
26
31
|
# ===================
|
27
32
|
# = Private Methods =
|
28
33
|
# ===================
|
@@ -1,133 +1,17 @@
|
|
1
|
-
<section class="section section-home-channels">
|
2
|
-
<%= row do %>
|
3
|
-
|
4
|
-
<%= span(4) do %>
|
5
|
-
<%= part("sales_channel_1", :schema => 'channel_frame') do |part| %>
|
6
|
-
|
7
|
-
|
8
|
-
<%= channel_frame :image => part.image.url,
|
9
|
-
:can => part.can.url,
|
10
|
-
:title => part.title,
|
11
|
-
:excerpt => part.excerpt,
|
12
|
-
:link_label => part.link.try(:label),
|
13
|
-
:link_url => menu_link_url(part.link)
|
14
|
-
%>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
|
21
|
-
<%= span(4) do %>
|
22
|
-
<%= part("sales_channel_2", :schema => 'channel_frame') do |part| %>
|
23
|
-
|
24
|
-
|
25
|
-
<%= channel_frame :image => part.image.url,
|
26
|
-
:can => part.can.url,
|
27
|
-
:title => part.title,
|
28
|
-
:excerpt => part.excerpt,
|
29
|
-
:link_label => part.link.try(:label),
|
30
|
-
:link_url => menu_link_url(part.link)
|
31
|
-
%>
|
32
|
-
|
33
|
-
<% end %>
|
34
|
-
<% end %>
|
35
|
-
|
36
|
-
<%= span(4) do %>
|
37
|
-
<%= part("sales_channel_3", :schema => 'channel_frame') do |part| %>
|
38
|
-
|
39
|
-
|
40
|
-
<%= channel_frame :image => part.image.url,
|
41
|
-
:can => part.can.url,
|
42
|
-
:title => part.title,
|
43
|
-
:excerpt => part.excerpt,
|
44
|
-
:link_label => part.link.try(:label),
|
45
|
-
:link_url => menu_link_url(part.link)
|
46
|
-
%>
|
47
|
-
|
48
|
-
<% end %>
|
49
|
-
<% end %>
|
50
|
-
|
51
|
-
<% end %>
|
52
|
-
</section>
|
53
|
-
|
54
|
-
<section class="section section-home-description">
|
55
|
-
<%= row do %>
|
56
|
-
|
57
|
-
<%= part("quote", :schema => 'quote') do |part| %>
|
58
|
-
<%= span(2) do %>
|
59
|
-
<%= image_tag part.image.url %>
|
60
|
-
<% end %>
|
61
|
-
<%= span(10) do %>
|
62
|
-
<%= part.excerpt %>
|
63
|
-
<%= link_to part.link.try(:label), menu_link_url(part.link), :class => "btn btn-go" %>
|
64
|
-
<% end %>
|
65
|
-
<% end %>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<% end %>
|
70
|
-
</section>
|
71
|
-
|
72
|
-
<section class="section section-home-bottom">
|
73
|
-
|
74
|
-
<%= row do %>
|
75
|
-
|
76
|
-
<%= span(4) do %>
|
77
|
-
<%= part("index_box_1", :schema => :index_box) do |part| %>
|
78
|
-
<%= index_box(:images => part.photos.map {|p| p.url(:box)},
|
79
|
-
:title => part.title,
|
80
|
-
:excerpt => part.excerpt,
|
81
|
-
:link_label => part.link.try(:label),
|
82
|
-
:link_url => menu_link_url(part.link), :video => part.video) %>
|
83
|
-
|
84
|
-
<% end %>
|
85
|
-
<% end %>
|
86
|
-
|
87
|
-
<%= span(4) do %>
|
88
|
-
<%= part("index_box_2", :schema => :index_box) do |part| %>
|
89
|
-
<%= index_box(:images => (part.photos || []).map {|p| p.url(:box)},
|
90
|
-
:title => part.title,
|
91
|
-
:excerpt => part.excerpt,
|
92
|
-
:link_label => part.link.try(:label),
|
93
|
-
:link_url => menu_link_url(part.link), :video => part.video) %>
|
94
|
-
|
95
|
-
<% end %>
|
96
|
-
<% end %>
|
97
|
-
|
98
|
-
<%= span(4) do %>
|
99
|
-
<%= part("index_box_3", :schema => :index_box) do |part| %>
|
100
|
-
<%= index_box(:images => (part.photos || []).map {|p| p.url(:box)},
|
101
|
-
:title => part.title,
|
102
|
-
:excerpt => part.excerpt,
|
103
|
-
:link_label => part.link.try(:label),
|
104
|
-
:link_url => menu_link_url(part.link), :video => part.video) %>
|
105
|
-
|
106
|
-
<% end %>
|
107
|
-
<% end %>
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<% end %>
|
113
|
-
</section>
|
114
|
-
|
115
|
-
|
116
|
-
<% content_for :prefooter do -%>
|
117
|
-
|
118
1
|
<%
|
119
2
|
social_links = (links("social") || []).to(3)
|
120
3
|
%>
|
121
|
-
|
122
4
|
<% if social_links.any? %>
|
5
|
+
|
6
|
+
<% content_for :prefooter do -%>
|
123
7
|
<% colspan = (12 / social_links.size) %>
|
124
8
|
<%= row do %>
|
125
9
|
<% social_links.each do |link| %>
|
126
10
|
<%= span(colspan) do %>
|
127
|
-
<%= link_to image_tag(link.icon.url(:
|
11
|
+
<%= link_to image_tag(link.icon.url(:i32)), menu_link_url(link), :rel => "tooltip", :title => link.label %>
|
128
12
|
<% end %>
|
129
13
|
<% end %>
|
130
14
|
<% end %>
|
131
15
|
<% end %>
|
132
16
|
|
133
|
-
<% end %>
|
17
|
+
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fullstack-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.23
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -344,7 +344,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
segments:
|
346
346
|
- 0
|
347
|
-
hash:
|
347
|
+
hash: 1608598274026263345
|
348
348
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
349
349
|
none: false
|
350
350
|
requirements:
|