forgeos_cms 1.9.1 → 1.9.2
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.
- data/README.textile +42 -4
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/carousels.js +3 -3
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/menus.js +8 -5
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/carousels.js +1 -1
- data/app/assets/stylesheets/forgeos/admin/forgeos_cms/_blocks.css.sass +35 -26
- data/app/controllers/admin/actualities_controller.rb +1 -1
- data/app/controllers/admin/menus_controller.rb +1 -1
- data/app/controllers/admin/newsletters_controller.rb +1 -1
- data/app/controllers/admin/pages_controller.rb +2 -3
- data/app/controllers/admin/static_content_blocks_controller.rb +2 -3
- data/app/controllers/admin/widget_actualities_controller.rb +1 -1
- data/app/controllers/admin/widget_faqs_controller.rb +1 -1
- data/app/controllers/admin/widgets_controller.rb +1 -5
- data/app/controllers/forgeos/application_controller.rb +17 -0
- data/app/controllers/pages_controller.rb +1 -1
- data/app/models/comment.rb +2 -1
- data/app/views/admin/actualities/index.json.erb +3 -1
- data/app/views/admin/carousels/_attachments_popups.html.haml +1 -39
- data/app/views/admin/menus/_lang_switcher.html.haml +1 -1
- data/app/views/admin/menus/index.json.erb +3 -1
- data/app/views/admin/newsletters/index.json.erb +3 -1
- data/app/views/admin/pages/index.json.erb +5 -3
- data/app/views/admin/pages/show.html.haml +2 -9
- data/app/views/admin/static_content_blocks/index.json.erb +3 -1
- data/app/views/admin/widgets/index.json.erb +3 -1
- data/app/views/pages/_page.html.haml +1 -1
- data/db/fixtures/page_translations.yml +0 -9
- data/db/migrate/20091208113459_create_page_translations.rb +1 -1
- data/lib/tasks/install.rake +3 -3
- metadata +10 -8
data/README.textile
CHANGED
@@ -10,19 +10,57 @@ h2. Gem
|
|
10
10
|
|
11
11
|
* forgeos_core >= 1.9.2
|
12
12
|
|
13
|
-
h2.
|
13
|
+
h2. Install
|
14
14
|
|
15
|
+
# Generate a new Rails Application
|
16
|
+
<pre><code>
|
17
|
+
$ rails new my_site -d mysql
|
18
|
+
$ cd my_site
|
19
|
+
</code></pre>
|
20
|
+
# add following gem dependencies to Gemfile :
|
21
|
+
<pre><code class="ruby">
|
22
|
+
gem 'rmagick'
|
23
|
+
gem 'globalize3', '>= 0.1.0'
|
24
|
+
gem 'acts-as-taggable-on', '>= 2.0.6'
|
25
|
+
gem 'acts_as_list', '>= 0.1.3'
|
26
|
+
gem 'acts_as_tree', '>= 0.1.1'
|
27
|
+
gem 'bcrypt-ruby', '>= 2.1.4'
|
28
|
+
gem 'fastercsv', '>= 1.5.4'
|
29
|
+
gem 'haml', '>= 3.1.2'
|
30
|
+
gem 'sass', '>= 3.1.4'
|
31
|
+
gem 'mime-types', '>= 1.16'
|
32
|
+
gem 'thinking-sphinx', '>= 2.0.5'
|
33
|
+
gem 'webpulser-habtm_list', '>= 0.1.2'
|
34
|
+
gem 'will_paginate', '~> 3.0.pre4'
|
35
|
+
gem 'authlogic', '>= 3.0.3'
|
36
|
+
gem 'forgeos_core', '>= 1.9.2'
|
37
|
+
gem 'acts_as_commentable', '>= 3.0.1'
|
38
|
+
gem 'forgeos_cms', '>= 1.9.1'
|
39
|
+
</code></pre>
|
40
|
+
# mount gems into your config/routes.rb file :
|
41
|
+
<pre><code class="ruby">
|
42
|
+
mount Forgeos::Core::Engine => '/', :as => 'forgeos_core'
|
43
|
+
mount Forgeos::Cms::Engine => '/', :as => 'forgeos_cms'
|
44
|
+
</code></pre>
|
45
|
+
# Then initialize database :
|
15
46
|
<pre><code>
|
47
|
+
$ bundle install
|
48
|
+
$ rake db:create
|
49
|
+
$ rake forgeos_core_engine:install:migrations
|
50
|
+
$ rake forgeos_cms_engine:install:migrations
|
51
|
+
$ rake db:migrate
|
16
52
|
$ rake forgeos:cms:install
|
53
|
+
$ rails s
|
17
54
|
</code></pre>
|
55
|
+
# Then go to localhost:3000/admin and Enjoy !
|
18
56
|
|
19
57
|
h1. Default settings
|
20
58
|
|
21
59
|
h2. Admin
|
22
60
|
|
23
|
-
|
24
|
-
|
25
|
-
|
61
|
+
* url: /admin
|
62
|
+
* login: admin@cms.forgeos.com
|
63
|
+
* password: admin
|
26
64
|
|
27
65
|
h2. Pages
|
28
66
|
|
@@ -48,9 +48,9 @@ function remove_carousel_item(destroy_link){
|
|
48
48
|
update_block_container_positions(jQuery('#carousel_items'));
|
49
49
|
}
|
50
50
|
|
51
|
-
function add_picture_to_carousel_item(
|
52
|
-
var image =
|
51
|
+
function add_picture_to_carousel_item(path,id,name){
|
52
|
+
var image = current_carousel_item_link.prevAll('img');
|
53
53
|
image.attr('src', path);
|
54
54
|
image.attr('alt', name);
|
55
|
-
|
55
|
+
current_carousel_item_link.prevAll('input').attr('value', id);
|
56
56
|
}
|
@@ -36,11 +36,14 @@ function update_menu_span_icon(base_span, span_to_update){
|
|
36
36
|
|
37
37
|
// mode is either 'open' or 'closed'
|
38
38
|
function toggle_menu_link(menu_link, mode){
|
39
|
-
var folder = (mode ==
|
39
|
+
var folder = (mode == 'closed') ? 'file' : 'folder';
|
40
40
|
|
41
|
-
if (
|
42
|
-
menu_link.
|
43
|
-
menu_link.
|
41
|
+
if (menu_link.hasClass('open')){
|
42
|
+
menu_link.removeClass('open');
|
43
|
+
menu_link.addClass('closed');
|
44
|
+
} else {
|
45
|
+
menu_link.removeClass('closed');
|
46
|
+
menu_link.addClass('open');
|
44
47
|
}
|
45
48
|
|
46
49
|
if (!menu_link.hasClass(folder)){
|
@@ -90,4 +93,4 @@ function update_menu_names_and_ids(list, base_name, base_id){
|
|
90
93
|
if (child_list.length > 0)
|
91
94
|
update_menu_names_and_ids(child_list, name + '[children_attributes]', id + '_children_attributes_');
|
92
95
|
});
|
93
|
-
}
|
96
|
+
}
|
@@ -4,7 +4,7 @@ var current_carousel_item_link = null;
|
|
4
4
|
jQuery(document).ready(function(){
|
5
5
|
|
6
6
|
jQuery('.change-picture').live('click',function(){
|
7
|
-
current_carousel_item_link = jQuery(this)
|
7
|
+
current_carousel_item_link = jQuery(this);
|
8
8
|
openimageUploadDialog(jQuery(this));
|
9
9
|
return false;
|
10
10
|
});
|
@@ -2,6 +2,7 @@
|
|
2
2
|
width: 650px !important
|
3
3
|
.blocks-tree.hidden
|
4
4
|
display: none
|
5
|
+
|
5
6
|
.block-container.widget-modify
|
6
7
|
min-height: 4em
|
7
8
|
height: auto !important
|
@@ -14,9 +15,9 @@
|
|
14
15
|
.inner_block-container
|
15
16
|
width: 87%
|
16
17
|
background:
|
17
|
-
color: #
|
18
|
-
border: 1px solid #
|
19
|
-
+borderCorner
|
18
|
+
color: #e0e0e0
|
19
|
+
border: 1px solid #f3f3f3
|
20
|
+
+borderCorner
|
20
21
|
overflow: hidden
|
21
22
|
.block-type
|
22
23
|
padding: 0 4px
|
@@ -34,14 +35,14 @@
|
|
34
35
|
height: 24em
|
35
36
|
.block-type .edit
|
36
37
|
height: 15em
|
37
|
-
+left
|
38
|
+
+left
|
38
39
|
padding: 0
|
39
40
|
width: 5px
|
40
41
|
margin-right: 5px
|
41
42
|
.block-type
|
42
43
|
text-align: center
|
43
44
|
width: 115px
|
44
|
-
font-size: .8em
|
45
|
+
font-size: 0.8em
|
45
46
|
.block-name
|
46
47
|
margin-left: 125px
|
47
48
|
min-height: 4em
|
@@ -54,19 +55,23 @@
|
|
54
55
|
margin: 0
|
55
56
|
.widget_actuality_content
|
56
57
|
margin-top: 12px
|
58
|
+
|
57
59
|
.widget-list .ui-state-highlight
|
58
60
|
height: 60px
|
61
|
+
|
59
62
|
.widget-actions
|
60
63
|
position: absolute
|
61
64
|
right: 0px
|
62
65
|
top: 0
|
63
66
|
display: none
|
64
67
|
padding: 20px
|
68
|
+
|
65
69
|
.block-container.widget-modify
|
66
70
|
&:hover .widget-actions
|
67
|
-
+block
|
71
|
+
+block
|
68
72
|
.editing
|
69
73
|
display: none
|
74
|
+
|
70
75
|
.widget-picture
|
71
76
|
height: 50px
|
72
77
|
line-height: 3em
|
@@ -77,18 +82,20 @@
|
|
77
82
|
border: 1px solid $contentHeaderBorder
|
78
83
|
a
|
79
84
|
color: $blueLink
|
80
|
-
font-size: .9em
|
85
|
+
font-size: 0.9em
|
81
86
|
text-decoration: underline
|
82
87
|
*
|
83
|
-
+left
|
88
|
+
+left
|
84
89
|
.change-picture
|
85
90
|
margin-left: 5px
|
91
|
+
|
86
92
|
.carousel-image
|
87
93
|
width: 50px
|
88
94
|
height: 50px
|
95
|
+
|
89
96
|
.block-container.widget-modify
|
90
97
|
.block-type label
|
91
|
-
+block
|
98
|
+
+block
|
92
99
|
text-align: left
|
93
100
|
margin: 8px
|
94
101
|
padding-left: 20px
|
@@ -96,11 +103,11 @@
|
|
96
103
|
margin-top: 40px
|
97
104
|
.block-name
|
98
105
|
input.text
|
99
|
-
+block
|
106
|
+
+block
|
100
107
|
width: 99%
|
101
108
|
font-size: 0.7em
|
102
109
|
border: 1px solid $lightGray
|
103
|
-
+borderCorner
|
110
|
+
+borderCorner
|
104
111
|
padding: 2px
|
105
112
|
font-weight: bold
|
106
113
|
textarea
|
@@ -108,13 +115,13 @@
|
|
108
115
|
width: 99%
|
109
116
|
font-size: 0.9em
|
110
117
|
border: 1px solid $lightGray
|
111
|
-
+borderCorner
|
118
|
+
+borderCorner
|
112
119
|
padding: 2px
|
113
|
-
margin-bottom: .8em
|
120
|
+
margin-bottom: 0.8em
|
114
121
|
.widget-url
|
115
122
|
border: 1px solid $lightGray
|
116
|
-
+borderCorner
|
117
|
-
background: #
|
123
|
+
+borderCorner
|
124
|
+
background: #e6e6e6
|
118
125
|
height: 1.2em
|
119
126
|
margin: 5px 0
|
120
127
|
width: 100%
|
@@ -122,19 +129,19 @@
|
|
122
129
|
color: $lightGray
|
123
130
|
padding: 2px
|
124
131
|
font-size: 0.8em
|
125
|
-
+left
|
126
|
-
+block
|
132
|
+
+left
|
133
|
+
+block
|
127
134
|
input
|
128
|
-
+block
|
135
|
+
+block
|
129
136
|
width: 90%
|
130
137
|
float: right
|
131
138
|
border: 0
|
132
139
|
.actions
|
133
140
|
color: $lightGray
|
134
|
-
font-size: .8em
|
141
|
+
font-size: 0.8em
|
135
142
|
line-height: 1.8em
|
136
143
|
.action-button
|
137
|
-
margin: 0 .5em 0 0
|
144
|
+
margin: 0 0.5em 0 0
|
138
145
|
line-height: 1em
|
139
146
|
font-size: 1em
|
140
147
|
p.widget_actuality_title
|
@@ -143,6 +150,7 @@
|
|
143
150
|
font-weight: bold
|
144
151
|
p.widget_actuality_content
|
145
152
|
padding: 9px 10px 10px 0px
|
153
|
+
|
146
154
|
.view-tree
|
147
155
|
li
|
148
156
|
margin-right: 1px
|
@@ -151,12 +159,10 @@
|
|
151
159
|
&.last
|
152
160
|
margin-right: 0
|
153
161
|
padding-right: 16px
|
154
|
-
|
155
162
|
&.open
|
156
163
|
background: url("fminus_rtl.gif") right 6px no-repeat
|
157
164
|
margin-right: 0
|
158
165
|
padding-right: 16px
|
159
|
-
|
160
166
|
&.closed
|
161
167
|
background: url("fplus_rtl.gif") right 4px no-repeat
|
162
168
|
margin-right: 0
|
@@ -164,7 +170,7 @@
|
|
164
170
|
a
|
165
171
|
cursor: default
|
166
172
|
padding: 0px 5px 0px 24px
|
167
|
-
+borderCorner
|
173
|
+
+borderCorner
|
168
174
|
width: auto
|
169
175
|
color: #557383 !important
|
170
176
|
font-weight: bold
|
@@ -182,7 +188,7 @@
|
|
182
188
|
background-repeat: no-repeat
|
183
189
|
background-position: 0 0
|
184
190
|
text-align: center
|
185
|
-
color: #
|
191
|
+
color: #75491b
|
186
192
|
right: 5px
|
187
193
|
position: absolute
|
188
194
|
top: 2px
|
@@ -190,14 +196,16 @@
|
|
190
196
|
background-color: #b0e0f1
|
191
197
|
background-position: 0 -1198px
|
192
198
|
&:hover, &.hover
|
193
|
-
color:
|
199
|
+
color: white !important
|
194
200
|
span.clicked
|
195
201
|
padding: 0px 3px 0px 20px
|
196
202
|
&.clicked
|
197
203
|
-moz-border-radius: 3px
|
198
204
|
margin: 2px 0 !important
|
205
|
+
|
199
206
|
#form_actuality
|
200
|
-
background-color:
|
207
|
+
background-color: white
|
208
|
+
|
201
209
|
#actualities
|
202
210
|
.block-container
|
203
211
|
p.widget_actuality_title
|
@@ -206,6 +214,7 @@
|
|
206
214
|
font-weight: bold
|
207
215
|
p.widget_actuality_content
|
208
216
|
padding: 9px 10px 10px 0px
|
217
|
+
|
209
218
|
#blocks
|
210
219
|
.block-container
|
211
220
|
.block-name
|
@@ -137,7 +137,7 @@ private
|
|
137
137
|
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:sSortDir_0].upcase}"
|
138
138
|
|
139
139
|
conditions = {}
|
140
|
-
options = { :
|
140
|
+
options = { :page => page, :per_page => per_page }
|
141
141
|
|
142
142
|
includes = []
|
143
143
|
if params[:category_id]
|
@@ -162,8 +162,7 @@ private
|
|
162
162
|
@pages = Page.search(params[:sSearch],options)
|
163
163
|
else
|
164
164
|
options[:joins] = joins
|
165
|
-
|
166
|
-
@pages = Page.paginate(:all,options)
|
165
|
+
@pages = Page.paginate(options)
|
167
166
|
end
|
168
167
|
end
|
169
168
|
end
|
@@ -110,7 +110,7 @@ private
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def get_pages_and_categories
|
113
|
-
@page_categories = PageCategory.find_all_by_parent_id(nil
|
113
|
+
@page_categories = PageCategory.find_all_by_parent_id(nil, :group => 'category_id', :joins => :translations, :order => 'name')
|
114
114
|
@pages = Page.all(:include => :categories, :conditions => { :categories_elements => { :category_id => nil }})
|
115
115
|
end
|
116
116
|
|
@@ -167,8 +167,7 @@ private
|
|
167
167
|
@blocks = StaticContentBlock.search(params[:sSearch],options)
|
168
168
|
else
|
169
169
|
options[:joins] = joins
|
170
|
-
|
171
|
-
@blocks = StaticContentBlock.paginate(:all,options)
|
170
|
+
@blocks = StaticContentBlock.paginate(options)
|
172
171
|
end
|
173
172
|
end
|
174
173
|
end
|
@@ -81,7 +81,7 @@ private
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def get_pages_and_categories
|
84
|
-
@page_categories = PageCategory.find_all_by_parent_id(nil
|
84
|
+
@page_categories = PageCategory.find_all_by_parent_id(nil, :group => 'category_id', :joins => :translations, :order => 'name')
|
85
85
|
@pages = Page.all(:include => :categories, :conditions => { :categories_elements => { :category_id => nil }})
|
86
86
|
end
|
87
87
|
|
@@ -64,7 +64,7 @@ private
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def get_pages_and_categories
|
67
|
-
@page_categories = PageCategory.find_all_by_parent_id(nil
|
67
|
+
@page_categories = PageCategory.find_all_by_parent_id(nil, :group => 'category_id', :joins => :translations, :order => 'name')
|
68
68
|
@pages = Page.all(:include => :categories, :conditions => { :categories_elements => { :category_id => nil }})
|
69
69
|
end
|
70
70
|
|
@@ -48,7 +48,6 @@ private
|
|
48
48
|
|
49
49
|
conditions = {}
|
50
50
|
includes = []
|
51
|
-
group_by = []
|
52
51
|
options = { :page => page, :per_page => per_page }
|
53
52
|
|
54
53
|
if params[:category_id]
|
@@ -57,13 +56,11 @@ private
|
|
57
56
|
end
|
58
57
|
|
59
58
|
if order_column == 3
|
60
|
-
group_by << 'blocks.id'
|
61
59
|
includes << :pages
|
62
60
|
end
|
63
61
|
|
64
62
|
options[:conditions] = conditions unless conditions.empty?
|
65
63
|
options[:include] = includes unless includes.empty?
|
66
|
-
options[:group] = group_by.join(', ') unless group_by.empty?
|
67
64
|
options[:order] = order unless order.squeeze.blank?
|
68
65
|
|
69
66
|
joins = []
|
@@ -76,8 +73,7 @@ private
|
|
76
73
|
@widgets = Widget.search(params[:sSearch],options)
|
77
74
|
else
|
78
75
|
options[:joins] = joins
|
79
|
-
|
80
|
-
@widgets = Widget.paginate(:all,options)
|
76
|
+
@widgets = Widget.paginate(options)
|
81
77
|
end
|
82
78
|
end
|
83
79
|
end
|
@@ -12,6 +12,23 @@ Forgeos::ApplicationController.class_eval do
|
|
12
12
|
return render(:text => (I18n.t('page_not_found') || 'page not found'), :layout => false, :status => 404)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
def render_optional_error_file(status_code)
|
17
|
+
status = interpret_status(status_code)
|
18
|
+
locale_path = "#{Rails.public_path}/#{status[0,3]}.#{I18n.locale}.html" if I18n.locale
|
19
|
+
cached_path = "#{Rails.configuration.action_controller.page_cache_directory}/#{status[0,3]}.html" if Rails.configuration.action_controller.page_cache_directory
|
20
|
+
path = "#{Rails.public_path}/#{status[0,3]}.html"
|
21
|
+
|
22
|
+
if locale_path && File.exist?(locale_path)
|
23
|
+
render :file => locale_path, :status => status, :content_type => Mime::HTML
|
24
|
+
elsif cached_path && File.exist?(cached_path)
|
25
|
+
render :file => cached_path, :status => status, :content_type => Mime::HTML
|
26
|
+
elsif File.exist?(path)
|
27
|
+
render :file => path, :status => status, :content_type => Mime::HTML
|
28
|
+
else
|
29
|
+
head status
|
30
|
+
end
|
31
|
+
end
|
15
32
|
end
|
16
33
|
|
17
34
|
# Rails Bug fix on Nested inheritance models : Load nested models to use it parent class
|
data/app/models/comment.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @actualities.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @actualities.size,
|
4
6
|
:aaData => @actualities.collect do |actuality|
|
5
7
|
link_id = "actuality_#{actuality.id}"
|
6
8
|
picture = actuality.picture.public_filename(:thumb) if actuality.picture
|
@@ -39,43 +39,5 @@
|
|
39
39
|
|
40
40
|
:javascript
|
41
41
|
function initImageUpload(link) {
|
42
|
-
|
43
|
-
var uploadify_datas = {
|
44
|
-
"format": "json"
|
45
|
-
};
|
46
|
-
uploadify_datas[window._forgeos_js_vars.session_key] = window._forgeos_js_vars.session;
|
47
|
-
|
48
|
-
jQuery('#imageUpload').uploadify({
|
49
|
-
"uploader": "/assets/forgeos/uploadify/uploadify.swf",
|
50
|
-
"cancelImg": "/assets/forgeos/admin/big-icons/delete-icon.png",
|
51
|
-
"script": "#{forgeos_core.admin_attachments_path(:file_type => "picture")}",
|
52
|
-
"buttonImg": "#{image_path("forgeos/uploadify/upload-picture_#{I18n.locale}.png")}",
|
53
|
-
"width": "154",
|
54
|
-
"height": "24",
|
55
|
-
"scriptData": uploadify_datas,
|
56
|
-
"ScriptAccess": "always",
|
57
|
-
"multi": "true",
|
58
|
-
"displayData": "speed",
|
59
|
-
"onComplete": function(e,queueID,fileObj,response,data) {
|
60
|
-
if(typeof JSON=="object" && typeof JSON.parse=="function") {
|
61
|
-
result = JSON.parse(response);
|
62
|
-
} else{
|
63
|
-
result = eval('(' + response + ')');
|
64
|
-
}
|
65
|
-
if (result.result == 'success'){
|
66
|
-
path = result.path;
|
67
|
-
id = result.id;
|
68
|
-
name = fileObj.name;
|
69
|
-
add_picture_to_carousel_item(link,path,id,name);
|
70
|
-
} else {
|
71
|
-
display_notification_message('error',result.error);
|
72
|
-
}
|
73
|
-
},
|
74
|
-
"onAllComplete": function() {
|
75
|
-
jQuery('#imageUploadDialog').dialog('close');
|
76
|
-
}
|
77
|
-
});
|
78
|
-
}
|
79
|
-
function add_picture_to_element(path,id,name) {
|
80
|
-
add_picture_to_carousel_item(jQuery('#' + current_carousel_item_link),path,id,name);
|
42
|
+
forgeosInitUpload('#image', 'add_picture_to_carousel_item');
|
81
43
|
}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
= form_tag '/admin/dashboard/change_lang', :autocomplete => 'off', :id => 'lang-switcher' do
|
2
|
-
|
2
|
+
= select_tag :lang, options_for_select([['Français',:fr],['Anglais',:en]],session[:lang] || I18n.locale), :onchange => "jQuery(this.form).trigger('submit')", :class=> 'customize'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @menus.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @menus.size,
|
4
6
|
:aaData => @menus.collect do |menu|
|
5
7
|
link_id = menu.id
|
6
8
|
klass = menu.active? ? 'see-on' : 'see-off'
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @newsletters.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @newsletters.size,
|
4
6
|
:aaData => @newsletters.collect do |newsletter|
|
5
7
|
link_id = newsletter.id
|
6
8
|
[
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @pages.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @pages.size,
|
4
6
|
:aaData => @pages.collect do |page|
|
5
7
|
link_id = "page_#{page.id}"
|
6
8
|
# status = [['published', 'published'], ['draft', 'draft'], ['to validate', 'to-validate']]
|
@@ -8,14 +10,14 @@
|
|
8
10
|
|
9
11
|
if params[:mode] && params[:mode].eql?('menu_link')
|
10
12
|
[
|
11
|
-
content_tag(:div,
|
13
|
+
content_tag(:div, content_tag(:div, '',:class=>'handler')+content_tag(:div, '', :class=>'small-icons page'), :id => link_id, :class => 'handler_container'),
|
12
14
|
content_tag(:div, page.title, :class => 'page-name'),
|
13
15
|
page.id,
|
14
16
|
link_to(page.title, [forgeos_cms, :admin, page])
|
15
17
|
]
|
16
18
|
else
|
17
19
|
[
|
18
|
-
content_tag(:div,
|
20
|
+
content_tag(:div, content_tag(:div, '', :class=>'handler')+content_tag(:div, '', :class=>'small-icons page'), :id => link_id, :class => 'handler_container'),
|
19
21
|
content_tag(:div, link_to(page.title, [forgeos_cms, :admin, page]), :class => 'page-name'),
|
20
22
|
'',
|
21
23
|
'',
|
@@ -18,7 +18,7 @@
|
|
18
18
|
.fieldset
|
19
19
|
%h2= t :content
|
20
20
|
.page-content
|
21
|
-
%iframe{ :src =>
|
21
|
+
%iframe{ :src => forgeos_cms.page_url(@page.url), :width => '100%', :height => 500, :style => 'border: none' }
|
22
22
|
- unless @page.blocks.empty?
|
23
23
|
.fieldset
|
24
24
|
%h2= t('block', :count => 2)
|
@@ -32,19 +32,12 @@
|
|
32
32
|
.step.status.open
|
33
33
|
-# status = [[t('page.published'), 'published'], [t('page.draft'), 'draft'], [t('to validate'), 'to-validate']]
|
34
34
|
- status = [[t('page.published'), 'published'], [t('page.draft'), 'draft']]
|
35
|
-
= select_tag :status, options_for_select(status, @page.active ? 'published' : 'draft'), :class => 'customize published'
|
35
|
+
= select_tag :status, options_for_select(status, @page.active ? 'published' : 'draft'), :class => 'customize published'
|
36
36
|
.clear
|
37
37
|
%p
|
38
38
|
- unless @page.new_record? or !@page.active or @page.published_at.nil?
|
39
39
|
= t('page.published_on').capitalize
|
40
40
|
%span.last-date= @page.published_at.to_date
|
41
|
-
.step
|
42
|
-
= content_tag :span, t('page.preview'), :class => 'small-icons preview disabled'
|
43
|
-
= link_to t('page.duplicate').capitalize, [forgeos_cms, :duplicate, :admin, @page], :class => 'small-icons duplicate'
|
44
|
-
= link_to t('page.delete'), [forgeos_cms, :admin, @page], :confirm => t('page.destroy.confirm').capitalize, :method => :delete, :class => 'small-icons delete'
|
45
|
-
.step.disabled
|
46
|
-
= link_to t('page.modification_history').capitalize, '#', :class => 'small-icons step-title'
|
47
|
-
.inner-step
|
48
41
|
#pages_show_tags.step.open
|
49
42
|
= link_to t('tag', :count => 2).capitalize, '#', :class => 'small-icons step-title'
|
50
43
|
.inner-step.tags
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @blocks.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @blocks.size,
|
4
6
|
:aaData => @blocks.collect do |block|
|
5
7
|
link_id = "block_#{block.id}"
|
6
8
|
nb_pages = block.page_cols.count
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @widgets.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @widgets.size,
|
4
6
|
:aaData => @widgets.collect do |widget|
|
5
7
|
link_id = "block_#{widget.id}"
|
6
8
|
nb_pages = widget.page_cols.count
|
@@ -11,5 +11,5 @@
|
|
11
11
|
%div{ :id => "block_#{block.id}" }= block.content
|
12
12
|
%div{ :id => "page_#{object.id}" }= object.content
|
13
13
|
|
14
|
-
= render :partial => 'linked_pages', :locals => { :linked_pages => object.linked_pages }
|
14
|
+
= render :partial => 'pages/linked_pages', :locals => { :linked_pages => object.linked_pages }
|
15
15
|
= statistics_collector_tag(object)
|
@@ -3,17 +3,8 @@ page_home_tranlation_en:
|
|
3
3
|
page_id: <%= Fixtures.identify(:page_home) %>
|
4
4
|
title: HomePage
|
5
5
|
url: index
|
6
|
-
content: "<h1>Welcome to Forgeos CMS</h1>
|
7
|
-
<h2>Administration</h2>
|
8
|
-
<p>Go to the <a href=\"/admin\">back-office</a> to manage pages,
|
9
|
-
sections, blocks and more...</p>
|
10
|
-
<p> </p>
|
11
|
-
<p>Login: admin@cms.forgeos.com</p>
|
12
|
-
<p>Password: admin</p>"
|
13
|
-
|
14
6
|
page_404_translation_en:
|
15
7
|
locale: en
|
16
8
|
page_id: <%= Fixtures.identify(:page_404) %>
|
17
9
|
title: "Page not found"
|
18
|
-
content: "The requested page does not exist"
|
19
10
|
url: 404
|
data/lib/tasks/install.rake
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
namespace :forgeos do
|
2
2
|
namespace :cms do
|
3
3
|
desc "load fixtures and generate forgeos_cms controllers ACLs"
|
4
|
-
task :install => ['
|
5
|
-
|
6
|
-
|
4
|
+
task :install => ['forgeos:core:install'] do
|
5
|
+
Rake::Task['forgeos:core:fixtures:load'].invoke('forgeos_cms','pages page_translations people menus menu_links menu_link_translations')
|
6
|
+
Rake::Task['forgeos:core:generate:acl'].invoke(Gem.loaded_specs['forgeos_cms'].full_gem_path)
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forgeos_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 1.9.
|
9
|
+
- 2
|
10
|
+
version: 1.9.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cyril LEPAGNOT
|
@@ -16,7 +16,8 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-07-11 00:00:00
|
19
|
+
date: 2011-07-11 00:00:00 +02:00
|
20
|
+
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: forgeos_core
|
@@ -26,12 +27,12 @@ dependencies:
|
|
26
27
|
requirements:
|
27
28
|
- - ">="
|
28
29
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
30
|
+
hash: 53
|
30
31
|
segments:
|
31
32
|
- 1
|
32
33
|
- 9
|
33
|
-
-
|
34
|
-
version: 1.9.
|
34
|
+
- 3
|
35
|
+
version: 1.9.3
|
35
36
|
type: :runtime
|
36
37
|
version_requirements: *id001
|
37
38
|
- !ruby/object:Gem::Dependency
|
@@ -353,6 +354,7 @@ files:
|
|
353
354
|
- LICENSE
|
354
355
|
- COPYING.LESSER
|
355
356
|
- COPYING
|
357
|
+
has_rdoc: true
|
356
358
|
homepage: http://github.com/webpulser/forgeos_cms
|
357
359
|
licenses: []
|
358
360
|
|
@@ -382,7 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
382
384
|
requirements: []
|
383
385
|
|
384
386
|
rubyforge_project:
|
385
|
-
rubygems_version: 1.
|
387
|
+
rubygems_version: 1.6.2
|
386
388
|
signing_key:
|
387
389
|
specification_version: 3
|
388
390
|
summary: Cms of Forgeos plugins suite
|