tb_cms 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/assets/javascripts/admin/cms/application.js +1 -1
- data/app/assets/javascripts/admin/cms/menu_items.js +2 -2
- data/app/assets/javascripts/admin/cms/pages.js +6 -7
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/models/spud_page.rb +1 -0
- data/app/views/admin/menu_items/index.html.erb +2 -2
- data/app/views/admin/pages/_form.html.erb +2 -2
- data/app/views/admin/pages/_page_partials_form.html.erb +1 -1
- data/app/views/admin/pages/_page_row.html.erb +1 -1
- data/lib/spud_cms/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 13270a188b116b592cf0ca1dfcc2693f89e10a72
|
4
|
+
data.tar.gz: ce7dfc3f907926f416f053b15276801570230840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09f2d4d365bd67a2e929d66c446cb34cffdcb60c9c07ced83c979261b2bc7be43507d8ba0e47f9f4965800cc74d852d13a1a1505667e9d103623f1fecaf30fd8'
|
7
|
+
data.tar.gz: b2c889ecec952493d8ea28fe54812f682cd8b0939455e718c6415d53fca081ab3dad0fec60c215edd7a09fcd919bd5a280a2decf004e30d09a738e15ae4ad0a7
|
@@ -1,11 +1,10 @@
|
|
1
|
-
|
1
|
+
tb.cms.pages = {};
|
2
2
|
|
3
3
|
(function(){
|
4
4
|
|
5
|
-
|
5
|
+
tb.cms.pages = {
|
6
6
|
edit: function(){
|
7
|
-
|
8
|
-
spud.admin.cms.pages.initFormTabs();
|
7
|
+
tb.cms.pages.initFormTabs();
|
9
8
|
$(".btn-preview").on('click', clickedPreviewButton);
|
10
9
|
$("#spud_page_layout").on('change', changedLayoutSelection);
|
11
10
|
}
|
@@ -37,16 +36,16 @@ var changedLayoutSelection = function(e){
|
|
37
36
|
spud.admin.editor.unload();
|
38
37
|
|
39
38
|
$("#page_partials_form").replaceWith(data);
|
40
|
-
|
39
|
+
tb.cms.pages.initFormTabs();
|
41
40
|
|
42
|
-
|
41
|
+
tb.editor.init();
|
43
42
|
|
44
43
|
}, 'text').error(function(jqXHR) {
|
45
44
|
alert("Error: " + jqXHR.responseText);
|
46
45
|
});
|
47
46
|
};
|
48
47
|
|
49
|
-
|
48
|
+
tb.cms.pages.initFormTabs = function(){
|
50
49
|
var tabNames = [];
|
51
50
|
|
52
51
|
$('.formtabs .formtab').each(function(tabind) {
|
@@ -4,7 +4,7 @@ class Admin::PagesController < Admin::ApplicationController
|
|
4
4
|
before_action :load_page, only: [:edit, :update, :show, :destroy]
|
5
5
|
|
6
6
|
def index
|
7
|
-
@pages = SpudPage.where(spud_page_id: nil).
|
7
|
+
@pages = SpudPage.where(spud_page_id: nil).ordered.includes(:spud_pages)
|
8
8
|
home_page = SpudPage.where(url_name: Spud::Cms.root_page_name).first
|
9
9
|
if home_page.blank?
|
10
10
|
flash.now[:warning] = "You have not setup your default CMS page. This page will be your homepage. To do so, create a page with the name '#{Spud::Cms.root_page_name.titlecase}'"
|
data/app/models/spud_page.rb
CHANGED
@@ -26,6 +26,7 @@ class SpudPage < ActiveRecord::Base
|
|
26
26
|
scope :parent_pages, -> { where(spud_page_id: nil) }
|
27
27
|
scope :published_pages, -> { where(published: true) }
|
28
28
|
scope :viewable, -> { where(visibility: 0) }
|
29
|
+
scope :ordered, -> { order(page_order: :asc, name: :asc) }
|
29
30
|
|
30
31
|
def full_content_processed
|
31
32
|
ActiveSupport::Deprecation.warn('#full_content_processed is deprecated; use #full_content instead.')
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= f.fields_for :spud_page_partials do |b| %>
|
18
18
|
<div class="formtab tab-pane">
|
19
19
|
<%= b.hidden_field :name, :class => "tab_name" %>
|
20
|
-
<%= b.text_area :content, :class => "page-partial-content-editor" %>
|
20
|
+
<%= b.text_area :content, :class => "page-partial-content-editor tinymce" %>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -101,5 +101,5 @@
|
|
101
101
|
<%= hidden_field_tag "preview", 0 %>
|
102
102
|
|
103
103
|
<script type="text/javascript">
|
104
|
-
$(document).ready(
|
104
|
+
$(document).ready(tb.cms.pages.edit);
|
105
105
|
</script>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<% if spud_page_partial.id %>
|
9
9
|
<%= hidden_field_tag "spud_page[spud_page_partials_attributes][#{index}][id]", spud_page_partial.id %>
|
10
10
|
<% end %>
|
11
|
-
<textarea class="page-partial-content-editor" name="spud_page[spud_page_partials_attributes][<%= index %>][content]">
|
11
|
+
<textarea class="page-partial-content-editor tinymce" name="spud_page[spud_page_partials_attributes][<%= index %>][content]">
|
12
12
|
<%= spud_page_partial.content %>
|
13
13
|
</textarea>
|
14
14
|
</div>
|
@@ -10,6 +10,6 @@
|
|
10
10
|
<%= link_to 'Delete', admin_page_path(page), :method => :delete, :data => {:confirm => 'Are you sure?"'}, :class => 'btn btn-danger btn-sm' %>
|
11
11
|
</td>
|
12
12
|
</tr>
|
13
|
-
<% page.spud_pages.each do |page| %>
|
13
|
+
<% page.spud_pages.ordered.each do |page| %>
|
14
14
|
<%= render :partial => 'page_row', :locals => {:depth => depth+1, :page => page} %>
|
15
15
|
<% end %>
|
data/lib/spud_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moser Consulting
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -322,7 +322,7 @@ files:
|
|
322
322
|
homepage: http://bitbucket.org/moser-inc/tb_cms
|
323
323
|
licenses: []
|
324
324
|
metadata: {}
|
325
|
-
post_install_message:
|
325
|
+
post_install_message:
|
326
326
|
rdoc_options: []
|
327
327
|
require_paths:
|
328
328
|
- lib
|
@@ -337,8 +337,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
337
|
- !ruby/object:Gem::Version
|
338
338
|
version: '0'
|
339
339
|
requirements: []
|
340
|
-
|
341
|
-
|
340
|
+
rubyforge_project:
|
341
|
+
rubygems_version: 2.6.12
|
342
|
+
signing_key:
|
342
343
|
specification_version: 4
|
343
344
|
summary: Twice Baked CMS
|
344
345
|
test_files:
|