cama_meta_tag 1.4 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +0 -0
  3. data/Rakefile +0 -0
  4. data/app/controllers/plugins/cama_meta_tag/admin_controller.rb +0 -0
  5. data/app/helpers/plugins/cama_meta_tag/main_helper.rb +13 -1
  6. data/app/models/plugins/cama_meta_tag/cama_meta_tag.rb +0 -0
  7. data/app/views/plugins/cama_meta_tag/admin/_meta_tag_fields.html.erb +2 -2
  8. data/app/views/plugins/cama_meta_tag/admin/settings.html.erb +0 -0
  9. data/config/camaleon_plugin.json +5 -1
  10. data/config/initializers/custom_models.rb +0 -0
  11. data/config/locales/en.yml +0 -0
  12. data/config/routes.rb +0 -0
  13. data/lib/cama_meta_tag.rb +0 -0
  14. data/lib/cama_meta_tag/engine.rb +0 -0
  15. data/lib/cama_meta_tag/version.rb +2 -2
  16. data/lib/tasks/cama_meta_tag_tasks.rake +0 -0
  17. data/test/cama_meta_tag_test.rb +0 -0
  18. data/test/dummy/README.rdoc +0 -0
  19. data/test/dummy/Rakefile +0 -0
  20. data/test/dummy/app/assets/javascripts/application.js +0 -0
  21. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  22. data/test/dummy/app/controllers/application_controller.rb +0 -0
  23. data/test/dummy/app/helpers/application_helper.rb +0 -0
  24. data/test/dummy/app/views/layouts/application.html.erb +0 -0
  25. data/test/dummy/config.ru +0 -0
  26. data/test/dummy/config/application.rb +0 -0
  27. data/test/dummy/config/boot.rb +0 -0
  28. data/test/dummy/config/database.yml +0 -0
  29. data/test/dummy/config/environment.rb +0 -0
  30. data/test/dummy/config/environments/development.rb +0 -0
  31. data/test/dummy/config/environments/production.rb +0 -0
  32. data/test/dummy/config/environments/test.rb +0 -0
  33. data/test/dummy/config/initializers/assets.rb +0 -0
  34. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  35. data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
  36. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  37. data/test/dummy/config/initializers/inflections.rb +0 -0
  38. data/test/dummy/config/initializers/mime_types.rb +0 -0
  39. data/test/dummy/config/initializers/session_store.rb +0 -0
  40. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  41. data/test/dummy/config/locales/en.yml +0 -0
  42. data/test/dummy/config/routes.rb +0 -0
  43. data/test/dummy/config/secrets.yml +0 -0
  44. data/test/dummy/public/404.html +0 -0
  45. data/test/dummy/public/422.html +0 -0
  46. data/test/dummy/public/500.html +0 -0
  47. data/test/dummy/public/favicon.ico +0 -0
  48. data/test/integration/navigation_test.rb +0 -0
  49. data/test/test_helper.rb +0 -0
  50. metadata +22 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af1eec13ebb39262ede18d19ba28a1557f3b6b40
4
- data.tar.gz: 4a7e3dea2f036b06fe7ba93abc49ff2bc6bb0bd7
3
+ metadata.gz: 19dc3b83d6953ce13aa7e9576538b98bc3db4f1c
4
+ data.tar.gz: fdc1215987f7af55012bc8becd8fad2b3a2a6040
5
5
  SHA512:
6
- metadata.gz: 8a0917ec0d04af2c56ff05587936bd00b13e4031cb54a0bb012927b3341786bce37c0a581654ad62ccff294c15be888cef9109c98de5566c40830b04e88d5365
7
- data.tar.gz: f4dbb6b4864698d15bd09c7babf7124a0d3c8f26d7025b8790d2e28ba28463b79a135123136112ffb555657765e66d8215a4aba7596aeed7f97a8c04df6df096
6
+ metadata.gz: 1ed68854e29a3e76209422e4d7049efc1393ee845a9c16531b524464b639eba762fac25bdbe677982302aab3778181b5588a79d8366b8e29c99e47ac3e1018a2
7
+ data.tar.gz: 8dcee521f64fc1a8b5a26d688fe1f7384c53ab3c90d14a4a167957477fe9c7cfa6bf56fec177fba8e21cd679d2cfbdabeb9bd899b4345f9c9fab31b59f61267a
File without changes
data/Rakefile CHANGED
File without changes
@@ -13,7 +13,7 @@ module Plugins::CamaMetaTag::MainHelper
13
13
  end
14
14
 
15
15
  def cama_meta_tag_on_seo(args)
16
- if is_page?
16
+ if is_page? || is_category?
17
17
  page = args[:object].present? ? args[:object] : @cama_visited_post
18
18
  tmp = {
19
19
  title: page.get_option('seo_title').to_s.translate,
@@ -54,6 +54,18 @@ module Plugins::CamaMetaTag::MainHelper
54
54
  !post.respond_to?(:manage_seo?)
55
55
  end
56
56
 
57
+ def cama_meta_tag_category_saved(args)
58
+ args[:category].set_multiple_options(params[:options].permit!.to_h)
59
+ end
60
+
61
+ def cama_meta_tag_post_type_form_custom_html(args)
62
+ args[:html] << render(partial: plugin_view('admin/meta_tag_fields', 'cama_meta_tag'), locals: {post: args[:post_type]})
63
+ end
64
+
65
+ def cama_meta_tag_category_form_custom_html(args)
66
+ args[:html] << render(partial: plugin_view('admin/meta_tag_fields', 'cama_meta_tag'), locals: {post: args[:category], post_type: args[:category].post_type})
67
+ end
68
+
57
69
  def cama_meta_tag_post_form_custom_html(args)
58
70
  unless cama_meta_tag_post_is_for_old_version?(args[:post])
59
71
  manage_seo = args[:post].manage_seo?
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  <script type="application/javascript">
33
33
  jQuery(function(){
34
- $("#form-post #options_seo_image").input_upload({label: '', title: '<%= t('.seo_image', default: t('.seo_image', locale: :en)) %>', type: 'image'});
35
- <% if cama_meta_tag_post_is_for_old_version?(post) %> $('#form-post #post_keywords').closest('.form-group').remove(); <% end %>
34
+ $("#options_seo_image").input_upload({label: '', title: '<%= t('.seo_image', default: t('.seo_image', locale: :en)) %>', type: 'image'});
35
+ <% if cama_meta_tag_post_is_for_old_version?(post) %> $('#post_keywords').closest('.form-group').remove(); <% end %>
36
36
  })
37
37
  </script>
@@ -15,7 +15,11 @@
15
15
  "seo": ["cama_meta_tag_on_seo"],
16
16
  "post_form_custom_html": ["cama_meta_tag_post_form_custom_html"],
17
17
  "created_post": ["cama_meta_tag_post_saved"],
18
- "updated_post": ["cama_meta_tag_post_saved"]
18
+ "updated_post": ["cama_meta_tag_post_saved"],
19
+ "category_form": ["cama_meta_tag_category_form_custom_html"],
20
+ "created_category": ["cama_meta_tag_category_saved"],
21
+ "updated_category": ["cama_meta_tag_category_saved"],
22
+ "post_type_settings_form": ["cama_meta_tag_post_type_form_custom_html"]
19
23
  //here you can add all your hooks (read documentation)
20
24
  }
21
25
  }
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module CamaMetaTag
2
- VERSION = "1.4"
3
- end
2
+ VERSION = "1.5"
3
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cama_meta_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: '1.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-03 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -122,40 +122,40 @@ signing_key:
122
122
  specification_version: 4
123
123
  summary: Permit to manage the seo attributes for each page of Camaleon CMS.
124
124
  test_files:
125
- - test/cama_meta_tag_test.rb
125
+ - test/dummy/app/controllers/application_controller.rb
126
+ - test/dummy/app/views/layouts/application.html.erb
126
127
  - test/dummy/app/assets/javascripts/application.js
127
128
  - test/dummy/app/assets/stylesheets/application.css
128
- - test/dummy/app/controllers/application_controller.rb
129
129
  - test/dummy/app/helpers/application_helper.rb
130
- - test/dummy/app/views/layouts/application.html.erb
131
- - test/dummy/bin/bundle
132
- - test/dummy/bin/rails
133
130
  - test/dummy/bin/rake
134
131
  - test/dummy/bin/setup
135
- - test/dummy/config/application.rb
136
- - test/dummy/config/boot.rb
137
- - test/dummy/config/database.yml
138
- - test/dummy/config/environment.rb
139
- - test/dummy/config/environments/development.rb
132
+ - test/dummy/bin/bundle
133
+ - test/dummy/bin/rails
134
+ - test/dummy/config/secrets.yml
135
+ - test/dummy/config/routes.rb
136
+ - test/dummy/config/locales/en.yml
140
137
  - test/dummy/config/environments/production.rb
138
+ - test/dummy/config/environments/development.rb
141
139
  - test/dummy/config/environments/test.rb
142
- - test/dummy/config/initializers/assets.rb
140
+ - test/dummy/config/environment.rb
141
+ - test/dummy/config/application.rb
142
+ - test/dummy/config/database.yml
143
+ - test/dummy/config/boot.rb
143
144
  - test/dummy/config/initializers/backtrace_silencers.rb
144
- - test/dummy/config/initializers/cookies_serializer.rb
145
- - test/dummy/config/initializers/filter_parameter_logging.rb
146
- - test/dummy/config/initializers/inflections.rb
147
145
  - test/dummy/config/initializers/mime_types.rb
146
+ - test/dummy/config/initializers/filter_parameter_logging.rb
148
147
  - test/dummy/config/initializers/session_store.rb
149
148
  - test/dummy/config/initializers/wrap_parameters.rb
150
- - test/dummy/config/locales/en.yml
151
- - test/dummy/config/routes.rb
152
- - test/dummy/config/secrets.yml
149
+ - test/dummy/config/initializers/assets.rb
150
+ - test/dummy/config/initializers/cookies_serializer.rb
151
+ - test/dummy/config/initializers/inflections.rb
153
152
  - test/dummy/config.ru
154
- - test/dummy/public/404.html
153
+ - test/dummy/Rakefile
154
+ - test/dummy/public/favicon.ico
155
155
  - test/dummy/public/422.html
156
156
  - test/dummy/public/500.html
157
- - test/dummy/public/favicon.ico
158
- - test/dummy/Rakefile
157
+ - test/dummy/public/404.html
159
158
  - test/dummy/README.rdoc
159
+ - test/cama_meta_tag_test.rb
160
160
  - test/integration/navigation_test.rb
161
161
  - test/test_helper.rb