caboose-cms 0.4.9 → 0.4.10

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjBlNDA1YjA0NzA2NDcwNzVkYWQ5MTk4YTc2NWUwMzYwNTg5ZmRjMQ==
4
+ M2IxZWJkYTM0YWRiZjg3YjRkMGY1YzY0Y2Q3ZGQ1NzRjMzg1NWQ0ZA==
5
5
  data.tar.gz: !binary |-
6
- ODhlMThhNThmODdhZWJkOWEzNDY5ZmE1MDFkOTNkYzU0ZWY2MmJmZA==
6
+ ZTQwNDc1OTNhZDM0MDc0Y2JhM2NjYjQzOTEzNDUxOThmOGI0NjQyMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTI0Y2UxYTRiMzVlMjAzMzJhMWY1NDRhZWFjM2RlZjk4ZWI2ODllZDgwMzNi
10
- Y2M4YTljNjE4OGUwMjk4YTIwNTBlZTFjZGUxMjhhNGFlZGQ1ZmMzZTNlMTVh
11
- ODdhMTIwZTdlOWI3NTJkYWMyN2IzMWFiZWE5NzdjYzE5NDFhYmI=
9
+ YzlkM2I4ZjZhY2FhZGZmOGRkNjdlMDgxNjBmYjA2MDc2NzE0YWQyYmExZTc5
10
+ MGVmN2M5MDA3OTU4OTAxM2RlYTBlNmRjMTBjOWNkYTY0ODViMTk5N2NiMDBh
11
+ NGZmZTdiZDlmYjA0MTViZWZhMmRhODAxYjQxOGY3NmM4ZjljOGY=
12
12
  data.tar.gz: !binary |-
13
- N2I1MTRhMGMzZjM3NDVmOTcwN2I0NDEzZDRjZDJjZmQyMzEwMWUwNjg4NTMx
14
- NTBjMDgyYTYzYzExYWQ3OWNhY2JiNmVjYmMxNGNjMzk4ZGU3ZTc4NGE4NjZk
15
- MjE3YTUyZDU1ZWJjZGE1MTMzMWExOGViMzJmMDliN2I1OThlNDg=
13
+ YzY2NGY2YzkzMTVkMmExYWM0ODc0YjAzZjYwNmY4ODkxNTc0MjE0YTQ2YTYz
14
+ NTA5MWE0OTkzZDBiN2FjNjViZjU1YmRjZDc0ZTQ5OTc3OGY2YzcxYjhlMGZj
15
+ MmQ0M2Y0OWFkNmZhNWRmOTEzZmY0NzA3MjYzNTU5NzBlMmE4NjY=
@@ -1,16 +1,6 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
1
+ // /app/assets/caboose/application.js
2
+ // Caboose Javascript
3
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
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require_tree ../../templates
14
4
  //= require jquery
15
5
  //= require jquery_ujs
16
6
  //= require colorbox-rails
@@ -18,4 +8,5 @@
18
8
  //= require caboose/jquery.placeholder
19
9
  //= require caboose/modal_integration
20
10
  //= require caboose/main
11
+ //= require_tree ../../templates
21
12
  //= require application
@@ -131,10 +131,10 @@ module Caboose
131
131
  def admin_edit_content
132
132
  return unless user_is_allowed('pages', 'edit')
133
133
  @page = Page.find(params[:id])
134
- #if @page.top_level_blocks.nil? || @page.top_level_blocks.count == 0
135
- # redirect_to '/admin/page/:id/layout'
136
- # return
137
- #end
134
+ if @page.block.nil?
135
+ redirect_to '/admin/page/:id/layout'
136
+ return
137
+ end
138
138
  @editing = true
139
139
  end
140
140
 
@@ -11,8 +11,7 @@ page = block.page
11
11
  <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
12
12
  <title><%= !page.title.nil? && page.title.strip.length > 0 ? "#{page.title} | " : "" %><%= Caboose::website_name %></title>
13
13
  <meta name="description" content="" />
14
- <meta name="viewport" content="width=device-width" />
15
- <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false"></script>
14
+ <meta name="viewport" content="width=device-width" /><% javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false" %>
16
15
  <%= raw css %>
17
16
  <%= stylesheet_link_tag 'print', :media => 'print' %>
18
17
  <%= raw csrf_meta_tags %>
@@ -26,6 +25,9 @@ page = block.page
26
25
  <%= raw block.render('content', local_assigns) %>
27
26
  <%= raw block.render('footer' , local_assigns) %>
28
27
  </div>
28
+ <% content_for :js do %>
29
+ <script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false" /></script>
30
+ <% end %>
29
31
  <%= raw js %>
30
32
  </body>
31
33
  </html>
@@ -24,7 +24,7 @@
24
24
  <% end %>
25
25
 
26
26
  <% content_for :caboose_js do %>
27
- <%= javascript_include_tag "caboose/admin" %>
27
+ <%= javascript_include_tag "jquery.ui.all" %>
28
28
  <%= javascript_include_tag "caboose/model/all" %>
29
29
  <%= javascript_include_tag 'caboose/admin_page_edit_content' %>
30
30
  <script type='text/javascript'>
@@ -1,45 +1,46 @@
1
- <%
2
-
3
- #if !@page.nil? && @page.title != 'Access Denied'
4
- #
5
- # str = @page.block.render(@page.block, {
6
- # :controller_view_content => yield,
7
- # :modal => false,
8
- # :empty_text => '',
9
- # :editing => defined?(@editing) ? @editing : false
10
- # })
11
-
12
- %>
13
1
 
2
+ <% if !@page.nil? && @page.title != 'Access Denied' %>
14
3
  <% content_for :js do %>
15
- <%= javascript_include_tag "caboose/application" %>
16
- <script>window.loggedIn = <%= logged_in?.to_json %></script>
17
- <% Caboose::javascripts.each do |js| %><%= javascript_include_tag(js) %><% end %>
18
- <% @page.linked_resources_map[:js].each do |r| %><%= javascript_include_tag r %><% end %>
19
- <%= yield :caboose_js %>
20
- <% end %>
21
-
22
- <% content_for :css do %>
23
- <%= stylesheet_link_tag('caboose/application') %>
24
- <% Caboose::stylesheets.each do |css| %><%= stylesheet_link_tag(css) %><% end %>
25
- <% @page.linked_resources_map[:css].each do |r| %><%= stylesheet_link_tag r %><% end %>
26
- <%= yield :caboose_css %>
27
- <% end %>
4
+ <%= javascript_include_tag "caboose/application" %>
5
+ <script>window.loggedIn = <%= logged_in?.to_json %></script>
6
+ <% Caboose::javascripts.each do |js| %><%= javascript_include_tag(js) %><% end %>
7
+ <% @page.linked_resources_map[:js].each do |r| %><%= javascript_include_tag r %><% end %>
8
+ <%= yield :caboose_js %>
9
+ <% end %>
10
+ <% content_for :css do %>
11
+ <%= stylesheet_link_tag('caboose/application') %>
12
+ <% Caboose::stylesheets.each do |css| %><%= stylesheet_link_tag(css) %><% end %>
13
+ <% @page.linked_resources_map[:css].each do |r| %><%= stylesheet_link_tag r %><% end %>
14
+ <%= yield :caboose_css %>
15
+ <% end %>
16
+ <%
17
+ b = @page.block
18
+ str = b.render(b, {
19
+ :controller_view_content => yield,
20
+ :modal => false,
21
+ :empty_text => '',
22
+ :editing => defined?(@editing) ? @editing : false,
23
+ :css => '|CABOOSE_CSS|',
24
+ :js => '|CABOOSE_JAVASCRIPT|',
25
+ :csrf_meta_tags => '|CABOOSE_CSRF|'
26
+ })
27
+ str.gsub!('|CABOOSE_CSS|' , yield(:css))
28
+ str.gsub!('|CABOOSE_JAVASCRIPT|' , yield(:js))
29
+ str.gsub!('|CABOOSE_CSRF|' , csrf_meta_tags)
30
+
31
+ %><%= raw str %><%
32
+
33
+ #b = @page.block
34
+ #
35
+ #raw b.render(b, {
36
+ # :controller_view_content => yield,
37
+ # :modal => false,
38
+ # :empty_text => '',
39
+ # :editing => defined?(@editing) ? @editing : false,
40
+ # :css => yield(:css),
41
+ # :js => yield(:js),
42
+ # :csrf_meta_tags => csrf_meta_tags
43
+ # })
28
44
 
29
- <%
30
-
31
- if !@page.nil? && @page.title != 'Access Denied'
32
- @page.top_level_blocks.each do |b|
33
- %><%= raw b.render(b, {
34
- :controller_view_content => yield,
35
- :modal => false,
36
- :empty_text => '',
37
- :editing => defined?(@editing) ? @editing : false,
38
- :css => yield(:css),
39
- :js => yield(:js),
40
- :csrf_meta_tags => csrf_meta_tags
41
- }) %><%
42
- end
43
45
  end
44
-
45
46
  %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.4.9'
2
+ VERSION = '0.4.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails