camaleon_cms 2.7.5 → 2.8.0

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.

Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -20
  3. data/app/apps/plugins/attack/config/config.json +2 -2
  4. data/app/apps/plugins/front_cache/admin_controller.rb +4 -6
  5. data/app/apps/plugins/front_cache/config/config.json +1 -1
  6. data/app/apps/plugins/front_cache/config/locales/translation.yml +1 -1
  7. data/app/apps/plugins/front_cache/front_cache_helper.rb +3 -3
  8. data/app/apps/plugins/visibility_post/config/config.json +2 -2
  9. data/app/apps/themes/camaleon_first/assets/js/main.js +1 -1
  10. data/app/apps/themes/camaleon_first/views/index.html.erb +1 -1
  11. data/app/apps/themes/default/assets/js/main.js +1 -1
  12. data/app/apps/themes/new/assets/js/main.js +1 -1
  13. data/app/apps/themes/new/views/index.html.erb +4 -4
  14. data/app/apps/themes/new/views/layouts/_footer.html.erb +2 -2
  15. data/app/assets/javascripts/camaleon_cms/admin/admin-basic-manifest.js +2 -2
  16. data/app/assets/javascripts/camaleon_cms/admin/admin-manifest.js +1 -1
  17. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/de.js +2 -2
  18. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/en.js +2 -2
  19. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/fr.js +2 -2
  20. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/it.js +2 -2
  21. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/nl.js +1 -1
  22. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/pt-BR.js +2 -2
  23. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/ru.js +2 -2
  24. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/uk.js +2 -2
  25. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/zh-CN.js +1 -1
  26. data/app/assets/javascripts/camaleon_cms/admin/uploader/_media_manager.js +2 -2
  27. data/app/controllers/camaleon_cms/admin/appearances/nav_menus_controller.rb +15 -10
  28. data/app/controllers/camaleon_cms/admin/installers_controller.rb +1 -1
  29. data/app/controllers/camaleon_cms/admin/settings_controller.rb +1 -1
  30. data/app/controllers/camaleon_cms/camaleon_controller.rb +8 -2
  31. data/app/decorators/camaleon_cms/application_decorator.rb +8 -0
  32. data/app/decorators/camaleon_cms/category_decorator.rb +1 -1
  33. data/app/decorators/camaleon_cms/post_decorator.rb +5 -5
  34. data/app/decorators/camaleon_cms/post_type_decorator.rb +3 -3
  35. data/app/decorators/camaleon_cms/term_taxonomy_decorator.rb +1 -1
  36. data/app/helpers/camaleon_cms/admin/category_helper.rb +1 -1
  37. data/app/helpers/camaleon_cms/frontend/nav_menu_helper.rb +12 -11
  38. data/app/helpers/camaleon_cms/html_helper.rb +6 -6
  39. data/app/helpers/camaleon_cms/plugins_helper.rb +1 -1
  40. data/app/helpers/camaleon_cms/session_helper.rb +1 -1
  41. data/app/helpers/camaleon_cms/short_code_helper.rb +1 -1
  42. data/app/helpers/camaleon_cms/site_helper.rb +1 -1
  43. data/app/helpers/camaleon_cms/theme_helper.rb +1 -1
  44. data/app/helpers/camaleon_cms/uploader_helper.rb +10 -5
  45. data/app/models/camaleon_cms/ability.rb +1 -1
  46. data/app/models/camaleon_cms/custom_field_group.rb +2 -2
  47. data/app/models/camaleon_cms/nav_menu.rb +1 -1
  48. data/app/models/camaleon_cms/post.rb +1 -1
  49. data/app/models/camaleon_cms/post_default.rb +1 -1
  50. data/app/models/camaleon_cms/post_type.rb +8 -8
  51. data/app/models/camaleon_cms/site.rb +1 -1
  52. data/app/models/camaleon_cms/term_taxonomy.rb +13 -0
  53. data/app/models/concerns/camaleon_cms/custom_fields_read.rb +11 -22
  54. data/app/models/concerns/camaleon_cms/site_default_settings.rb +1 -1
  55. data/app/uploaders/camaleon_cms_uploader.rb +5 -0
  56. data/app/validators/camaleon_cms/post_uniq_validator.rb +11 -12
  57. data/app/validators/camaleon_cms/uniq_validator.rb +9 -3
  58. data/app/views/camaleon_cms/admin/media/index.html.erb +1 -1
  59. data/app/views/camaleon_cms/admin/settings/_email_settings.html.erb +2 -2
  60. data/app/views/camaleon_cms/default_theme/index.html.erb +4 -4
  61. data/app/views/camaleon_cms/default_theme/sitemap.xml.builder +3 -3
  62. data/app/views/layouts/camaleon_cms/admin/_footer.html.erb +1 -1
  63. data/config/initializers/custom_initializers.rb +14 -0
  64. data/lib/camaleon_cms/engine.rb +1 -1
  65. data/lib/camaleon_cms/version.rb +1 -1
  66. data/lib/ext/hash.rb +1 -1
  67. data/lib/ext/string.rb +2 -2
  68. data/lib/generators/camaleon_cms/theme_template/assets/js/main.js +1 -1
  69. metadata +21 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db43005ef92c135dec7d3ef6871aeac761dd01d904e3f5707bee706f2dd65aa3
4
- data.tar.gz: e99b9643fba7ab169ede5758bedfd1b8c7c569c7972363782f79ec91770da3da
3
+ metadata.gz: b37bf38981929866b3502a12e452ed0289275c2809bf3f924bb19abc10fcc9f7
4
+ data.tar.gz: 7f14b8b21e2d56e64f1325174158597c3487b055573516ec8189e0d68e85c415
5
5
  SHA512:
6
- metadata.gz: 7e4d609bf25dfbfe2c994f1393dbfe7bc9aa060f07e10bd6446f3273fbecc1646868a1efcae9b14dd32dd206c64a986e0210ea1199c3f1e2cda680953824ada2
7
- data.tar.gz: fb39191112e373c198578073e5b317bd94749b4ef2956afd2e3baa07a98e91d3a30af9c1f5c9e98822f9338a8ab5f86aea6be405335a71794c55317bc68e285e
6
+ metadata.gz: 9511c75f6413994762b0adf8ad6a425bd1db659cf53d584415f9f7bcd8e805124a4841f604c477676e7a6c5f4785a6769e7eb5f26976e5e9cc35865150ecd40e
7
+ data.tar.gz: 9d41f8a59f06d66f78e3a34342ef82124c49eee21d694b06d6c5f8086880ebc157518d88d99d38ae59f835120e2173ffe6c05f40c9d865e665de77cd1e02b6ff
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # CAMALEON CMS
2
2
 
3
- ![](http://camaleon.tuzitio.com/media/132/logo2.png)
3
+ ![](https://camaleon.website/media/132/logo2.png)
4
4
 
5
5
  [![Test supported versions](https://github.com/owen2345/camaleon-cms/actions/workflows/current_support.yml/badge.svg)](https://github.com/owen2345/camaleon-cms/actions/workflows/current_support.yml)
6
6
  ![](https://img.shields.io/badge/Support-Immediate-green.svg)
7
7
 
8
- [Website](http://camaleon.tuzitio.com/)
8
+ [Website](https://camaleon.website/)
9
9
 
10
- [Documentation](http://camaleon.tuzitio.com/docs.html)
10
+ [Documentation](https://camaleon.website/docs.html)
11
11
 
12
- [Demonstration](http://camaleon.tuzitio.com/plugins/demo_manage/)
12
+ [Demonstration](https://camaleon.website/plugins/demo_manage/)
13
13
 
14
14
  ## About
15
15
 
@@ -18,10 +18,10 @@ Camaleon CMS is a dynamic and advanced content management system based on Ruby o
18
18
  Camaleon CMS is a flexible manager where you can build your custom content structure without coding anything by custom fields and custom contents type.
19
19
 
20
20
  To download or publish themes go to Theme store:
21
- http://camaleon.tuzitio.com/store/themes
21
+ https://camaleon.website/store/themes
22
22
 
23
23
  To download or publish plugins go to Plugin store:
24
- http://camaleon.tuzitio.com/store/plugins
24
+ https://camaleon.website/store/plugins
25
25
 
26
26
  ![](screenshot.png)
27
27
 
@@ -86,9 +86,9 @@ http://camaleon.tuzitio.com/store/plugins
86
86
  * TinyMCE Template Integration - https://github.com/owen2345/Camaleon-Tinymce-Templates
87
87
  * Download Manager - https://github.com/max2320/camaleon-download
88
88
  * OAuth - https://github.com/owen2345/camaleon_oauth
89
- * Visual Editor - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/camaleon_editor
90
- * Spree Commerce Integration - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/camaleon-spree
91
- * Admin AJAX - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/admin_ajax
89
+ * Visual Editor - Paid Plugin ($) - https://camaleon.website/store/plugins/camaleon_editor
90
+ * Spree Commerce Integration - Paid Plugin ($) - https://camaleon.website/store/plugins/camaleon-spree
91
+ * Admin AJAX - Paid Plugin ($) - https://camaleon.website/store/plugins/admin_ajax
92
92
  * **See here for a complete Gemfile**: https://github.com/owen2345/camaleon-cms/blob/master/docs/example_gemfile.rb
93
93
 
94
94
  ## Camaleon CMS has many useful frontend Themes such as:
@@ -96,17 +96,17 @@ http://camaleon.tuzitio.com/store/plugins
96
96
  * Clean Theme (Built in)
97
97
  * Wordpress Theme (Built in)
98
98
  * eCommerce - https://github.com/owen2345/cama-ecommerce-theme
99
- * eFashion - http://camaleon.tuzitio.com/store/themes/eFashion (Github: https://github.com/mazharoddin/camaleon-cms-efashion)
100
- * Shoppy - http://camaleon.tuzitio.com/store/themes/shoppy (Github: https://github.com/mazharoddin/camaleon-cms-shoppy)
101
- * CV - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/cv
102
- * Camaleon Site - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/camaleon_cms
103
- * Sky - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/sky
99
+ * eFashion - https://camaleon.website/store/themes/eFashion (Github: https://github.com/mazharoddin/camaleon-cms-efashion)
100
+ * Shoppy - https://camaleon.website/store/themes/shoppy (Github: https://github.com/mazharoddin/camaleon-cms-shoppy)
101
+ * CV - Paid Theme ($) - https://camaleon.website/store/themes/cv
102
+ * Camaleon Site - Paid Theme ($) - https://camaleon.website/store/themes/camaleon_cms
103
+ * Sky - Paid Theme ($) - https://camaleon.website/store/themes/sky
104
104
 
105
105
 
106
106
  ## Requirements
107
- * Rails 6.0+
107
+ * Rails 6.1+
108
108
  * PostgreSQL, MySQL 5+ or SQlite
109
- * Ruby 2.7+
109
+ * Ruby 3.0+
110
110
  * Imagemagick
111
111
 
112
112
  ## Installation
@@ -160,7 +160,7 @@ http://camaleon.tuzitio.com/store/plugins
160
160
  * Go to your browser and visit http://localhost:3000/
161
161
 
162
162
  ## Sample App / Demonstration
163
- * [Camaleon Server (current version)](http://camaleon.tuzitio.com/plugins/demo_manage/)
163
+ * [Camaleon Server (current version)](https://camaleon.website/plugins/demo_manage/)
164
164
  * [Sample App](https://github.com/brian-kephart/Camaleon-CMS-Sample)
165
165
  * [Deploy Sample App in Heroku](https://heroku.com/deploy?template=https://github.com/brian-kephart/Camaleon-CMS-Sample)
166
166
 
@@ -171,13 +171,13 @@ If you need support, need some extra functionality or need plugins, please conta
171
171
  * Email: owenperedo@gmail.com
172
172
  * Skype: owen-2345
173
173
  * Stack Overflow: Use "camaleon" as tag to ask questions related to this CMS (don't forget to include cms version + rails version).
174
- * Site: http://camaleon.tuzitio.com/
174
+ * Site: https://camaleon.website/
175
175
 
176
176
  ## Author
177
177
  Owen Peredo Diaz
178
178
 
179
179
  ## License
180
- http://camaleon.tuzitio.com/license.html
180
+ https://camaleon.website/license.html
181
181
 
182
182
  ## Testing
183
183
  * Init DB
@@ -199,7 +199,7 @@ bundle exec rspec
199
199
 
200
200
  ## Version History
201
201
 
202
- http://camaleon.tuzitio.com/version-history.html
202
+ https://camaleon.website/version-history.html
203
203
 
204
204
  Previous stable version (v1.x): https://github.com/owen2345/camaleon-cms/tree/version_1x
205
205
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Attack",
3
- "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/2'>here.</a>",
3
+ "descr": "Please check documentation <a href='https://camaleon.website/store/plugins/2'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "attack",
6
6
  "position": 1,
@@ -28,4 +28,4 @@
28
28
  ]
29
29
  //here you can add all your hooks (read documentation)
30
30
  }
31
- }
31
+ }
@@ -8,12 +8,10 @@ module Plugins
8
8
  end
9
9
 
10
10
  def save_settings
11
- current_site.set_meta('front_cache_elements', { paths: ((params[:cache][:paths] || []).delete_if do |a|
12
- !a.present?
13
- end || []),
14
- posts: (params[:cache][:posts] || []),
15
- post_types: (params[:cache][:post_type] || []),
16
- skip_posts: (params[:cache][:skip_posts] || []),
11
+ current_site.set_meta('front_cache_elements', { paths: (params[:cache][:paths] || []).compact_blank || [],
12
+ posts: params[:cache][:posts] || [],
13
+ post_types: params[:cache][:post_type] || [],
14
+ skip_posts: params[:cache][:skip_posts] || [],
17
15
  cache_login: params[:cache][:cache_login],
18
16
  home: params[:cache][:home],
19
17
  preserve_cache_on_restart: params[:cache][:preserve_cache_on_restart],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Front Cache",
3
- "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/3'>here.</a>",
3
+ "descr": "Please check documentation <a href='https://camaleon.website/store/plugins/3'>here.</a>",
4
4
  "version": "0.2",
5
5
  "key": "front_cache",
6
6
  "position": 1,
@@ -5,7 +5,7 @@ en:
5
5
  button:
6
6
  add_new_path: 'Add new path'
7
7
  custom_url_paths: 'Custom url paths'
8
- custom_url_samples: 'Enter paths/urls like /contact or /my_section?p=a&... or /static-pages/(.*) or /test-([0-9]+)/?\?owen=true&var2=([a-z]+) or http://static.mydomain.com/(.*)'
8
+ custom_url_samples: 'Enter paths/urls like /contact or /my_section?p=a&... or /static-pages/(.*) or /test-([0-9]+)/?\?owen=true&var2=([a-z]+) or https://static.mydomain.com/(.*)'
9
9
  clean_cache: 'Clean cache'
10
10
  title: 'Frontend cache pages'
11
11
  home_page: 'Home Page'
@@ -26,8 +26,8 @@ module Plugins
26
26
  if @caches[:paths].include?(request.original_url) || @caches[:paths].include?(request.path_info) || front_cache_plugin_match_path_patterns?(request.original_url, request.path_info) || (params[:action] == 'index' && params[:controller] == 'camaleon_cms/frontend' && @caches[:home].present?) # cache paths and home page
27
27
  @_plugin_do_cache = true
28
28
  elsif params[:action] == 'post' && params[:controller] == 'camaleon_cms/frontend' && !params[:draft_id].present?
29
- begin
30
- post = current_site.the_posts.find_by_slug(params[:slug]).decorate
29
+ if (post = current_site.the_posts.find_by_slug(params[:slug]))
30
+ post = post.decorate
31
31
  if post.can_visit? && post.visibility != 'private'
32
32
  if (@caches[:skip_posts] || []).include?(post.id.to_s)
33
33
  @_plugin_do_cache = false
@@ -35,9 +35,9 @@ module Plugins
35
35
  @_plugin_do_cache = true
36
36
  end
37
37
  end
38
- rescue StandardError # skip post not found
39
38
  end
40
39
  end
40
+
41
41
  response.headers['PLUGIN_FRONT_CACHE'] = 'TRUE' if @_plugin_do_cache
42
42
  end
43
43
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Visibility Posts",
3
- "descr": "Permit to manage the permission of visualization for your contents (Public, Private, Password, Date from visibility). More info: <a target='_blank' href='http://camaleon.tuzitio.com/store/plugins/visibility_posts'>here.</a>",
3
+ "descr": "Permit to manage the permission of visualization for your contents (Public, Private, Password, Date from visibility). More info: <a target='_blank' href='https://camaleon.website/store/plugins/visibility_posts'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "visibility_post",
6
6
  "helpers": [
@@ -21,4 +21,4 @@
21
21
  "post_can_visit": ["plugin_visibility_can_visit"],
22
22
  "list_post_extra_columns": ["plugin_visibility_extra_columns"]
23
23
  }
24
- }
24
+ }
@@ -10,7 +10,7 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/bootstrap.min.js
15
15
  //= require ./modernizr.custom
16
16
  //= require ./magnific.min
@@ -19,7 +19,7 @@
19
19
  <!-- PORTFOLIO ITEM -->
20
20
  <div class="col-lg-4">
21
21
  <a class="zoom green" href="<%= post.the_url %>" title="<%= post.the_title %>" >
22
- <img width="400" height="300" src="<%= post.the_thumb_url("http://gentsthemes.com/demo/stanleywp/wp-content/uploads/sites/5/2014/01/port03.jpg") %>" class="attachment-post-thumbnail wp-post-image" alt="post image" /> </a>
22
+ <img width="400" height="300" src="<%= post.the_thumb_url("https://bootstrapwp.com/wp-content/uploads/edd/2016/01/stanleywp.jpg") %>" class="attachment-post-thumbnail wp-post-image" alt="post image" /> </a>
23
23
 
24
24
  <p><%= post.the_title %></p>
25
25
  </div> <!-- /col -->
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
@@ -10,5 +10,5 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/bootstrap.min
@@ -12,19 +12,19 @@
12
12
  <!-- Wrapper for slides -->
13
13
  <div class="carousel-inner">
14
14
  <div class="item active">
15
- <img src="http://placehold.it/800x400" alt="...">
15
+ <img src="https://placehold.it/800x400" alt="...">
16
16
  <div class="carousel-caption">
17
17
  <h2>Heading</h2>
18
18
  </div>
19
19
  </div>
20
20
  <div class="item">
21
- <img src="http://placehold.it/800x400" alt="...">
21
+ <img src="https://placehold.it/800x400" alt="...">
22
22
  <div class="carousel-caption">
23
23
  <h2>Heading</h2>
24
24
  </div>
25
25
  </div>
26
26
  <div class="item">
27
- <img src="http://placehold.it/800x400" alt="...">
27
+ <img src="https://placehold.it/800x400" alt="...">
28
28
  <div class="carousel-caption">
29
29
  <h2>Heading</h2>
30
30
  </div>
@@ -68,4 +68,4 @@
68
68
  </div>
69
69
 
70
70
  </div>
71
- </section>
71
+ </section>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <ul class="list-inline">
6
6
  <li class="pull-right"><a href="#top">Back to top</a></li>
7
- <li><a href="http://feeds.feedburner.com/bootswatch">RSS</a></li>
7
+ <li><a href="https://feeds.feedburner.com/bootswatch">RSS</a></li>
8
8
  <li><a href="https://twitter.com/bootswatch">Twitter</a></li>
9
9
  <li><a href="https://github.com/thomaspark/bootswatch/">GitHub</a></li>
10
10
  <li><a href="../help/#api">API</a></li>
@@ -14,4 +14,4 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
- </footer>
17
+ </footer>
@@ -1,3 +1,3 @@
1
- //= require jquery
1
+ //= require jquery2
2
2
  //= require camaleon_cms/bootstrap.min
3
- //= require ./jquery.validate
3
+ //= require ./jquery.validate
@@ -10,7 +10,7 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/admin/_data
15
15
  //= require camaleon_cms/bootstrap.min
16
16
  //= require camaleon_cms/admin/_jquery-ui.min
@@ -121,7 +121,7 @@ tinymce.addI18n('de',{
121
121
  "Insert link": "Link einf\u00fcgen",
122
122
  "New window": "Neues Fenster",
123
123
  "None": "Keine",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"https:\/\/\" voranstellen?",
125
125
  "Target": "Ziel",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",
127
127
  "Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
@@ -216,4 +216,4 @@ tinymce.addI18n('de',{
216
216
  "View": "Ansicht",
217
217
  "Table": "Tabelle",
218
218
  "Format": "Format"
219
- });
219
+ });
@@ -91,7 +91,7 @@ tinymce.addI18n('en_GB',{
91
91
  "Insert link": "Insert link",
92
92
  "New window": "New window",
93
93
  "None": "None",
94
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?",
94
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?",
95
95
  "Target": "Target",
96
96
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
97
97
  "Insert\/edit link": "Insert\/edit link",
@@ -176,4 +176,4 @@ tinymce.addI18n('en_GB',{
176
176
  "View": "View",
177
177
  "Table": "Table",
178
178
  "Format": "Format"
179
- });
179
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('fr_FR',{
121
121
  "Insert link": "Ins\u00e9rer un lien",
122
122
  "New window": "Nouvelle fen\u00eatre",
123
123
  "None": "n\/a",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe https:\/\/ n\u00e9cessaire?",
125
125
  "Target": "Cible",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre une adresse e-mail. Voulez-vous ajouter le pr\u00e9fixe mailto: n\u00e9cessaire?",
127
127
  "Insert\/edit link": "Ins\u00e9rer\/modifier un lien",
@@ -216,4 +216,4 @@ tinymce.addI18n('fr_FR',{
216
216
  "View": "Voir",
217
217
  "Table": "Tableau",
218
218
  "Format": "Format"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('it',{
121
121
  "Insert link": "Inserisci il Link",
122
122
  "New window": "Nuova Finestra",
123
123
  "None": "No",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario https:\/\/?",
125
125
  "Target": "Target",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?",
127
127
  "Insert\/edit link": "Inserisci\/Modifica Link",
@@ -216,4 +216,4 @@ tinymce.addI18n('it',{
216
216
  "View": "Visualiza",
217
217
  "Table": "Tabella",
218
218
  "Format": "Formato"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('nl',{
121
121
  "Insert link": "Hyperlink invoegen",
122
122
  "New window": "Nieuw venster",
123
123
  "None": "Geen",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"http:\/\/\" aan toevoegen?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"https:\/\/\" aan toevoegen?",
125
125
  "Target": "Doel",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "De ingegeven URL lijkt op een e-mailadres. Wil je er \"mailto:\" aan toevoegen?",
127
127
  "Insert\/edit link": "Hyperlink invoegen\/bewerken",
@@ -121,7 +121,7 @@ tinymce.addI18n('pt-BR',{
121
121
  "Insert link": "Inserir link",
122
122
  "New window": "Nova janela",
123
123
  "None": "Nenhum",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "A URL que voc\u00ea informou parece ser um link externo. Deseja incluir o prefixo http:\/\/?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "A URL que voc\u00ea informou parece ser um link externo. Deseja incluir o prefixo https:\/\/?",
125
125
  "Target": "Alvo",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
127
127
  "Insert\/edit link": "Inserir\/editar link",
@@ -216,4 +216,4 @@ tinymce.addI18n('pt-BR',{
216
216
  "View": "Visualizar",
217
217
  "Table": "Tabela",
218
218
  "Format": "Formatar"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('ru',{
121
121
  "Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
122
122
  "New window": "\u0412 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",
123
123
  "None": "\u041d\u0435\u0442",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttp:\/\/\u00bb?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttps:\/\/\u00bb?",
125
125
  "Target": "\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abmailto:\u00bb?",
127
127
  "Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
@@ -216,4 +216,4 @@ tinymce.addI18n('ru',{
216
216
  "View": "\u0412\u0438\u0434",
217
217
  "Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u0430",
218
218
  "Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('uk',{
121
121
  "Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
122
122
  "New window": "\u0423 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456",
123
123
  "None": "\u041d\u0456",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 http:\/\/ \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 https:\/\/ \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
125
125
  "Target": "\u0412\u0456\u0434\u043a\u0440\u0438\u0432\u0430\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 mailto: \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
127
127
  "Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438\/\u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
@@ -216,4 +216,4 @@ tinymce.addI18n('uk',{
216
216
  "View": "\u0412\u0438\u0433\u043b\u044f\u0434",
217
217
  "Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u044f",
218
218
  "Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('zh-CN',{
121
121
  "Insert link": "\u63d2\u5165\u94fe\u63a5",
122
122
  "New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00",
123
123
  "None": "\u65e0",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttps:\/\/:\u524d\u7f00\u5417\uff1f",
125
125
  "Target": "\u6253\u5f00\u65b9\u5f0f",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f",
127
127
  "Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",
@@ -476,7 +476,7 @@ window.cama_init_media = function(mediaPanel) {
476
476
  '<div class="alert alert-danger">' +
477
477
  I18n(
478
478
  'msg.cors_error',
479
- 'Please verify the following: <ul><li>If the image exist: %{url_img}</li> <li>Check if cors configuration are defined well, only for external images: S3, cloudfront(if you are using cloudfront).</li></ul><br> More information about CORS: <a href="%{url_blog}" target="_blank">here.</a>', { url_img: data.url, url_blog: 'http://blog.celingest.com/en/2014/10/02/tutorial-using-cors-with-cloudfront-and-s3/' }
479
+ 'Please verify the following: <ul><li>If the image exist: %{url_img}</li> <li>Check if cors configuration are defined well, only for external images: S3, cloudfront(if you are using cloudfront).</li></ul><br> More information about CORS: <a href="%{url_blog}" target="_blank">here.</a>', { url_img: data.url, url_blog: 'https://blog.digitalis.io/how-to-add-cors-to-s3-with-cloudfront-1be59c74abaa' }
480
480
  ) +
481
481
  '</div>'
482
482
  )
@@ -566,7 +566,7 @@ window.cama_media_get_custom_params = function(customSettings) {
566
566
  }
567
567
 
568
568
  $(() =>
569
- // sample: $.fn.upload_url({url: 'http://camaleon.tuzitio.com/media/132/logo2.png', dimension: '120x120', versions: '200x200', folder: 'my_folder', thumb_size: '100x100'})
569
+ // sample: $.fn.upload_url({url: 'https://camaleon.website/media/132/logo2.png', dimension: '120x120', versions: '200x200', folder: 'my_folder', thumb_size: '100x100'})
570
570
  // dimension: default current dimension
571
571
  // folder: default current folder
572
572
  // private: (Boolean) if true => list private files
@@ -3,9 +3,11 @@ module CamaleonCms
3
3
  module Appearances
4
4
  class NavMenusController < CamaleonCms::AdminController
5
5
  include CamaleonCms::Frontend::NavMenuHelper
6
+
6
7
  add_breadcrumb I18n.t('camaleon_cms.admin.sidebar.appearance')
7
8
  add_breadcrumb I18n.t('camaleon_cms.admin.sidebar.menus')
8
9
  before_action :check_menu_permission
10
+
9
11
  def index
10
12
  @nav_menu = if params[:id].present?
11
13
  current_site.nav_menus.find_by_id(params[:id])
@@ -64,7 +66,10 @@ module CamaleonCms
64
66
  # render edit external menu item
65
67
  def edit_menu_item
66
68
  render '_external_menu', layout: false,
67
- locals: { nav_menu: current_site.nav_menus.find(params[:nav_menu_id]), menu_item: current_site.nav_menu_items.find(params[:id]) }
69
+ locals: {
70
+ nav_menu: current_site.nav_menus.find(params[:nav_menu_id]),
71
+ menu_item: current_site.nav_menu_items.find(params[:id])
72
+ }
68
73
  end
69
74
 
70
75
  # update an external menu item
@@ -98,22 +103,22 @@ module CamaleonCms
98
103
  def add_items
99
104
  items = []
100
105
  @nav_menu = current_site.nav_menus.find(params[:nav_menu_id])
101
- if params[:external].present?
102
- item = @nav_menu.append_menu_item(parse_external_menu(params[:external]))
103
- item.set_options(params[:external].require(:options).permit!) if params[:external][:options].present?
104
- items << item
106
+ external_params = params[:external]
107
+ if external_params.present?
108
+ external_item = @nav_menu.append_menu_item(parse_external_menu(external_params))
109
+ external_item.set_options(external_params.require(:options).permit!) if external_params[:options].present?
110
+ items << external_item
105
111
  end
106
112
 
107
113
  if params[:custom_items].present? # custom menu items
108
- params[:custom_items].each do |_index, item|
109
- type = item['kind'].present? ? item['kind'] : 'external'
110
- item = @nav_menu.append_menu_item({ label: item['label'], link: item['url'], type: type })
111
- items << item
114
+ params[:custom_items].each_value do |custom_item|
115
+ type = custom_item['kind'].present? ? custom_item['kind'] : 'external'
116
+ items << @nav_menu.append_menu_item({ label: custom_item['label'], link: custom_item['url'], type: type })
112
117
  end
113
118
  end
114
119
 
115
120
  if params[:items].present?
116
- params[:items].each do |_index, item|
121
+ params[:items].each_value do |item|
117
122
  item = @nav_menu.append_menu_item({ label: 'auto', link: item['id'], type: item['kind'] })
118
123
  items << item
119
124
  end
@@ -27,7 +27,7 @@ module CamaleonCms
27
27
  def welcome; end
28
28
 
29
29
  def installer_verification
30
- redirect_to cama_root_url unless CamaleonCms::Site.count.zero?
30
+ redirect_to cama_root_url unless CamaleonCms::Site.count == 0
31
31
  end
32
32
  end
33
33
  end
@@ -26,7 +26,7 @@ module CamaleonCms
26
26
  flash[:notice] = t('camaleon_cms.admin.settings.message.site_updated')
27
27
  args = { action: :site }
28
28
  args[:host], args[:port] = @site.get_domain.to_s.split(':') if cache_slug != @site.slug
29
- redirect_to(args)
29
+ redirect_to(args, allow_other_host: true)
30
30
  else
31
31
  render 'site'
32
32
  end
@@ -51,7 +51,7 @@ module CamaleonCms
51
51
  # generate captcha image
52
52
  def captcha
53
53
  image = cama_captcha_build(params[:len])
54
- send_data image.to_blob, type: image.mime_type, disposition: 'inline'
54
+ send_data image.to_blob, type: MiniMime.lookup_by_extension(image.type).content_type, disposition: 'inline'
55
55
  end
56
56
 
57
57
  private
@@ -103,7 +103,13 @@ module CamaleonCms
103
103
  def cama_site_check_existence
104
104
  if !current_site.present?
105
105
  if Cama::Site.main_site.present?
106
- redirect_to Cama::Site.main_site.decorate.the_url
106
+ url = Cama::Site.main_site.decorate.the_url
107
+ # TODO: Remove this condition when Rails 6.x won't be supported
108
+ if Rails.gem_version >= Gem::Version.new('7.0.0')
109
+ redirect_to url, allow_other_host: true
110
+ else
111
+ redirect_to url
112
+ end
107
113
  else
108
114
  redirect_to cama_admin_installers_path
109
115
  end
@@ -4,6 +4,14 @@ module CamaleonCms
4
4
  @_deco_locale = nil
5
5
  include CamaleonCms::MetasDecoratorMethods
6
6
 
7
+ def marshal_dump
8
+ @object
9
+ end
10
+
11
+ def marshal_load(obj)
12
+ @object = obj
13
+ end
14
+
7
15
  # return the keywords for this model
8
16
  def the_keywords
9
17
  k = object.get_option('keywords', '')
@@ -21,7 +21,7 @@ module CamaleonCms
21
21
 
22
22
  # return all children categories for the current category (active_record) filtered by permissions + hidden posts + roles + etc...
23
23
  # in return object, you can add custom where's or pagination like here:
24
- # http://edgeguides.rubyonrails.org/active_record_querying.html
24
+ # https://edgeguides.rubyonrails.org/active_record_querying.html
25
25
  def the_categories
26
26
  object.children
27
27
  end