camaleon_cms 2.3.5 → 2.3.6
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.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/apps/themes/default/assets/js/main.js +13 -0
- data/app/apps/themes/default/views/layouts/index.html.erb +1 -0
- data/app/assets/javascripts/camaleon_cms/admin/_data.js +1 -3
- data/app/helpers/camaleon_cms/short_code_helper.rb +1 -1
- data/app/models/camaleon_cms/user.rb +3 -0
- data/app/models/concerns/camaleon_cms/user_methods.rb +0 -8
- data/app/views/camaleon_cms/default_theme/category.json.jbuilder +11 -0
- data/app/views/camaleon_cms/default_theme/partials/_cama_post_entry.json.jbuilder +7 -0
- data/app/views/camaleon_cms/default_theme/partials/_cama_post_type.json.jbuilder +6 -0
- data/app/views/camaleon_cms/default_theme/partials/_cama_posts_entries.json.jbuilder +8 -0
- data/app/views/camaleon_cms/default_theme/search.json.jbuilder +1 -0
- data/config/routes/frontend.rb +1 -1
- data/lib/camaleon_cms/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af1af7b67e70d26c3020d77aed3d468e8d8c27a1
|
4
|
+
data.tar.gz: 9dbb8a86e09a60fbdc8e4cdc74e9f48fb8c373fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec69dfae57a3f430ca5df628bcc0d6e7f4ad15b916a579de233c92874987506dace7c4464c2d2e96a3bd87c41513b1274cfe67679c5431bdb6e138389aa05c25
|
7
|
+
data.tar.gz: 38b58bfb8d7001edab29f52ba3cf22f2a4f04d3fd9b1df8123d70a9127034db1e1ed93cbf3acf122f7cddde48106bc918f57392b14f0e2a4d2f9d72fcc427d82
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
@@ -9,6 +9,7 @@
|
|
9
9
|
<%#= javascript_include_tag theme_asset_path("js/main.js") %>
|
10
10
|
<%= stylesheet_link_tag theme_asset_path("css/main.css") %>
|
11
11
|
<%= stylesheet_link_tag theme_asset_path("genericons/genericons.css") %>
|
12
|
+
<%= javascript_include_tag theme_asset_path("js/main.js") %>
|
12
13
|
<%= raw the_head %>
|
13
14
|
</head>
|
14
15
|
<body>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
// generate default settings for tinymce editor
|
2
1
|
function cama_get_tinymce_settings(settings){
|
3
2
|
if(!settings) settings = {};
|
4
3
|
var def = {
|
@@ -62,5 +61,4 @@ function cama_get_tinymce_settings(settings){
|
|
62
61
|
};
|
63
62
|
for(var ff in tinymce_global_settings["settings"]) tinymce_global_settings["settings"][ff](settings, def);
|
64
63
|
return $.extend({}, def, settings);
|
65
|
-
}
|
66
|
-
|
64
|
+
}
|
@@ -141,7 +141,7 @@ module CamaleonCms::ShortCodeHelper
|
|
141
141
|
if @_shortcodes_template[code].class.name == "Proc"
|
142
142
|
res = @_shortcodes_template[code].call(_shortcode_parse_attr(attrs), args)
|
143
143
|
else
|
144
|
-
res = render :file => template, :locals => {attributes: _shortcode_parse_attr(attrs), args: args}
|
144
|
+
res = render :file => template, :locals => {attributes: _shortcode_parse_attr(attrs), args: args}, formats: [:html]
|
145
145
|
end
|
146
146
|
res
|
147
147
|
end
|
@@ -6,5 +6,8 @@ unless PluginRoutes.static_system_info['user_model'].present?
|
|
6
6
|
# attr_accessible :is_valid_email
|
7
7
|
|
8
8
|
default_scope {order("#{CamaleonCms::User.table_name}.role ASC")}
|
9
|
+
validates :username, :presence => true
|
10
|
+
validates :email, :presence => true, :format => { :with => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } #, :unless => Proc.new { |a| a.auth_social.present? }
|
11
|
+
has_secure_password #validations: :auth_social.nil?
|
9
12
|
end
|
10
13
|
end
|
@@ -12,12 +12,8 @@ module CamaleonCms::UserMethods extend ActiveSupport::Concern
|
|
12
12
|
include CamaleonCms::Metas
|
13
13
|
include CamaleonCms::CustomFieldsRead
|
14
14
|
|
15
|
-
validates :username, :presence => true
|
16
|
-
validates :email, :presence => true, :format => { :with => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } #, :unless => Proc.new { |a| a.auth_social.present? }
|
17
15
|
validates_with CamaleonCms::UniqValidatorUser
|
18
16
|
|
19
|
-
has_secure_password #validations: :auth_social.nil?
|
20
|
-
|
21
17
|
before_create { generate_token(:auth_token) }
|
22
18
|
before_save :before_saved
|
23
19
|
before_create :before_saved
|
@@ -44,10 +40,6 @@ module CamaleonCms::UserMethods extend ActiveSupport::Concern
|
|
44
40
|
site.posts.where(user_id: self.id)
|
45
41
|
end
|
46
42
|
|
47
|
-
def _id
|
48
|
-
"#{self.role.upcase}-#{self.id}"
|
49
|
-
end
|
50
|
-
|
51
43
|
def fullname
|
52
44
|
"#{self.first_name} #{self.last_name}".titleize
|
53
45
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
json.title @category.the_title
|
2
|
+
json.description @category.the_excerpt
|
3
|
+
json.link @category.the_url
|
4
|
+
json.guid @category.the_id
|
5
|
+
json.thumb @category.the_thumb_url
|
6
|
+
json.post_type do
|
7
|
+
json.partial! partial: 'partials/cama_post_type', locals:{ post_type: @post_type }
|
8
|
+
end
|
9
|
+
json.posts do
|
10
|
+
json.partial! partial: 'partials/cama_posts_entries', locals:{ posts: @posts }
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
json.extract! post, :created_at, :updated_at, :status, :post_parent, :published_at, :user_id, :post_order, :is_feature
|
2
|
+
json.title post.the_title
|
3
|
+
json.description post.the_excerpt
|
4
|
+
json.content post.the_content
|
5
|
+
json.url post.the_url
|
6
|
+
json.slug post.the_slug
|
7
|
+
json.thumb post.the_thumb_url
|
@@ -0,0 +1,8 @@
|
|
1
|
+
json.current_page posts.current_page
|
2
|
+
json.per_page posts.per_page
|
3
|
+
json.total_entries posts.total_entries
|
4
|
+
json.previous_page url_for(params.merge(page: posts.previous_page)) if posts.previous_page.present?
|
5
|
+
json.next_page url_for(params.merge(page: posts.next_page)) if posts.next_page.present?
|
6
|
+
json.entries posts.decorate do |post|
|
7
|
+
json.partial! partial: 'partials/cama_post_entry', locals:{ post: post }
|
8
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
json.partial! partial: 'partials/cama_posts_entries', locals:{ posts: @posts }
|
data/config/routes/frontend.rb
CHANGED
@@ -54,7 +54,7 @@ Rails.application.routes.draw do
|
|
54
54
|
end
|
55
55
|
|
56
56
|
# posts
|
57
|
-
constraints(format: /html|rss/) do
|
57
|
+
constraints(format: /html|rss|json/) do
|
58
58
|
get ':parent_title/*slug(.:format)' => :post, as: :hierarchy_post, constraints:{ parent_title: /(?!(#{PluginRoutes.all_locales}))[\w\-]+/, slug: /[a-zA-Z0-9_=\s\-\/]+/ }
|
59
59
|
get ":slug(.:format)" => :post, :as => :post, constraints: { slug: /[a-zA-Z0-9_=\s\-]+/}
|
60
60
|
end
|
data/lib/camaleon_cms/version.rb
CHANGED
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.3.
|
4
|
+
version: 2.3.6
|
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: 2016-09-
|
11
|
+
date: 2016-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -445,6 +445,7 @@ files:
|
|
445
445
|
- app/apps/themes/default/assets/images/image.png
|
446
446
|
- app/apps/themes/default/assets/images/search-icon-2x.png
|
447
447
|
- app/apps/themes/default/assets/images/search-icon.png
|
448
|
+
- app/apps/themes/default/assets/js/main.js
|
448
449
|
- app/apps/themes/default/config/config.json
|
449
450
|
- app/apps/themes/default/default_helper.rb
|
450
451
|
- app/apps/themes/default/views/admin/settings.html.erb
|
@@ -836,6 +837,7 @@ files:
|
|
836
837
|
- app/views/camaleon_cms/admin/users/profile/_settings.html.erb
|
837
838
|
- app/views/camaleon_cms/default_theme/admin/settings.html.erb
|
838
839
|
- app/views/camaleon_cms/default_theme/category.html.erb
|
840
|
+
- app/views/camaleon_cms/default_theme/category.json.jbuilder
|
839
841
|
- app/views/camaleon_cms/default_theme/category.rss.builder
|
840
842
|
- app/views/camaleon_cms/default_theme/custom_fields/audio.html.erb
|
841
843
|
- app/views/camaleon_cms/default_theme/custom_fields/checkbox.html.erb
|
@@ -864,6 +866,9 @@ files:
|
|
864
866
|
- app/views/camaleon_cms/default_theme/layouts/cama_ajax.html.erb
|
865
867
|
- app/views/camaleon_cms/default_theme/layouts/index.html.erb
|
866
868
|
- app/views/camaleon_cms/default_theme/partials/_breadcrumb.html.erb
|
869
|
+
- app/views/camaleon_cms/default_theme/partials/_cama_post_entry.json.jbuilder
|
870
|
+
- app/views/camaleon_cms/default_theme/partials/_cama_post_type.json.jbuilder
|
871
|
+
- app/views/camaleon_cms/default_theme/partials/_cama_posts_entries.json.jbuilder
|
867
872
|
- app/views/camaleon_cms/default_theme/partials/_categories_list.html.erb
|
868
873
|
- app/views/camaleon_cms/default_theme/partials/_comments.html.erb
|
869
874
|
- app/views/camaleon_cms/default_theme/partials/_comments_list.html.erb
|
@@ -882,6 +887,7 @@ files:
|
|
882
887
|
- app/views/camaleon_cms/default_theme/robots.text.erb
|
883
888
|
- app/views/camaleon_cms/default_theme/rss.rss.builder
|
884
889
|
- app/views/camaleon_cms/default_theme/search.html.erb
|
890
|
+
- app/views/camaleon_cms/default_theme/search.json.jbuilder
|
885
891
|
- app/views/camaleon_cms/default_theme/single.html.erb
|
886
892
|
- app/views/camaleon_cms/default_theme/single.rss.builder
|
887
893
|
- app/views/camaleon_cms/default_theme/sitemap.html.erb
|