camaleon_cms 2.4.3.11 → 2.4.3.12
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/camaleon_cms/admin/_post.js +1 -1
- data/app/assets/javascripts/camaleon_cms/admin/_posttype.js.coffee +7 -1
- data/app/controllers/camaleon_cms/admin/categories_controller.rb +1 -1
- data/app/controllers/camaleon_cms/admin/posts_controller.rb +3 -1
- data/app/controllers/camaleon_cms/admin/sessions_controller.rb +1 -0
- data/app/controllers/camaleon_cms/admin/settings/post_types_controller.rb +2 -0
- data/app/controllers/camaleon_cms/frontend_controller.rb +1 -0
- data/app/decorators/camaleon_cms/custom_fields_concern.rb +20 -9
- data/app/helpers/camaleon_cms/short_code_helper.rb +1 -1
- data/app/models/camaleon_cms/post_type.rb +1 -1
- data/app/uploaders/camaleon_cms_local_uploader.rb +2 -2
- data/app/views/camaleon_cms/admin/posts/_sidebar.html.erb +1 -1
- data/app/views/camaleon_cms/admin/settings/custom_fields/_render.html.erb +1 -0
- data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_post_types.html.erb +1 -0
- data/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb +7 -0
- data/app/views/camaleon_cms/admin/settings/post_types/_form.html.erb +4 -2
- data/app/views/layouts/camaleon_cms/admin.html.erb +1 -1
- data/config/locales/camaleon_cms/admin/de.yml +1 -0
- data/config/locales/camaleon_cms/admin/en.yml +2 -1
- data/config/locales/camaleon_cms/admin/es.yml +2 -1
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_generator.rb +6 -4
- data/spec/dummy/db/schema.rb +130 -114
- data/spec/features/content_groups_spec.rb +2 -2
- data/spec/features/widgets_spec.rb +1 -1
- data/spec/support/custom_admin.html.erb +2 -1
- metadata +2 -4
- data/spec/dummy/db/test.sqlite3 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a88c2eae7a1687093b36edc1b7e114025c6f35c5
|
4
|
+
data.tar.gz: 2a4a338e0a9e7331d2c9ede64cb7a01a14ea2ce4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8058188fc6b86f8103fdb8391cddb1f3cade1c2ac0c178d91c71454bf0443de450891563303ea1363690f6a54e762debd50291113efc1e7cc01836c2698bf6b
|
7
|
+
data.tar.gz: 5cf62d58034bbe6d0e9e71677089648a154a91d3062ed9e6f88341e3c11af7b3ddc39200a21be5425a127a62041595762559072abf381a76cdfaea6fad2a2968
|
@@ -260,7 +260,7 @@ function cama_init_post(obj) {
|
|
260
260
|
});
|
261
261
|
}, on_close: function(modal){
|
262
262
|
var panel_cats = $form.find("#post_right_bar .list-categories");
|
263
|
-
$.get($form.find("#post_add_new_category").data('reload-url'), {categories: panel_cats.find("input:
|
263
|
+
$.get($form.find("#post_add_new_category").data('reload-url'), {categories: panel_cats.find("input[name='categories[]']:checked").map(function(i, el){ return $(this).val(); }).get()}, function(res){ panel_cats.html(res); });
|
264
264
|
}});
|
265
265
|
/*********** end *************/
|
266
266
|
}
|
@@ -18,4 +18,10 @@ window['cama_init_posttype_form'] = ->
|
|
18
18
|
items.prop("disabled", false)
|
19
19
|
else
|
20
20
|
items.prop("disabled", true)
|
21
|
-
).trigger("change")
|
21
|
+
).trigger("change")
|
22
|
+
|
23
|
+
# toggle single and multiple categories checkbox
|
24
|
+
cat_checks = form.find('input:checkbox[name="meta[has_category]"], input:checkbox[name="meta[has_single_category]"]')
|
25
|
+
cat_checks.change(->
|
26
|
+
cat_checks.not(this).prop("checked", false) if $(this).is(':checked')
|
27
|
+
).filter(':checked').trigger('change')
|
@@ -44,7 +44,7 @@ class CamaleonCms::Admin::CategoriesController < CamaleonCms::AdminController
|
|
44
44
|
|
45
45
|
# return html category list used to reload categories list in post editor form
|
46
46
|
def list
|
47
|
-
render inline: post_type_html_inputs(@post_type, "categories", "categories" , "checkbox" , params[:categories] || [], "categorychecklist", true )
|
47
|
+
render inline: post_type_html_inputs(@post_type, "categories", "categories" , @post_type.get_option('has_single_category', false) ? 'radio' : "checkbox" , params[:categories] || [], "categorychecklist", true )
|
48
48
|
end
|
49
49
|
|
50
50
|
def destroy
|
@@ -29,7 +29,9 @@ class CamaleonCms::Admin::PostsController < CamaleonCms::AdminController
|
|
29
29
|
params[:q] = (params[:q] || '').downcase
|
30
30
|
posts_all = posts_all.where("LOWER(#{CamaleonCms::Post.table_name}.title) LIKE ?", "%#{params[:q]}%")
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
|
+
posts_all = posts_all.where(user_id: current_user) if cannot?(:edit_other, @post_type) # filter only own contents
|
34
|
+
|
33
35
|
@posts = posts_all
|
34
36
|
params[:s] = 'published' unless params[:s].present?
|
35
37
|
@lists_tab = params[:s]
|
@@ -148,6 +148,7 @@ class CamaleonCms::Admin::SessionsController < CamaleonCms::CamaleonController
|
|
148
148
|
|
149
149
|
def before_hook_session
|
150
150
|
session[:cama_current_language] = params[:cama_set_language].to_sym if params[:cama_set_language].present?
|
151
|
+
session[:cama_current_language] = nil if current_site.get_languages.exclude?(session[:cama_current_language])
|
151
152
|
I18n.locale = params[:locale] || session[:cama_current_language] || current_site.get_languages.first
|
152
153
|
hooks_run("session_before_load")
|
153
154
|
end
|
@@ -18,6 +18,7 @@ class CamaleonCms::Admin::Settings::PostTypesController < CamaleonCms::Admin::Se
|
|
18
18
|
|
19
19
|
def update
|
20
20
|
if @post_type.update(@data_term)
|
21
|
+
@post_type.set_field_values(params.require(:field_options).permit!) if params[:field_options].present?
|
21
22
|
flash[:notice] = t('camaleon_cms.admin.post_type.message.updated')
|
22
23
|
redirect_to action: :index
|
23
24
|
else
|
@@ -28,6 +29,7 @@ class CamaleonCms::Admin::Settings::PostTypesController < CamaleonCms::Admin::Se
|
|
28
29
|
def create
|
29
30
|
@post_type = current_site.post_types.new(@data_term)
|
30
31
|
if @post_type.save
|
32
|
+
@post_type.set_field_values(params.require(:field_options).permit!) if params[:field_options].present?
|
31
33
|
flash[:notice] = t('camaleon_cms.admin.post_type.message.created')
|
32
34
|
redirect_to action: :index
|
33
35
|
else
|
@@ -215,6 +215,7 @@ class CamaleonCms::FrontendController < CamaleonCms::CamaleonController
|
|
215
215
|
|
216
216
|
@_site_options = current_site.options
|
217
217
|
session[:cama_current_language] = params[:cama_set_language].to_sym if params[:cama_set_language].present?
|
218
|
+
session[:cama_current_language] = nil if current_site.get_languages.exclude?(session[:cama_current_language])
|
218
219
|
I18n.locale = params[:locale] || session[:cama_current_language] || current_site.get_languages.first
|
219
220
|
return page_not_found unless current_site.get_languages.include?(I18n.locale.to_sym) # verify if this locale is available for this site
|
220
221
|
|
@@ -27,29 +27,35 @@ module CamaleonCms::CustomFieldsConcern
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# the same function as get_fields_grouped(..) but this returns translated and shortcodes evaluated
|
30
|
-
def the_fields_grouped(field_keys)
|
30
|
+
def the_fields_grouped(field_keys, is_json_format = false)
|
31
31
|
res = []
|
32
32
|
object.get_fields_grouped(field_keys).each do |_group|
|
33
33
|
group = {}.with_indifferent_access
|
34
34
|
_group.keys.each do |k|
|
35
|
-
|
35
|
+
if is_json_format
|
36
|
+
group[k] = _group[k].map{|v| parse_html_json(v) }
|
37
|
+
else
|
38
|
+
group[k] = _group[k].map{|v| h.do_shortcode(v.to_s.translate(@_deco_locale), object) }
|
39
|
+
end
|
36
40
|
end
|
37
41
|
res << group
|
38
42
|
end
|
39
43
|
res
|
40
44
|
end
|
41
45
|
|
46
|
+
# the same function as get_fields_grouped(..) but this returns translated and shortcodes evaluated
|
47
|
+
def the_field_grouped(field_key, is_json_format = false, is_multiple = false)
|
48
|
+
the_fields_grouped([field_key], is_json_format).map{|v| is_multiple ? v.values.first : v.values.try(:first).try(:first) }
|
49
|
+
# the_fields_grouped([field_key], is_json_format).map{|v| is_multiple ? v.values.first : v.values.first }
|
50
|
+
end
|
51
|
+
|
42
52
|
# return custom field contents with key field_key (only for type attributes)
|
43
53
|
# translated and short codes evaluated like the content
|
44
54
|
# this is for multiple values
|
45
55
|
def the_json_fields(field_key)
|
46
56
|
r = []
|
47
57
|
object.get_fields(field_key).each do |text|
|
48
|
-
|
49
|
-
_r.keys.each do |k|
|
50
|
-
_r[k] = h.do_shortcode(_r[k].to_s.translate(@_deco_locale), object)
|
51
|
-
end
|
52
|
-
r << _r
|
58
|
+
r << parse_html_json(text)
|
53
59
|
end
|
54
60
|
r
|
55
61
|
end
|
@@ -59,11 +65,16 @@ module CamaleonCms::CustomFieldsConcern
|
|
59
65
|
# translated and short codes evaluated like the content
|
60
66
|
# default_val: default value returned when this field was not registered
|
61
67
|
def the_json_field(field_key, default_val = '')
|
62
|
-
|
68
|
+
parse_html_json(object.get_field(field_key, default_val))
|
69
|
+
end
|
70
|
+
alias_method :the_attribute_field, :the_json_field
|
71
|
+
|
72
|
+
private
|
73
|
+
def parse_html_json(json)
|
74
|
+
r = JSON.parse(json || '{}').with_indifferent_access
|
63
75
|
r.keys.each do |k|
|
64
76
|
r[k] = h.do_shortcode(r[k].to_s.translate(@_deco_locale), object)
|
65
77
|
end
|
66
78
|
r
|
67
79
|
end
|
68
|
-
alias_method :the_attribute_field, :the_json_field
|
69
80
|
end
|
@@ -194,7 +194,7 @@ module CamaleonCms::ShortCodeHelper
|
|
194
194
|
if attrs["field"].present? # model custom fields
|
195
195
|
field = model.get_field_object(attrs["field"])
|
196
196
|
if attrs["render_field"].present?
|
197
|
-
return
|
197
|
+
return render_to_string(template: "custom_fields/#{field.options["field_key"]}", layout: false, :locals => {object: model, field: field, field_key: attrs["field"], attibutes: attrs})
|
198
198
|
else
|
199
199
|
if attrs["index"]
|
200
200
|
res = model.the_fields(attrs["field"])[attrs["index"].to_i-1] rescue ""
|
@@ -24,7 +24,7 @@ class CamaleonCms::PostType < CamaleonCms::TermTaxonomy
|
|
24
24
|
|
25
25
|
# check if current post type manage categories
|
26
26
|
def manage_categories?
|
27
|
-
options[:has_category]
|
27
|
+
options[:has_category] || options[:has_single_category]
|
28
28
|
end
|
29
29
|
|
30
30
|
# hide or show this post type on admin -> contents -> menu
|
@@ -88,8 +88,8 @@ class CamaleonCmsLocalUploader < CamaleonCmsUploader
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def delete_folder(key)
|
91
|
-
|
92
|
-
FileUtils.
|
91
|
+
folder = File.join(@root_folder, key)
|
92
|
+
FileUtils.rm_rf(folder) if Dir.exist? folder
|
93
93
|
reload
|
94
94
|
end
|
95
95
|
|
@@ -96,7 +96,7 @@
|
|
96
96
|
</div>
|
97
97
|
<div class="panel-body ">
|
98
98
|
<div class="form-group list-categories">
|
99
|
-
<%= raw post_type_html_inputs(@post_type, "categories", "categories" , "checkbox" ,params[:categories] || (@post.new_record? ? [] : @post.categories.pluck("#{CamaleonCms::TermTaxonomy.table_name}.id")), "categorychecklist", true )%>
|
99
|
+
<%= raw post_type_html_inputs(@post_type, "categories", "categories" , @post_type.get_option('has_single_category', false) ? 'radio' : "checkbox" ,params[:categories] || (@post.new_record? ? [] : @post.categories.pluck("#{CamaleonCms::TermTaxonomy.table_name}.id")), "categorychecklist", true )%>
|
100
100
|
</div>
|
101
101
|
</div>
|
102
102
|
</div>
|
@@ -34,6 +34,7 @@
|
|
34
34
|
render(field.get_option('render') || (cama_custom_field_elements[field.get_option('field_key').to_sym][:render] rescue nil) || "camaleon_cms/admin/settings/custom_fields/fields/#{field.options[:field_key]}", field: field, values: nil, is_disabled: is_disabled, default_use: default_use, field_name: field_name)
|
35
35
|
rescue => e
|
36
36
|
Rails.logger.error "Camaleon CMS - Render Custom Fields Error: Custom field template was not found => #{e.message}: #{$!.backtrace}".cama_log_style(:red)
|
37
|
+
e.message
|
37
38
|
end %>
|
38
39
|
</div>
|
39
40
|
</div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<div class="group-input-fields-content" data-callback-render="">
|
2
2
|
<select name="<%= field_name %>[<%= field.slug %>][values][]" class="form-control input-value <%= 'is_translate' if field.options[:translate].to_s.to_bool %> <%= "required" if field.options[:required].to_s.to_bool %>" >
|
3
|
+
<option value=""></option>
|
3
4
|
<% current_site.the_post_types.decorate.each do |ptype| %>
|
4
5
|
<option value="<%= ptype.id %>"><%= ptype.the_title %></option>
|
5
6
|
<% end %>
|
@@ -34,6 +34,13 @@
|
|
34
34
|
<%= f.label t('camaleon_cms.admin.settings.where_display_group') %><br>
|
35
35
|
<select id="select_assign_group" name="custom_field_group[assign_group]" class="form-control required">
|
36
36
|
<option value=""> </option>
|
37
|
+
|
38
|
+
<optgroup label="<%= t('camaleon_cms.admin.settings.in_post_type_settings_of', default: 'In Post Type settings of') %>">
|
39
|
+
<% current_site.post_types.each do |pt| pt = pt.decorate; value = "PostType,#{pt.id}" %>
|
40
|
+
<option value="<%= value %>"><%= pt.the_title %></option>
|
41
|
+
<% end %>
|
42
|
+
</optgroup>
|
43
|
+
|
37
44
|
<optgroup label="<%= t('camaleon_cms.admin.settings.posts_in') %>">
|
38
45
|
<% current_site.post_types.each do |pt| pt = pt.decorate; value = "PostType_Post,#{pt.id}" %>
|
39
46
|
<option value="<%= value %>" data-help="<%= "#{t('camaleon_cms.admin.settings.tooltip.add_custom_field_posts')}"+ pt.the_title %>"><%= pt.the_title %></option>
|
@@ -64,8 +64,10 @@
|
|
64
64
|
|
65
65
|
<div class="form-group">
|
66
66
|
<input name="meta[has_category]" type="hidden" value="false"/>
|
67
|
-
<label class="check0"><input name="meta[has_category]" type="checkbox" class="icheckbox0" value="true" <%= 'checked' if @post_type.get_option('has_category', false) %>/> <%= t('camaleon_cms.admin.table.manage_category') %></label>
|
67
|
+
<label class="check0"><input name="meta[has_category]" type="checkbox" class="icheckbox0" value="true" <%= 'checked' if @post_type.get_option('has_category', false) %>/> <%= t('camaleon_cms.admin.table.manage_category', default: 'Manage Multiple Categories') %></label>
|
68
68
|
<%= raw cama_html_tooltip("#{t('camaleon_cms.admin.post_type.tooltip.permission_asing_categories')}", 'right') %>
|
69
|
+
<input name="meta[has_single_category]" type="hidden" value="false"/>
|
70
|
+
<label style="float: right;"><input name="meta[has_single_category]" type="checkbox" class="icheckbox0" value="true" <%= 'checked' if @post_type.get_option('has_single_category', false) %>/> <%= t('camaleon_cms.admin.table.manage_single_category', default: 'Manage Single Category') %></label>
|
69
71
|
</div>
|
70
72
|
<div class="form-group">
|
71
73
|
<input name="meta[has_tags]" type="hidden" value="false"/>
|
@@ -149,7 +151,7 @@
|
|
149
151
|
</div>
|
150
152
|
</div>
|
151
153
|
<% if groups.present? %>
|
152
|
-
<div id="post_type_setting_custom">
|
154
|
+
<div role="tabpanel" class="tab-pane" id="post_type_setting_custom">
|
153
155
|
<%= render partial: "camaleon_cms/admin/settings/custom_fields/render", locals: {record: @post_type, field_groups: groups} %>
|
154
156
|
</div>
|
155
157
|
<% end %>
|
@@ -16,6 +16,7 @@
|
|
16
16
|
var tinymce_global_settings = {language_url: "<%= asset_path("camaleon_cms/admin/tinymce/langs/#{current_locale}.js") %>", custom_css: [], custom_toolbar: [], post_render: [], init: [], setups: [], settings: []};
|
17
17
|
var I18n_data = <%= I18n.backend.respond_to?(:translations) ? I18n.backend.send(:translations)[current_locale.to_sym][:camaleon_cms][:admin][:js].to_json.html_safe : !!(I18n.backend.backends[1] && I18n.backend.backends[1].backends[1]) ? I18n.backend.backends[1].backends[1].send(:translations)[current_locale.to_sym][:camaleon_cms][:admin][:js].to_json.html_safe : "{}" rescue "{}" %>
|
18
18
|
</script>
|
19
|
+
<%= render file: Rails.root.join('..', '..', 'spec/support/custom_admin') if Rails.env.test? %>
|
19
20
|
<%= javascript_include_tag "camaleon_cms/admin/admin-manifest" %>
|
20
21
|
|
21
22
|
<%= javascript_include_tag "camaleon_cms/admin/jquery_validate/#{current_locale}.js" if current_locale != 'en' %>
|
@@ -27,7 +28,6 @@
|
|
27
28
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
28
29
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
29
30
|
<![endif]-->
|
30
|
-
<%= render file: Rails.root.join('..', '..', 'spec/support/custom_admin') if Rails.env.test? %>
|
31
31
|
</head>
|
32
32
|
<body class="hold-transition skin-blue sidebar-mini" data-intro="<%= current_site.get_option("save_intro") %>">
|
33
33
|
<%= yield :before_content if content_for? :before_content %>
|
@@ -393,6 +393,7 @@ de:
|
|
393
393
|
permission_login_facebook: 'Login via Facebook erlauben?'
|
394
394
|
permission_login_google: 'Login via Google+ erlauben?'
|
395
395
|
posts_in: 'Posts in'
|
396
|
+
in_post_type_settings_of: 'In den Post Type Einstellungen von'
|
396
397
|
settings: 'Einstellungen'
|
397
398
|
tooltip:
|
398
399
|
add_custom_field_posts: 'Füge selbsterstelltes Feld hinzu in Posts von '
|
@@ -393,6 +393,7 @@ en:
|
|
393
393
|
permission_login_facebook: 'Permission to Login with Facebook'
|
394
394
|
permission_login_google: 'Permission to Login with Google+'
|
395
395
|
posts_in: 'Posts in'
|
396
|
+
in_post_type_settings_of: 'In Post Type settings of'
|
396
397
|
settings: 'Settings'
|
397
398
|
tooltip:
|
398
399
|
add_custom_field_posts: 'Add Custom Field in Posts of '
|
@@ -489,7 +490,7 @@ en:
|
|
489
490
|
linkedin: 'Linkedin'
|
490
491
|
login: 'Login'
|
491
492
|
logo: 'Logo'
|
492
|
-
manage_category: 'Manage
|
493
|
+
manage_category: 'Manage Multiple Categories'
|
493
494
|
manage_content: 'Manage Content'
|
494
495
|
manage_picture: 'Manage Picture'
|
495
496
|
manage_seo: 'Manage Seo'
|
@@ -469,7 +469,8 @@ es:
|
|
469
469
|
linkedin: 'Linkedin'
|
470
470
|
login: 'Iniciar Sesión'
|
471
471
|
logo: 'Logo'
|
472
|
-
manage_category: 'Gestionar
|
472
|
+
manage_category: 'Gestionar multiples categorías'
|
473
|
+
manage_single_category: 'Gestionar una sola categoría'
|
473
474
|
manage_content: 'Gestionar el contenido'
|
474
475
|
manage_picture: 'Gestionar Imagen'
|
475
476
|
manage_seo: 'Gestionar Imagen'
|
data/lib/camaleon_cms/version.rb
CHANGED
@@ -11,7 +11,7 @@ module CamaleonCms
|
|
11
11
|
plugin_dir = Rails.root.join("apps", "plugins", get_plugin_name).to_s
|
12
12
|
plugin_dir_path = "apps/plugins/#{get_plugin_name}"
|
13
13
|
if behavior == :revoke
|
14
|
-
FileUtils.rm_r(plugin_dir)
|
14
|
+
FileUtils.rm_r(plugin_dir) if Dir.exist?(plugin_dir)
|
15
15
|
append_to_file Rails.root.join("Gemfile") do
|
16
16
|
"\n\ngem '#{get_plugin_name}', path: '#{plugin_dir_path}'"
|
17
17
|
end
|
@@ -91,9 +91,11 @@ module CamaleonCms
|
|
91
91
|
end
|
92
92
|
end"
|
93
93
|
end
|
94
|
-
|
95
|
-
|
96
|
-
"
|
94
|
+
|
95
|
+
if PluginRoutes.isRails4?
|
96
|
+
append_to_file Rails.root.join("Gemfile") do
|
97
|
+
"\n\ngem '#{get_plugin_name}', path: '#{plugin_dir_path}'"
|
98
|
+
end
|
97
99
|
end
|
98
100
|
|
99
101
|
# destroy non used files
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
# This file is auto-generated from the current state of the database. Instead
|
2
3
|
# of editing this file, please use the migrations feature of Active Record to
|
3
4
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -12,166 +13,181 @@
|
|
12
13
|
|
13
14
|
ActiveRecord::Schema.define(version: 20161215202255) do
|
14
15
|
|
15
|
-
create_table "
|
16
|
-
t.string
|
17
|
-
t.string "author_email"
|
18
|
-
t.string "author_url"
|
19
|
-
t.string "author_IP"
|
20
|
-
t.text "content"
|
21
|
-
t.string "approved", default: "pending"
|
22
|
-
t.string "agent"
|
23
|
-
t.string "typee"
|
24
|
-
t.integer "comment_parent"
|
25
|
-
t.integer "post_id"
|
26
|
-
t.integer "user_id"
|
16
|
+
create_table "ar_internal_metadata", primary_key: "key", force: :cascade do |t|
|
17
|
+
t.string "value"
|
27
18
|
t.datetime "created_at", null: false
|
28
19
|
t.datetime "updated_at", null: false
|
29
|
-
t.index ["approved"], name: "index_comments_on_approved"
|
30
|
-
t.index ["comment_parent"], name: "index_comments_on_comment_parent"
|
31
|
-
t.index ["post_id"], name: "index_comments_on_post_id"
|
32
|
-
t.index ["user_id"], name: "index_comments_on_user_id"
|
33
20
|
end
|
34
21
|
|
22
|
+
create_table "comments", force: :cascade do |t|
|
23
|
+
t.string "author"
|
24
|
+
t.string "author_email"
|
25
|
+
t.string "author_url"
|
26
|
+
t.string "author_IP"
|
27
|
+
t.text "content"
|
28
|
+
t.string "approved", default: "pending"
|
29
|
+
t.string "agent"
|
30
|
+
t.string "typee"
|
31
|
+
t.integer "comment_parent"
|
32
|
+
t.integer "post_id"
|
33
|
+
t.integer "user_id"
|
34
|
+
t.datetime "created_at", null: false
|
35
|
+
t.datetime "updated_at", null: false
|
36
|
+
end
|
37
|
+
|
38
|
+
add_index "comments", ["approved"], name: "index_comments_on_approved"
|
39
|
+
add_index "comments", ["comment_parent"], name: "index_comments_on_comment_parent"
|
40
|
+
add_index "comments", ["post_id"], name: "index_comments_on_post_id"
|
41
|
+
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
|
42
|
+
|
35
43
|
create_table "custom_fields", force: :cascade do |t|
|
36
|
-
t.string
|
37
|
-
t.string
|
38
|
-
t.string
|
44
|
+
t.string "object_class"
|
45
|
+
t.string "name"
|
46
|
+
t.string "slug"
|
39
47
|
t.integer "objectid"
|
40
48
|
t.integer "parent_id"
|
41
49
|
t.integer "field_order"
|
42
|
-
t.integer "count",
|
43
|
-
t.boolean "is_repeat",
|
44
|
-
t.text
|
45
|
-
t.string
|
46
|
-
t.index ["object_class"], name: "index_custom_fields_on_object_class"
|
47
|
-
t.index ["objectid"], name: "index_custom_fields_on_objectid"
|
48
|
-
t.index ["parent_id"], name: "index_custom_fields_on_parent_id"
|
49
|
-
t.index ["slug"], name: "index_custom_fields_on_slug"
|
50
|
+
t.integer "count", default: 0
|
51
|
+
t.boolean "is_repeat", default: false
|
52
|
+
t.text "description"
|
53
|
+
t.string "status"
|
50
54
|
end
|
51
55
|
|
56
|
+
add_index "custom_fields", ["object_class"], name: "index_custom_fields_on_object_class"
|
57
|
+
add_index "custom_fields", ["objectid"], name: "index_custom_fields_on_objectid"
|
58
|
+
add_index "custom_fields", ["parent_id"], name: "index_custom_fields_on_parent_id"
|
59
|
+
add_index "custom_fields", ["slug"], name: "index_custom_fields_on_slug"
|
60
|
+
|
52
61
|
create_table "custom_fields_relationships", force: :cascade do |t|
|
53
62
|
t.integer "objectid"
|
54
63
|
t.integer "custom_field_id"
|
55
64
|
t.integer "term_order"
|
56
|
-
t.string
|
57
|
-
t.text
|
58
|
-
t.string
|
59
|
-
t.integer "group_number",
|
60
|
-
t.index ["custom_field_id"], name: "index_custom_fields_relationships_on_custom_field_id"
|
61
|
-
t.index ["custom_field_slug"], name: "index_custom_fields_relationships_on_custom_field_slug"
|
62
|
-
t.index ["object_class"], name: "index_custom_fields_relationships_on_object_class"
|
63
|
-
t.index ["objectid"], name: "index_custom_fields_relationships_on_objectid"
|
65
|
+
t.string "object_class"
|
66
|
+
t.text "value", limit: 1073741823
|
67
|
+
t.string "custom_field_slug"
|
68
|
+
t.integer "group_number", default: 0
|
64
69
|
end
|
65
70
|
|
71
|
+
add_index "custom_fields_relationships", ["custom_field_id"], name: "index_custom_fields_relationships_on_custom_field_id"
|
72
|
+
add_index "custom_fields_relationships", ["custom_field_slug"], name: "index_custom_fields_relationships_on_custom_field_slug"
|
73
|
+
add_index "custom_fields_relationships", ["object_class"], name: "index_custom_fields_relationships_on_object_class"
|
74
|
+
add_index "custom_fields_relationships", ["objectid"], name: "index_custom_fields_relationships_on_objectid"
|
75
|
+
|
66
76
|
create_table "metas", force: :cascade do |t|
|
67
|
-
t.string
|
68
|
-
t.text
|
77
|
+
t.string "key"
|
78
|
+
t.text "value", limit: 1073741823
|
69
79
|
t.integer "objectid"
|
70
|
-
t.string
|
71
|
-
t.index ["key"], name: "index_metas_on_key"
|
72
|
-
t.index ["object_class"], name: "index_metas_on_object_class"
|
73
|
-
t.index ["objectid"], name: "index_metas_on_objectid"
|
80
|
+
t.string "object_class"
|
74
81
|
end
|
75
82
|
|
83
|
+
add_index "metas", ["key"], name: "index_metas_on_key"
|
84
|
+
add_index "metas", ["object_class"], name: "index_metas_on_object_class"
|
85
|
+
add_index "metas", ["objectid"], name: "index_metas_on_objectid"
|
86
|
+
|
76
87
|
create_table "plugins_attacks", force: :cascade do |t|
|
77
|
-
t.string
|
78
|
-
t.string
|
79
|
-
t.integer
|
88
|
+
t.string "path"
|
89
|
+
t.string "browser_key"
|
90
|
+
t.integer "site_id"
|
80
91
|
t.datetime "created_at"
|
81
|
-
t.index ["browser_key"], name: "index_plugins_attacks_on_browser_key"
|
82
|
-
t.index ["path"], name: "index_plugins_attacks_on_path"
|
83
|
-
t.index ["site_id"], name: "index_plugins_attacks_on_site_id"
|
84
92
|
end
|
85
93
|
|
94
|
+
add_index "plugins_attacks", ["browser_key"], name: "index_plugins_attacks_on_browser_key"
|
95
|
+
add_index "plugins_attacks", ["path"], name: "index_plugins_attacks_on_path"
|
96
|
+
add_index "plugins_attacks", ["site_id"], name: "index_plugins_attacks_on_site_id"
|
97
|
+
|
86
98
|
create_table "plugins_contact_forms", force: :cascade do |t|
|
87
|
-
t.integer
|
88
|
-
t.integer
|
89
|
-
t.integer
|
90
|
-
t.string
|
91
|
-
t.string
|
92
|
-
t.text
|
93
|
-
t.text
|
94
|
-
t.text
|
99
|
+
t.integer "site_id"
|
100
|
+
t.integer "count"
|
101
|
+
t.integer "parent_id"
|
102
|
+
t.string "name"
|
103
|
+
t.string "slug"
|
104
|
+
t.text "description"
|
105
|
+
t.text "value"
|
106
|
+
t.text "settings"
|
95
107
|
t.datetime "created_at"
|
96
108
|
t.datetime "updated_at"
|
97
109
|
end
|
98
110
|
|
99
111
|
create_table "posts", force: :cascade do |t|
|
100
|
-
t.string
|
101
|
-
t.string
|
102
|
-
t.text
|
103
|
-
t.text
|
104
|
-
t.string
|
112
|
+
t.string "title"
|
113
|
+
t.string "slug"
|
114
|
+
t.text "content", limit: 1073741823
|
115
|
+
t.text "content_filtered", limit: 1073741823
|
116
|
+
t.string "status", default: "published"
|
105
117
|
t.datetime "published_at"
|
106
|
-
t.integer
|
107
|
-
t.string
|
108
|
-
t.text
|
109
|
-
t.string
|
110
|
-
t.datetime "created_at",
|
111
|
-
t.datetime "updated_at",
|
112
|
-
t.integer
|
113
|
-
t.integer
|
114
|
-
t.integer
|
115
|
-
t.boolean
|
116
|
-
t.index ["post_class"], name: "index_posts_on_post_class"
|
117
|
-
t.index ["post_parent"], name: "index_posts_on_post_parent"
|
118
|
-
t.index ["slug"], name: "index_posts_on_slug"
|
119
|
-
t.index ["status"], name: "index_posts_on_status"
|
120
|
-
t.index ["user_id"], name: "index_posts_on_user_id"
|
118
|
+
t.integer "post_parent"
|
119
|
+
t.string "visibility", default: "public"
|
120
|
+
t.text "visibility_value"
|
121
|
+
t.string "post_class", default: "Post"
|
122
|
+
t.datetime "created_at", null: false
|
123
|
+
t.datetime "updated_at", null: false
|
124
|
+
t.integer "user_id"
|
125
|
+
t.integer "post_order", default: 0
|
126
|
+
t.integer "taxonomy_id"
|
127
|
+
t.boolean "is_feature", default: false
|
121
128
|
end
|
122
129
|
|
130
|
+
add_index "posts", ["post_class"], name: "index_posts_on_post_class"
|
131
|
+
add_index "posts", ["post_parent"], name: "index_posts_on_post_parent"
|
132
|
+
add_index "posts", ["slug"], name: "index_posts_on_slug"
|
133
|
+
add_index "posts", ["status"], name: "index_posts_on_status"
|
134
|
+
add_index "posts", ["user_id"], name: "index_posts_on_user_id"
|
135
|
+
|
123
136
|
create_table "term_relationships", force: :cascade do |t|
|
124
137
|
t.integer "objectid"
|
125
138
|
t.integer "term_order"
|
126
139
|
t.integer "term_taxonomy_id"
|
127
|
-
t.index ["objectid"], name: "index_term_relationships_on_objectid"
|
128
|
-
t.index ["term_order"], name: "index_term_relationships_on_term_order"
|
129
|
-
t.index ["term_taxonomy_id"], name: "index_term_relationships_on_term_taxonomy_id"
|
130
140
|
end
|
131
141
|
|
142
|
+
add_index "term_relationships", ["objectid"], name: "index_term_relationships_on_objectid"
|
143
|
+
add_index "term_relationships", ["term_order"], name: "index_term_relationships_on_term_order"
|
144
|
+
add_index "term_relationships", ["term_taxonomy_id"], name: "index_term_relationships_on_term_taxonomy_id"
|
145
|
+
|
132
146
|
create_table "term_taxonomy", force: :cascade do |t|
|
133
|
-
t.string
|
134
|
-
t.text
|
135
|
-
t.integer
|
136
|
-
t.integer
|
137
|
-
t.string
|
138
|
-
t.string
|
139
|
-
t.integer
|
140
|
-
t.integer
|
141
|
-
t.string
|
142
|
-
t.datetime "created_at",
|
143
|
-
t.datetime "updated_at",
|
144
|
-
t.integer
|
145
|
-
t.index ["parent_id"], name: "index_term_taxonomy_on_parent_id"
|
146
|
-
t.index ["slug"], name: "index_term_taxonomy_on_slug"
|
147
|
-
t.index ["taxonomy"], name: "index_term_taxonomy_on_taxonomy"
|
148
|
-
t.index ["term_order"], name: "index_term_taxonomy_on_term_order"
|
149
|
-
t.index ["user_id"], name: "index_term_taxonomy_on_user_id"
|
147
|
+
t.string "taxonomy"
|
148
|
+
t.text "description", limit: 1073741823
|
149
|
+
t.integer "parent_id"
|
150
|
+
t.integer "count"
|
151
|
+
t.string "name"
|
152
|
+
t.string "slug"
|
153
|
+
t.integer "term_group"
|
154
|
+
t.integer "term_order"
|
155
|
+
t.string "status"
|
156
|
+
t.datetime "created_at", null: false
|
157
|
+
t.datetime "updated_at", null: false
|
158
|
+
t.integer "user_id"
|
150
159
|
end
|
151
160
|
|
161
|
+
add_index "term_taxonomy", ["parent_id"], name: "index_term_taxonomy_on_parent_id"
|
162
|
+
add_index "term_taxonomy", ["slug"], name: "index_term_taxonomy_on_slug"
|
163
|
+
add_index "term_taxonomy", ["taxonomy"], name: "index_term_taxonomy_on_taxonomy"
|
164
|
+
add_index "term_taxonomy", ["term_order"], name: "index_term_taxonomy_on_term_order"
|
165
|
+
add_index "term_taxonomy", ["user_id"], name: "index_term_taxonomy_on_user_id"
|
166
|
+
|
152
167
|
create_table "users", force: :cascade do |t|
|
153
|
-
t.string
|
154
|
-
t.string
|
155
|
-
t.string
|
156
|
-
t.string
|
157
|
-
t.string
|
158
|
-
t.string
|
159
|
-
t.string
|
160
|
-
t.integer
|
168
|
+
t.string "username"
|
169
|
+
t.string "role", default: "client"
|
170
|
+
t.string "email"
|
171
|
+
t.string "slug"
|
172
|
+
t.string "password_digest"
|
173
|
+
t.string "auth_token"
|
174
|
+
t.string "password_reset_token"
|
175
|
+
t.integer "parent_id"
|
161
176
|
t.datetime "password_reset_sent_at"
|
162
177
|
t.datetime "last_login_at"
|
163
|
-
t.datetime "created_at",
|
164
|
-
t.datetime "updated_at",
|
165
|
-
t.integer
|
166
|
-
t.string
|
178
|
+
t.datetime "created_at", null: false
|
179
|
+
t.datetime "updated_at", null: false
|
180
|
+
t.integer "site_id", default: -1
|
181
|
+
t.string "confirm_email_token"
|
167
182
|
t.datetime "confirm_email_sent_at"
|
168
|
-
t.boolean
|
169
|
-
t.string
|
170
|
-
t.string
|
171
|
-
t.index ["email"], name: "index_users_on_email"
|
172
|
-
t.index ["role"], name: "index_users_on_role"
|
173
|
-
t.index ["site_id"], name: "index_users_on_site_id"
|
174
|
-
t.index ["username"], name: "index_users_on_username"
|
183
|
+
t.boolean "is_valid_email", default: true
|
184
|
+
t.string "first_name"
|
185
|
+
t.string "last_name"
|
175
186
|
end
|
176
187
|
|
188
|
+
add_index "users", ["email"], name: "index_users_on_email"
|
189
|
+
add_index "users", ["role"], name: "index_users_on_role"
|
190
|
+
add_index "users", ["site_id"], name: "index_users_on_site_id"
|
191
|
+
add_index "users", ["username"], name: "index_users_on_username"
|
192
|
+
|
177
193
|
end
|
@@ -11,7 +11,7 @@ describe "the Content Groups", js: true do
|
|
11
11
|
fill_in 'post_type_name', :with => 'Test cat'
|
12
12
|
fill_in 'post_type_slug', :with => 'test-content'
|
13
13
|
fill_in 'post_type_description', :with => 'test-content descri'
|
14
|
-
check("Manage
|
14
|
+
check("Manage Multiple Categories")
|
15
15
|
click_button 'Submit'
|
16
16
|
end
|
17
17
|
expect(page).to have_css('.alert-success')
|
@@ -24,7 +24,7 @@ describe "the Content Groups", js: true do
|
|
24
24
|
all("table .btn-default").last.click
|
25
25
|
end
|
26
26
|
within("#post_type_form") do
|
27
|
-
expect(page).to have_checked_field("Manage
|
27
|
+
expect(page).to have_checked_field("Manage Multiple Categories")
|
28
28
|
fill_in 'post_type_name', :with => 'Test cat updated'
|
29
29
|
fill_in 'post_type_slug', :with => 'test-content'
|
30
30
|
click_button 'Submit'
|
@@ -1 +1,2 @@
|
|
1
|
-
<!--<style>.fa::before{ content: "i" !important; } </style>-->
|
1
|
+
<!--<style>.fa::before{ content: "i" !important; } </style>-->
|
2
|
+
<script>window['URL'] = '';</script> <!--FIX for undefined URL on tinymce-->
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camaleon_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.3.
|
4
|
+
version: 2.4.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen Peredo Diaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -1046,7 +1046,6 @@ files:
|
|
1046
1046
|
- spec/dummy/config/routes.rb
|
1047
1047
|
- spec/dummy/config/secrets.yml
|
1048
1048
|
- spec/dummy/db/schema.rb
|
1049
|
-
- spec/dummy/db/test.sqlite3
|
1050
1049
|
- spec/features/categories_spec.rb
|
1051
1050
|
- spec/features/comments_spec.rb
|
1052
1051
|
- spec/features/contact_form_spec.rb
|
@@ -1136,7 +1135,6 @@ test_files:
|
|
1136
1135
|
- spec/dummy/config/secrets.yml
|
1137
1136
|
- spec/dummy/config.ru
|
1138
1137
|
- spec/dummy/db/schema.rb
|
1139
|
-
- spec/dummy/db/test.sqlite3
|
1140
1138
|
- spec/dummy/Rakefile
|
1141
1139
|
- spec/dummy/README.rdoc
|
1142
1140
|
- spec/features/categories_spec.rb
|
data/spec/dummy/db/test.sqlite3
DELETED
Binary file
|