camaleon_cms 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 289ef1eabd68fa970c95a6abdb5dfb37908fc788
4
- data.tar.gz: 1e19ff8c9e625de6849d1e54616f49f42238ca48
3
+ metadata.gz: 1d04da9c72bd60007ce6782ea3b4dee7283d482e
4
+ data.tar.gz: b097e968fc8eb8110ad743253adffb5a7c193410
5
5
  SHA512:
6
- metadata.gz: 4a4ef462928c29569278fa1171e97de6c7573818aaaa09975f415948d7a90661de544adf87c697f58fc6c6d3ef70b84750c545e54e6e408d81364ef0c4d1e9ee
7
- data.tar.gz: 25947d06a6e681ea99a988b65d385514dd6f333558658d0802e3a34d913823985356d44c795d91debfe976332397a5f2f748e100ddd4a2295ab92566e74afef8
6
+ metadata.gz: 0e5e8e7c6fbd11ede07e3af21a39513ebb7a8b573a71edced3bfc8275d68afd95b0368ac681b430a0de464f84f57fe9e3296691fb7353ee95b03acbf77aa33fe
7
+ data.tar.gz: 1850c3e2d6ee182f9b57588448333c424dcb60a1a3dde5c63debaf95fd5f42b2e771111584c8b812c0fa80ccceea4cb0e0cf45b7c5fa612792f2e0d5e4a6d435
data/README.md CHANGED
@@ -167,7 +167,8 @@ http://camaleon.tuzitio.com/license.html/
167
167
 
168
168
  ## Coming soon
169
169
  * Documentation and Videos
170
- * Create more basic plugins
170
+ * Create more basic plugins and themes
171
+
171
172
 
172
173
  ## Contributing
173
174
  * Fork it.
@@ -5,7 +5,7 @@
5
5
  <%= raw @post.the_thumb %>
6
6
  </div>
7
7
  <% end %>
8
- <h1 class="entry-title"><%= raw @post.the_title %></h1>
8
+ <h1 class="entry-title"><%= @post.the_title %></h1>
9
9
  </header><!-- .entry-header -->
10
10
  <div class="entry-content">
11
11
  <%= raw @post.the_content %>
@@ -5,7 +5,7 @@
5
5
  <%= raw @post.the_thumb %>
6
6
  </div>
7
7
  <% end %>
8
- <h1 class="entry-title"><%= raw @post.the_title %></h1>
8
+ <h1 class="entry-title"><%= @post.the_title %></h1>
9
9
  </header><!-- .entry-header -->
10
10
  <div class="entry-content">
11
11
  <%= raw @post.the_content %>
@@ -3,7 +3,7 @@
3
3
  <div class="row">
4
4
  <div class="col-md-9 post-view">
5
5
  <article class="post-content">
6
- <h1><%= raw @post.the_title %></h1>
6
+ <h1><%= @post.the_title %></h1>
7
7
  <div class="author">
8
8
  <time datetime=""><%= @post.the_created_at %></time>
9
9
  </div>
@@ -80,10 +80,12 @@ jQuery(function(){
80
80
  * modal_size: "modal-lg", "modal-sm", ""(default as normal "")
81
81
  * callback: function evaluated after modal shown
82
82
  * type: modal color (primary|default|success)
83
+ * zindex: Integer zindex position (default nil)
84
+ * on_submit: Function executed after submit button click (if this is present, enable the submit button beside cancel button)
83
85
  * return modal object
84
86
  */
85
87
  function open_modal(settings){
86
- var def = {title: "", content: null, url: null, show_footer: false, mode: "inline", ajax_params: {}, modal_size: "", type: '', modal_settings:{}, on_submit: null, callback: function(){}}
88
+ var def = {title: "", content: null, url: null, show_footer: false, mode: "inline", ajax_params: {}, zindex: nil, modal_size: "", type: '', modal_settings:{}, on_submit: null, callback: function(){}}
87
89
  settings = $.extend({}, def, settings);
88
90
  var modal = $('<div id="ow_inline_modal" class="modal fade modal-'+settings.type+'">'+
89
91
  '<div class="modal-dialog '+settings.modal_size+'">'+
@@ -103,6 +105,8 @@ function open_modal(settings){
103
105
  if(!$(e["currentTarget"]).attr("data-skip_destroy")) $(e["currentTarget"]).remove();
104
106
  });
105
107
 
108
+ if(settings.zindex) modal.css("z-index", settings.zindex);
109
+
106
110
  // submit button
107
111
  if(settings.on_submit) modal.find(".modal-footer .modal_submit").click(function(){
108
112
  settings.on_submit(modal);
@@ -165,4 +165,7 @@
165
165
  width: 100%;
166
166
  }
167
167
  }
168
- //.introjs-skipbutton{ display: none; }
168
+ //.introjs-skipbutton{ display: none; }
169
+ #modal_elfinder{
170
+ z-index: 99999;
171
+ }
@@ -9,11 +9,23 @@
9
9
  module FrontendConcern extend ActiveSupport::Concern
10
10
  # visiting sitemap.xml
11
11
  def sitemap
12
-
12
+ r = {layout: (params[:format] == "html" ? (self.send :_layout) : false), render: "sitemap"}
13
+ hooks_run("on_render_sitemap", r)
14
+ render r[:render], layout: r[:layout]
13
15
  end
14
16
 
15
17
  # accessing for robots.txt
16
18
  def robots
19
+ r = {layout: false, render: "robots"}
20
+ hooks_run("on_render_robots", r)
21
+ render r[:render], layout: r[:layout]
22
+ end
23
+
24
+ # rss for current site
25
+ def rss
26
+ r = {layout: false, render: "rss"}
27
+ hooks_run("on_render_rss", r)
28
+ render r[:render], layout: r[:layout]
17
29
  end
18
30
 
19
31
  # save comment from a post
@@ -16,17 +16,15 @@ class FrontendController < CamaleonController
16
16
  after_action :after_hooks
17
17
  # rescue_from ActiveRecord::RecordNotFound, with: :page_not_found
18
18
 
19
+ # home page for frontend
19
20
  def index
20
21
  init_seo(current_site)
21
- r = {layout: (self.send :_layout), render: "nil", custom: false}; hooks_run("on_render_index", r)
22
- if r[:custom]
23
- render r[:render], layout: r[:layout]
22
+ if @_site_options[:home_page].present?
23
+ render_post(@_site_options[:home_page].to_i)
24
24
  else
25
- if @_site_options[:home_page].present?
26
- render_post(@_site_options[:home_page].to_i)
27
- else
28
- render "index"
29
- end
25
+ r = {layout: (self.send :_layout), render: "index"}
26
+ hooks_run("on_render_index", r)
27
+ render r[:render], layout: r[:layout]
30
28
  end
31
29
  end
32
30
 
@@ -194,7 +192,7 @@ class FrontendController < CamaleonController
194
192
  page_404 = current_site.posts.find(@_site_options[:error_404]) rescue ""
195
193
  if page_404.present?
196
194
  page_404 = page_404.decorate
197
- redirect_to page_404.the_link
195
+ redirect_to page_404.the_url
198
196
  return
199
197
  end
200
198
  end
@@ -25,36 +25,46 @@ module Frontend::SeoHelper
25
25
  options[:keywords] = I18n.transliterate(is_home? ? current_site.the_option("keywords") : options[:keywords].to_s)
26
26
  options[:url] = request.original_url
27
27
  s = {
28
- :title => options[:title],
29
- :description => options[:description],
30
- :keywords => options[:keywords],
31
- :image => options[:image],
32
- :author => current_site.get_option("seo_author"),
33
- :og => {
34
- :title => options[:title],
35
- :description => options[:description],
36
- :type => 'website',
37
- :url => request.original_url,
38
- :image => options[:image]
39
- },
40
- :twitter => {
41
- :card => 'summary',
42
- :title => options[:title],
43
- :description => options[:description],
44
- :url => request.original_url,
45
- :image => options[:image],
46
- :site => current_site.get_option("twitter_card"),
47
- :creator => current_site.get_option("twitter_card"),
48
- :domain => request.host
49
- },
50
- alternate: { "application/rss+xml"=> rss_url }
51
- }
28
+ title: options[:title],
29
+ description: options[:description],
30
+ keywords: options[:keywords],
31
+ image: options[:image],
32
+ author: current_site.get_option('seo_author'),
33
+ og: {
34
+ title: options[:title],
35
+ description: options[:description],
36
+ type: 'website',
37
+ url: request.original_url,
38
+ image: options[:image]
39
+ },
40
+ twitter: {
41
+ card: 'summary',
42
+ title: options[:title],
43
+ description: options[:description],
44
+ url: request.original_url,
45
+ image: options[:image],
46
+ site: current_site.get_option('twitter_card'),
47
+ creator: current_site.get_option('twitter_card'),
48
+ domain: request.host
49
+ },
50
+ alternate: [
51
+ { type: 'application/rss+xml', href: rss_url }
52
+ ]
53
+ }
52
54
 
53
55
  l = current_site.get_languages
54
- l.each{|_l| s[:alternate][_l] = current_site.the_url(locale: _l) } if l.size > 1
56
+ if l.size > 1
57
+ l.each do |lang|
58
+ s[:alternate] << {
59
+ href: current_site.the_url(locale: lang),
60
+ hreflang: lang
61
+ }
62
+ end
63
+ end
55
64
 
56
65
  # call all hooks for seo
57
- r = {seo_data: s, object: options[:object]}; hooks_run("seo", r)
66
+ r = { seo_data: s, object: options[:object] }
67
+ hooks_run('seo', r)
58
68
  r[:seo_data]
59
69
  end
60
70
  end
@@ -4,7 +4,7 @@
4
4
  <% if @post_type.the_slug == "page" %>
5
5
  <div class="col-md-12 page-view">
6
6
  <article class="post-content">
7
- <h1><%= raw @post.the_title %></h1>
7
+ <h1><%= @post.the_title %></h1>
8
8
  <div class="item-content">
9
9
  <%= raw @post.the_content %>
10
10
  </div>
@@ -4,7 +4,7 @@
4
4
  </li>
5
5
  <% current_site.post_types.decorate.each do |ptype| %>
6
6
  <li>
7
- <h3><a href="<%= ptype.the_title %>"><%= ptype.the_title %></a></h3>
7
+ <h3><a href="<%= ptype.the_url %>"><%= ptype.the_title %></a></h3>
8
8
  <% if ptype.manage_categories? %>
9
9
  <%= raw(cama_sitemap_cats_generator(ptype.the_categories)) %>
10
10
  <% else %>
@@ -23,7 +23,7 @@ Rails.application.routes.draw do
23
23
  # sitemap
24
24
  get "sitemap" => :sitemap, as: :sitemap, defaults: { format: :xml }
25
25
  get "robots" => :robots, as: :robots, defaults: { format: :txt }
26
- get "rss" =>:index, defaults: { format: "rss" }
26
+ get "rss", defaults: { format: "rss" }
27
27
  get "ajax"
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module CamaleonCms
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -9,7 +9,7 @@ module CamaleonCms
9
9
 
10
10
  def create_initializer_file
11
11
 
12
- plugin_dir = Rails.root.join("plugins", get_plugin_name).to_s
12
+ plugin_dir = Rails.root.join("apps", get_plugin_name).to_s
13
13
  plugin_app = File.join($camaleon_engine_dir, "lib", "generators", "camaleon_cms", "gem_plugin_#{get_plugin_name}")
14
14
  FileUtils.rm_r(plugin_app) if Dir.exist?(plugin_app)
15
15
 
@@ -19,16 +19,4 @@ class PluginRoutes
19
19
  dir.pop
20
20
  dir.join("/")+ '/app/apps'
21
21
  end
22
-
23
- # check if a gem is available or not
24
- # Arguemnts:
25
- # name: name of the gem
26
- # return (Boolean) true/false
27
- def self.get_gem(name)
28
- Gem::Specification.find_by_name(name)
29
- rescue Gem::LoadError
30
- false
31
- rescue
32
- Gem.available?(name)
33
- end
34
22
  end
@@ -291,7 +291,7 @@ class PluginRoutes
291
291
  if File.exist?(config)
292
292
  p = JSON.parse(File.read(config))
293
293
  p = p.with_indifferent_access rescue p
294
- p["key"] = gem.name
294
+ p["key"] = gem.name if p["key"].nil?
295
295
  p["path"] = path
296
296
  p["kind"] = "plugin"
297
297
  p["gem_mode"] = true
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: 1.0.5
4
+ version: 1.0.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: 2015-10-06 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack-page_caching
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: meta-tags
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '2.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '2.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: mini_magick
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -763,7 +763,6 @@ files:
763
763
  - app/views/default_theme/custom_fields/users.html.erb
764
764
  - app/views/default_theme/custom_fields/video.html.erb
765
765
  - app/views/default_theme/index.html.erb
766
- - app/views/default_theme/index.rss.builder
767
766
  - app/views/default_theme/layouts/_footer.html.erb
768
767
  - app/views/default_theme/layouts/_header.html.erb
769
768
  - app/views/default_theme/layouts/index.html.erb
@@ -783,6 +782,7 @@ files:
783
782
  - app/views/default_theme/post_type.rss.builder
784
783
  - app/views/default_theme/profile.html.erb
785
784
  - app/views/default_theme/robots.text.erb
785
+ - app/views/default_theme/rss.rss.builder
786
786
  - app/views/default_theme/search.html.erb
787
787
  - app/views/default_theme/single.html.erb
788
788
  - app/views/default_theme/single.rss.builder