camaleon_cms 2.2.1 → 2.3.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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -3
  3. data/app/apps/plugins/attack/admin_controller.rb +1 -9
  4. data/app/apps/plugins/attack/attack_helper.rb +1 -9
  5. data/app/apps/plugins/attack/config/custom_models.rb +1 -1
  6. data/app/apps/plugins/attack/models/attack.rb +1 -10
  7. data/app/apps/plugins/authoring_post/authoring_post_helper.rb +51 -0
  8. data/app/apps/plugins/authoring_post/config/config.json +24 -0
  9. data/app/apps/plugins/front_cache/admin_controller.rb +0 -8
  10. data/app/apps/plugins/front_cache/config/initializer.rb +1 -1
  11. data/app/apps/plugins/front_cache/front_cache_helper.rb +0 -8
  12. data/app/apps/plugins/visibility_post/visibility_post_helper.rb +1 -9
  13. data/app/apps/themes/camaleon_first/main_helper.rb +1 -9
  14. data/app/apps/themes/default/default_helper.rb +1 -9
  15. data/app/apps/themes/default/views/partials/_forms.html.erb +1 -1
  16. data/app/apps/themes/new/custom_helper.rb +1 -9
  17. data/app/assets/javascripts/camaleon_cms/admin/_custom_fields.js +3 -3
  18. data/app/controllers/camaleon_cms/admin/appearances/nav_menus_controller.rb +2 -10
  19. data/app/controllers/camaleon_cms/admin/appearances/themes_controller.rb +0 -8
  20. data/app/controllers/camaleon_cms/admin/appearances/widgets/assign_controller.rb +1 -9
  21. data/app/controllers/camaleon_cms/admin/appearances/widgets/main_controller.rb +2 -10
  22. data/app/controllers/camaleon_cms/admin/appearances/widgets/sidebar_controller.rb +2 -10
  23. data/app/controllers/camaleon_cms/admin/categories_controller.rb +2 -12
  24. data/app/controllers/camaleon_cms/admin/comments_controller.rb +0 -8
  25. data/app/controllers/camaleon_cms/admin/installers_controller.rb +1 -9
  26. data/app/controllers/camaleon_cms/admin/media_controller.rb +2 -10
  27. data/app/controllers/camaleon_cms/admin/plugins_controller.rb +0 -8
  28. data/app/controllers/camaleon_cms/admin/post_tags_controller.rb +2 -12
  29. data/app/controllers/camaleon_cms/admin/posts/drafts_controller.rb +2 -10
  30. data/app/controllers/camaleon_cms/admin/posts_controller.rb +7 -15
  31. data/app/controllers/camaleon_cms/admin/sessions_controller.rb +2 -10
  32. data/app/controllers/camaleon_cms/admin/settings/custom_fields_controller.rb +5 -12
  33. data/app/controllers/camaleon_cms/admin/settings/post_types_controller.rb +1 -9
  34. data/app/controllers/camaleon_cms/admin/settings/sites_controller.rb +2 -10
  35. data/app/controllers/camaleon_cms/admin/settings_controller.rb +1 -9
  36. data/app/controllers/camaleon_cms/admin/user_roles_controller.rb +2 -10
  37. data/app/controllers/camaleon_cms/admin/users_controller.rb +3 -11
  38. data/app/controllers/camaleon_cms/admin_controller.rb +0 -8
  39. data/app/controllers/camaleon_cms/apps/plugins_admin_controller.rb +0 -8
  40. data/app/controllers/camaleon_cms/apps/plugins_front_controller.rb +0 -8
  41. data/app/controllers/camaleon_cms/apps/themes_admin_controller.rb +0 -8
  42. data/app/controllers/camaleon_cms/apps/themes_front_controller.rb +0 -8
  43. data/app/controllers/camaleon_cms/camaleon_controller.rb +0 -8
  44. data/app/controllers/camaleon_cms/frontend_controller.rb +17 -27
  45. data/app/controllers/concerns/camaleon_cms/frontend_concern.rb +2 -10
  46. data/app/decorators/camaleon_cms/application_decorator.rb +1 -9
  47. data/app/decorators/camaleon_cms/category_decorator.rb +0 -8
  48. data/app/decorators/camaleon_cms/custom_field_decorator.rb +0 -8
  49. data/app/decorators/camaleon_cms/custom_fields_concern.rb +1 -9
  50. data/app/decorators/camaleon_cms/metas_decorator_methods.rb +1 -9
  51. data/app/decorators/camaleon_cms/nav_menu_item_decorator.rb +0 -8
  52. data/app/decorators/camaleon_cms/plugin_decorator.rb +0 -8
  53. data/app/decorators/camaleon_cms/post_comment_decorator.rb +0 -8
  54. data/app/decorators/camaleon_cms/post_decorator.rb +0 -8
  55. data/app/decorators/camaleon_cms/post_tag_decorator.rb +0 -8
  56. data/app/decorators/camaleon_cms/post_type_decorator.rb +0 -8
  57. data/app/decorators/camaleon_cms/site_decorator.rb +0 -8
  58. data/app/decorators/camaleon_cms/term_taxonomy_decorator.rb +0 -8
  59. data/app/decorators/camaleon_cms/theme_decorator.rb +0 -8
  60. data/app/decorators/camaleon_cms/user_decorator.rb +0 -8
  61. data/app/decorators/camaleon_cms/widget_decorator.rb +0 -8
  62. data/app/helpers/camaleon_cms/admin/application_helper.rb +1 -9
  63. data/app/helpers/camaleon_cms/admin/breadcrumb_helper.rb +1 -9
  64. data/app/helpers/camaleon_cms/admin/category_helper.rb +1 -9
  65. data/app/helpers/camaleon_cms/admin/custom_fields_helper.rb +1 -9
  66. data/app/helpers/camaleon_cms/admin/menus_helper.rb +0 -8
  67. data/app/helpers/camaleon_cms/admin/post_type_helper.rb +1 -9
  68. data/app/helpers/camaleon_cms/camaleon_helper.rb +0 -8
  69. data/app/helpers/camaleon_cms/captcha_helper.rb +0 -8
  70. data/app/helpers/camaleon_cms/comment_helper.rb +1 -1
  71. data/app/helpers/camaleon_cms/content_helper.rb +1 -9
  72. data/app/helpers/camaleon_cms/frontend/application_helper.rb +0 -8
  73. data/app/helpers/camaleon_cms/frontend/nav_menu_helper.rb +0 -8
  74. data/app/helpers/camaleon_cms/frontend/seo_helper.rb +0 -8
  75. data/app/helpers/camaleon_cms/frontend/site_helper.rb +0 -8
  76. data/app/helpers/camaleon_cms/hooks_helper.rb +0 -8
  77. data/app/helpers/camaleon_cms/html_helper.rb +0 -8
  78. data/app/helpers/camaleon_cms/plugins_helper.rb +12 -16
  79. data/app/helpers/camaleon_cms/session_helper.rb +0 -8
  80. data/app/helpers/camaleon_cms/short_code_helper.rb +0 -8
  81. data/app/helpers/camaleon_cms/site_helper.rb +0 -8
  82. data/app/helpers/camaleon_cms/theme_helper.rb +0 -8
  83. data/app/helpers/camaleon_cms/uploader_helper.rb +0 -8
  84. data/app/helpers/camaleon_cms/user_roles_helper.rb +1 -9
  85. data/app/mailers/camaleon_cms/html_mailer.rb +0 -8
  86. data/app/models/camaleon_cms/ability.rb +6 -8
  87. data/app/models/camaleon_cms/category.rb +0 -8
  88. data/app/models/camaleon_cms/custom_field.rb +1 -9
  89. data/app/models/camaleon_cms/custom_field_group.rb +0 -8
  90. data/app/models/camaleon_cms/custom_fields_relationship.rb +1 -9
  91. data/app/models/camaleon_cms/meta.rb +1 -9
  92. data/app/models/camaleon_cms/nav_menu.rb +0 -8
  93. data/app/models/camaleon_cms/nav_menu_item.rb +1 -9
  94. data/app/models/camaleon_cms/plugin.rb +0 -8
  95. data/app/models/camaleon_cms/post.rb +1 -9
  96. data/app/models/camaleon_cms/post_comment.rb +1 -10
  97. data/app/models/camaleon_cms/post_default.rb +6 -14
  98. data/app/models/camaleon_cms/post_relationship.rb +1 -9
  99. data/app/models/camaleon_cms/post_tag.rb +0 -8
  100. data/app/models/camaleon_cms/post_type.rb +1 -9
  101. data/app/models/camaleon_cms/site.rb +2 -10
  102. data/app/models/camaleon_cms/term_relationship.rb +0 -9
  103. data/app/models/camaleon_cms/term_taxonomy.rb +3 -11
  104. data/app/models/camaleon_cms/theme.rb +0 -8
  105. data/app/models/camaleon_cms/user.rb +3 -13
  106. data/app/models/camaleon_cms/user_relationship.rb +1 -9
  107. data/app/models/camaleon_cms/user_role.rb +0 -8
  108. data/app/models/camaleon_cms/widget.rb +1 -9
  109. data/app/models/camaleon_cms/widget/assigned.rb +1 -9
  110. data/app/models/camaleon_cms/widget/main.rb +1 -9
  111. data/app/models/camaleon_cms/widget/sidebar.rb +0 -8
  112. data/app/models/concerns/camaleon_cms/categories_tags_for_posts.rb +1 -9
  113. data/app/models/concerns/camaleon_cms/custom_fields_read.rb +2 -10
  114. data/app/models/concerns/camaleon_cms/metas.rb +6 -14
  115. data/app/models/plugins.rb +0 -8
  116. data/app/models/themes.rb +0 -8
  117. data/app/uploaders/camaleon_cms_aws_uploader.rb +1 -1
  118. data/app/uploaders/camaleon_cms_local_uploader.rb +2 -2
  119. data/app/uploaders/camaleon_cms_uploader.rb +1 -1
  120. data/app/views/camaleon_cms/admin/posts/form.html.erb +1 -1
  121. data/app/views/camaleon_cms/admin/sessions/forgot.html.erb +1 -1
  122. data/app/views/camaleon_cms/admin/sessions/login.html.erb +1 -1
  123. data/app/views/camaleon_cms/admin/sessions/register.html.erb +1 -1
  124. data/app/views/camaleon_cms/admin/users/form.html.erb +1 -1
  125. data/app/views/camaleon_cms/default_theme/partials/_forms.html.erb +1 -1
  126. data/app/views/layouts/camaleon_cms/admin.html.erb +1 -1
  127. data/app/views/layouts/camaleon_cms/admin/_ajax.html.erb +1 -1
  128. data/config/initializers/action_view.rb +33 -17
  129. data/config/initializers/active_record_extension.rb +0 -8
  130. data/config/initializers/assets.rb +2 -9
  131. data/config/initializers/custom_initializers.rb +0 -8
  132. data/config/locales/camaleon_cms/admin/en.yml +12 -12
  133. data/db/migrate/20150611161134_post_table_into_utf8.rb +22 -14
  134. data/db/migrate/20151212095328_add_confirm_token_to_users.rb +3 -3
  135. data/db/migrate/20160504155653_move_first_name_of_users.rb +3 -3
  136. data/lib/camaleon_cms/engine.rb +1 -2
  137. data/lib/camaleon_cms/version.rb +1 -1
  138. data/lib/plugin_routes.rb +1 -2
  139. metadata +4 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f2311c64b5733734063aa36f0a49753b2ebb008
4
- data.tar.gz: a9a8eb3e3530e87c5fd03a653a860cd3771a4b15
3
+ metadata.gz: aea3fc38c77542245b78e190c1fc36c308d93ac9
4
+ data.tar.gz: 4e853421eb68c3785366a6c7ea79e4d4861b0a0b
5
5
  SHA512:
6
- metadata.gz: 9672abfcdc463517922a76860e6fcf66c3b4680c14cbf2a31d05933176e84492a4f8d9ec0eec490c8a404743d3f2d39304b94f3c9f21402022990eda8ec2d40f
7
- data.tar.gz: 0e4eb6d9a7895116cbdae3f2678ae4b19ef8689fbf1208f24398a70e369b88069860d5485b7d0eccb5ff8b555003d6e463dc55be8033ca60a2b957757c03535b
6
+ metadata.gz: c1da62e588391c9d34a686b96a6540f2948f2cb1c18149a104166fd34f9252b828a16c810f3ed1ae827dbee6979334ad60c579ec3434d11f8485a492ece3bb42
7
+ data.tar.gz: 2b3bb4960bfb772e8568ce4737a04c7db629932a6e5099057d7b0139a47ca53531c4ed0117f24290826ca038f9102e273d80c594dea57c4a50917a5616f454e1
data/README.md CHANGED
@@ -28,9 +28,21 @@
28
28
  * Add the gem in your Gemfile
29
29
 
30
30
  ```
31
- gem "camaleon_cms", '>=2.2.1' # Stable versions 2.1.2.0, 2.1.1.4, 2.1.1, 2.1.0
31
+ gem "camaleon_cms", '>=2.3.0' # Stable versions 2.2.1, 2.1.2.0, 2.1.1.4, 2.1.1, 2.1.0
32
32
  # gem "camaleon_cms", github: 'owen2345/camaleon-cms' # current development version
33
33
  ```
34
+ * Only Rails 5 support
35
+
36
+ Add in your Gemfile
37
+ ```
38
+ gem 'activemodel-serializers-xml', git: 'https://github.com/rails/activemodel-serializers-xml'
39
+ ```
40
+ Create a file "lib/rails/test_unit/sub_test_task.rb" in your project (draper patch)
41
+ ```
42
+ class Rails::SubTestTask < Rake::TestTask
43
+ end
44
+ ```
45
+
34
46
  * Install required Gem and dependencies
35
47
 
36
48
  ```
@@ -53,6 +65,7 @@
53
65
  ```
54
66
  Previous stable version (1x): https://github.com/owen2345/camaleon-cms/tree/version_1x
55
67
 
68
+
56
69
  # Camaleon CMS (It adapts to your needs)
57
70
 
58
71
  Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails 4 and Ruby 1.9.3+. This CMS is an alternative to wordpress for Ruby on Rails developers to manage advanced contents easily.
@@ -132,7 +145,7 @@ If you need support, need some extra functionality or need plugins, please conta
132
145
  Owen Peredo Diaz
133
146
 
134
147
  ## License
135
- http://camaleon.tuzitio.com/license.html/
148
+ http://camaleon.tuzitio.com/license.html
136
149
 
137
150
  ## Coming soon
138
151
  * Documentation and Videos
@@ -207,4 +220,4 @@ See more here: http://camaleon.tuzitio.com/version-history.html
207
220
 
208
221
  ```
209
222
  rake camaleon_cms:rspec
210
- ```
223
+ ```
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class Plugins::Attack::AdminController < CamaleonCms::Apps::PluginsAdminController
10
2
  def settings
11
3
  @attack = current_site.get_meta("attack_config")
@@ -22,4 +14,4 @@ class Plugins::Attack::AdminController < CamaleonCms::Apps::PluginsAdminControll
22
14
  redirect_to action: :settings
23
15
  end
24
16
 
25
- end
17
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Plugins::Attack::AttackHelper
10
2
 
11
3
  # here all actions on plugin destroying
@@ -98,4 +90,4 @@ module Plugins::Attack::AttackHelper
98
90
  def attack_plugin_options(arg)
99
91
  arg[:links] << link_to(t('plugin.attack.settings'), admin_plugins_attack_settings_path)
100
92
  end
101
- end
93
+ end
@@ -3,4 +3,4 @@ Rails.application.config.to_prepare do
3
3
  CamaleonCms::Site.class_eval do
4
4
  has_many :attack, class_name: "Plugins::Attack::Models::Attack"
5
5
  end
6
- end
6
+ end
@@ -1,12 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class Plugins::Attack::Models::Attack < ActiveRecord::Base
10
- attr_accessible :path, :browser_key
11
2
  belongs_to :site
12
- end
3
+ end
@@ -0,0 +1,51 @@
1
+ module Plugins::AuthoringPost::AuthoringPostHelper
2
+
3
+ def plugin_authoring_post_the_content(args)
4
+ end
5
+
6
+ def plugin_authoring_on_active(plugin)
7
+ end
8
+
9
+ def plugin_authoring_on_inactive(plugin)
10
+ end
11
+
12
+ def plugin_authoring_post_list(args)
13
+ end
14
+
15
+ def plugin_authoring_create_post(args)
16
+ end
17
+
18
+ def plugin_authoring_new_post(args)
19
+ args[:extra_settings] << plugin_authoring_form_html(args[:post])
20
+ end
21
+
22
+ def plugin_authoring_can_visit(args)
23
+ end
24
+
25
+ def plugin_authoring_extra_columns(args)
26
+ end
27
+
28
+ def plugin_authoring_filter_post(args)
29
+ end
30
+
31
+ private
32
+
33
+ def plugin_authoring_form_html(post)
34
+ "
35
+ <div class='form-group'>
36
+ <label class='control-label'>#{t('camaleon_cms.admin.table.author')}</label>
37
+ <select id='post_user_id' #{can?(:edit_other, post.post_type) && (can?(:edit_publish, post.post_type) || !post.published?) ? '' : 'disabled'} name='post[user_id]' class='form-control select valid' aria-invalid='false'>#{plugin_authoring_authors_list(post)}</select>
38
+ </div>
39
+ "
40
+ end
41
+
42
+ def plugin_authoring_authors_list(post)
43
+ author_id = post.new_record? ? current_user.id : post.author.id
44
+ ret = ''
45
+ current_site.users.unscoped.where('role <> ?', 'client').order(:username).each do |user|
46
+ ret += "<option value='#{user.id}' #{user.id.eql?(author_id) ? 'selected' : ''}>#{user.username.titleize}#{user.fullname.eql?(user.username.titleize) ? '' : ' (' + user.fullname + ')' }</option>"
47
+ end
48
+ ret
49
+ end
50
+
51
+ end
@@ -0,0 +1,24 @@
1
+ {
2
+ "title": "Authoring Posts",
3
+ "descr": "Permit to change post author</a>",
4
+ "version": "0.1",
5
+ "key": "authoring_post",
6
+ "helpers": [
7
+ "Plugins::AuthoringPost::AuthoringPostHelper"
8
+ ],
9
+ "options": [
10
+ ],
11
+ "hooks": {
12
+ "on_active": ["plugin_authoring_on_active"],
13
+ "on_inactive": ["plugin_authoring_on_inactive"],
14
+ "list_post": ["plugin_authoring_post_list"],
15
+ "new_post":["plugin_authoring_new_post"],
16
+ "edit_post":["plugin_authoring_new_post"],
17
+ "created_post":["plugin_authoring_create_post"],
18
+ "updated_post":["plugin_authoring_create_post"],
19
+ "post_the_content": ["plugin_authoring_post_the_content"],
20
+ "filter_post": ["plugin_authoring_filter_post"],
21
+ "post_can_visit": ["plugin_authoring_can_visit"],
22
+ "list_post_extra_columns": ["plugin_authoring_extra_columns"]
23
+ }
24
+ }
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class Plugins::FrontCache::AdminController < CamaleonCms::Apps::PluginsAdminController
10
2
  include Plugins::FrontCache::FrontCacheHelper
11
3
  def settings
@@ -2,4 +2,4 @@ if(CamaleonCms::Site.any? rescue false)
2
2
  CamaleonCms::Site.all.each do |site|
3
3
  site.set_option("refresh_cache", true)
4
4
  end
5
- end
5
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Plugins::FrontCache::FrontCacheHelper
10
2
 
11
3
  # save as cache all pages configured on settings of this plugin for public users
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Plugins::VisibilityPost::VisibilityPostHelper
10
2
  def plugin_visibility_post_the_content(args) #{content: object.content.translate(@_deco_locale), post: object}
11
3
  if args[:post].visibility == "password"
@@ -129,4 +121,4 @@ module Plugins::VisibilityPost::VisibilityPostHelper
129
121
  res.join("")
130
122
  end
131
123
 
132
- end
124
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Themes::CamaleonFirst::MainHelper
10
2
  def self.included(klass)
11
3
  klass.helper_method [:camaleon_first_list_select] rescue "" # here your methods accessible from views
@@ -38,4 +30,4 @@ module Themes::CamaleonFirst::MainHelper
38
30
  def camaleon_first_on_uninstall_theme(theme)
39
31
  theme.destroy
40
32
  end
41
- end
33
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Themes::Default::DefaultHelper
10
2
  def self.included(klass)
11
3
  klass.helper_method [:get_taxonomy] rescue ""
@@ -33,4 +25,4 @@ module Themes::Default::DefaultHelper
33
25
  theme.add_field({"name"=>"Footer message", "slug"=>"footer"},{field_key: "editor", default_value: 'Copyright &copy; 2015 - Camaleon CMS. All rights reservated.'})
34
26
  end
35
27
 
36
- end
28
+ end
@@ -10,7 +10,7 @@
10
10
  <%= hidden_field_tag "post_id", post_id %>
11
11
 
12
12
  <div class="row">
13
- <%= render :partial => "/camaleon_cms/flash_messages", locals: @validation %>
13
+ <%= render :partial => "camaleon_cms/flash_messages", locals: @validation %>
14
14
  </div>
15
15
  <%= raw form_element_object(@form.id, options, post_id) %>
16
16
 
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Themes::New::CustomHelper
10
2
 
11
3
  def theme_custom_settings(theme)
@@ -36,4 +28,4 @@ module Themes::New::CustomHelper
36
28
  theme.get_field_groups().destroy_all
37
29
  theme.destroy
38
30
  end
39
- end
31
+ end
@@ -217,9 +217,9 @@ function load_upload_private_file_field(thiss) {
217
217
  function load_upload_image_field($input) {
218
218
  $.fn.upload_filemanager({
219
219
  formats: "image",
220
- dimension: $input.attr("data-dimension"),
221
- versions: $input.attr("data-versions"),
222
- thumb_size: $input.attr("data-thumb_size"),
220
+ dimension: $input.attr("data-dimension") || '',
221
+ versions: $input.attr("data-versions") || '',
222
+ thumb_size: $input.attr("data-thumb_size") || '',
223
223
  selected: function (file, response) {
224
224
  $input.val(file.url);
225
225
  }
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class CamaleonCms::Admin::Appearances::NavMenusController < CamaleonCms::AdminController
10
2
  add_breadcrumb I18n.t("camaleon_cms.admin.sidebar.appearance")
11
3
  add_breadcrumb I18n.t("camaleon_cms.admin.sidebar.menus")
@@ -29,7 +21,7 @@ class CamaleonCms::Admin::Appearances::NavMenusController < CamaleonCms::AdminCo
29
21
  end
30
22
 
31
23
  def create
32
- nav_menu = current_site.nav_menus.new(params[:nav_menu])
24
+ nav_menu = current_site.nav_menus.new(params.require(:nav_menu).permit!)
33
25
  nav_menu.save
34
26
  flash[:notice] = t('.created_menu', default: 'Created Menu')
35
27
  redirect_to action: :index, id: nav_menu.id
@@ -37,7 +29,7 @@ class CamaleonCms::Admin::Appearances::NavMenusController < CamaleonCms::AdminCo
37
29
 
38
30
  def update
39
31
  nav_menu = current_site.nav_menus.find(params[:id])
40
- nav_menu.update(params[:nav_menu])
32
+ nav_menu.update(params.require(:nav_menu).permit!)
41
33
  flash[:notice] = t('.updated_menu', default: 'Menu updated')
42
34
  redirect_to action: :index, id: nav_menu.id
43
35
  end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class CamaleonCms::Admin::Appearances::ThemesController < CamaleonCms::AdminController
10
2
  # list themes or update a theme status
11
3
  add_breadcrumb I18n.t("camaleon_cms.admin.sidebar.appearance")
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class CamaleonCms::Admin::Appearances::Widgets::AssignController < CamaleonCms::AdminController
10
2
  before_action :check_permission_role
11
3
  before_action :find_sidebar
@@ -18,7 +10,7 @@ class CamaleonCms::Admin::Appearances::Widgets::AssignController < CamaleonCms::
18
10
  end
19
11
 
20
12
  def update
21
- if @assigned.update(params[:assign])
13
+ if @assigned.update(params.require(:assign).permit!)
22
14
  @assigned.set_field_values(params[:field_options])
23
15
  flash[:notice] = t('camaleon_cms.admin.widgets.assign.updated')
24
16
  else
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class CamaleonCms::Admin::Appearances::Widgets::MainController < CamaleonCms::AdminController
10
2
  before_action :check_permission_role
11
3
  before_action :set_widgets, only: [:edit, :update, :destroy]
@@ -27,7 +19,7 @@ class CamaleonCms::Admin::Appearances::Widgets::MainController < CamaleonCms::Ad
27
19
 
28
20
  def create
29
21
  params[:widget_main][:status] = "simple"
30
- @widget = current_site.widgets.new(params[:widget_main])
22
+ @widget = current_site.widgets.new(params.require(:widget_main).permit!)
31
23
  if @widget.save!
32
24
  flash[:notice] = t('camaleon_cms.admin.widgets.message.created')
33
25
  else
@@ -37,7 +29,7 @@ class CamaleonCms::Admin::Appearances::Widgets::MainController < CamaleonCms::Ad
37
29
  end
38
30
 
39
31
  def update
40
- if @widget.update!(params[:widget_main])
32
+ if @widget.update!(params.require(:widget_main).permit!)
41
33
  flash[:notice] = t('camaleon_cms.admin.widgets.message.updated')
42
34
  else
43
35
  flash[:error] = t('camaleon_cms.admin.widgets.message.error_updated')
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  class CamaleonCms::Admin::Appearances::Widgets::SidebarController < CamaleonCms::AdminController
10
2
  before_action :check_permission_role
11
3
  before_action :set_sidebar, only: [:edit, :update, :destroy]
@@ -16,7 +8,7 @@ class CamaleonCms::Admin::Appearances::Widgets::SidebarController < CamaleonCms:
16
8
  end
17
9
 
18
10
  def create
19
- @sidebar = current_site.sidebars.new(params[:widget_sidebar])
11
+ @sidebar = current_site.sidebars.new(params.require(:widget_sidebar).permit!)
20
12
  if @sidebar.save
21
13
  flash[:notice] = t('camaleon_cms.admin.widgets.sidebar.created')
22
14
  else
@@ -30,7 +22,7 @@ class CamaleonCms::Admin::Appearances::Widgets::SidebarController < CamaleonCms:
30
22
  end
31
23
 
32
24
  def update
33
- if @sidebar.update(params[:widget_sidebar])
25
+ if @sidebar.update(params.require(:widget_sidebar).permit!)
34
26
  flash[:notice] = t('camaleon_cms.admin.widgets.sidebar.updated')
35
27
  else
36
28
  flash[:error] = t('camaleon_cms.admin.widgets.sidebar.error_updated')