tb_cms 1.1.5 → 1.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/admin/cms/application.css +0 -25
- data/app/controllers/admin/pages_controller.rb +2 -6
- data/app/models/spud_menu.rb +1 -0
- data/app/models/spud_page_partial.rb +1 -1
- data/app/models/spud_snippet.rb +1 -1
- data/app/views/admin/menu_items/_form.html.erb +36 -37
- data/app/views/admin/menu_items/_menu_item_row.html.erb +14 -22
- data/app/views/admin/menu_items/edit.html.erb +3 -10
- data/app/views/admin/menu_items/index.html.erb +23 -13
- data/app/views/admin/menu_items/new.html.erb +3 -12
- data/app/views/admin/menus/_form.html.erb +12 -8
- data/app/views/admin/menus/edit.html.erb +3 -13
- data/app/views/admin/menus/index.html.erb +28 -18
- data/app/views/admin/menus/new.html.erb +3 -7
- data/app/views/admin/pages/_form.html.erb +74 -74
- data/app/views/admin/pages/_page_row.html.erb +14 -17
- data/app/views/admin/pages/edit.html.erb +9 -6
- data/app/views/admin/pages/index.html.erb +21 -12
- data/app/views/admin/pages/new.html.erb +8 -6
- data/app/views/admin/pages/show.html.erb +5 -5
- data/app/views/admin/snippets/_form.html.erb +14 -6
- data/app/views/admin/snippets/edit.html.erb +3 -7
- data/app/views/admin/snippets/index.html.erb +25 -22
- data/app/views/admin/snippets/new.html.erb +3 -7
- data/lib/spud_cms/version.rb +1 -1
- data/spec/controllers/cms/sitemaps_controller_spec.rb +2 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d493436489707a83b24c42f45f4c28da810f6eb
|
4
|
+
data.tar.gz: 0b85e51660ae264c80f50e063fa2ebca8538cf02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9106c75d5cd3f91334426eb8dd51e4006bb9cfbe04d6b8c5d1a8569e76537e2302361bc9dcf396ce0976045712ca4b58ac0f01f50604b4d9d22c44eda5295d64
|
7
|
+
data.tar.gz: 89588fb1c7d5ccf19e299ea1b6c076e41564a45a0268781df4b124d3d1085f89459100dab67752cba18f5dd55e24cf7011b68b59480c81a540f122dc2840dd84
|
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
.menu_list {
|
3
|
-
list-style-type:none;
|
4
|
-
}
|
5
|
-
.page_row {
|
6
|
-
background:white;
|
7
|
-
}
|
8
|
-
.menu_edit .subitem {
|
9
|
-
|
10
|
-
min-height:10px;
|
11
|
-
/*padding-bottom:12px;*/
|
12
|
-
}
|
13
|
-
|
14
|
-
.subitem .page_row {
|
15
|
-
|
16
|
-
border-left:2px solid #999;
|
17
|
-
}
|
18
|
-
.left_guide.subitem .page_row {
|
19
|
-
border:none;
|
20
|
-
}
|
21
|
-
|
22
|
-
.ui-sortable-placeholder {
|
23
|
-
background:#FAE7D9 !important;
|
24
|
-
visibility:visible !important;
|
25
|
-
}
|
@@ -4,14 +4,11 @@ class Admin::PagesController < Admin::ApplicationController
|
|
4
4
|
before_filter :load_page,:only => [:edit,:update,:show,:destroy]
|
5
5
|
|
6
6
|
def index
|
7
|
-
|
8
|
-
@pages = SpudPage.site(session[:admin_site]).where(:spud_page_id => nil).order(:page_order).includes(:spud_pages).paginate :page => params[:page]
|
9
|
-
|
7
|
+
@pages = SpudPage.site(session[:admin_site]).where(:spud_page_id => nil).order(:page_order).includes(:spud_pages)
|
10
8
|
home_page = SpudPage.where(:url_name => Spud::Cms.root_page_name).first
|
11
9
|
if home_page.blank?
|
12
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}'"
|
13
11
|
end
|
14
|
-
|
15
12
|
respond_with @pages
|
16
13
|
end
|
17
14
|
|
@@ -48,8 +45,7 @@ class Admin::PagesController < Admin::ApplicationController
|
|
48
45
|
end
|
49
46
|
|
50
47
|
def edit
|
51
|
-
add_breadcrumb
|
52
|
-
add_breadcrumb "Edit", :edit_admin_page_path
|
48
|
+
add_breadcrumb @page.name, :edit_admin_page_path
|
53
49
|
|
54
50
|
layouts = Spud::Cms::Engine.template_parser.layouts(Spud::Core.site_config_for_id(session[:admin_site] || 0)[:short_name])
|
55
51
|
layout, layout_info = layouts.select{|k,v| k == @page.layout}.flatten if @page.layout.blank? == false
|
data/app/models/spud_menu.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
class SpudMenu < ActiveRecord::Base
|
2
2
|
validates :name,:presence => true
|
3
3
|
validates_uniqueness_of :name, :scope => [:site_id]
|
4
|
+
|
4
5
|
has_many :spud_menu_items, :as => :parent, :dependent => :destroy
|
5
6
|
has_many :spud_menu_items_combined, :class_name => "SpudMenuItem", :foreign_key => :spud_menu_id, :dependent => :destroy
|
6
7
|
|
@@ -4,7 +4,7 @@ class SpudPagePartial < ActiveRecord::Base
|
|
4
4
|
validates :name,:presence => true
|
5
5
|
before_save :maintain_revisions
|
6
6
|
before_save :update_symbol_name
|
7
|
-
|
7
|
+
acts_as_tb_liquid_content
|
8
8
|
|
9
9
|
def update_symbol_name
|
10
10
|
self.symbol_name = self.name.parameterize.underscore
|
data/app/models/spud_snippet.rb
CHANGED
@@ -1,51 +1,50 @@
|
|
1
|
-
<%=
|
2
|
-
<fieldset>
|
3
|
-
<div class="control-group">
|
4
|
-
<%=f.label :name, :required=>true,:class => "control-label"%>
|
5
|
-
<div class="controls">
|
6
|
-
<%=f.text_field :name,:title => "",:size=>40%>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
</div>
|
10
|
-
<div class="control-group">
|
1
|
+
<%= tb_form_errors(f.object)%>
|
11
2
|
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
<div class="form-group">
|
4
|
+
<%= f.label :name, :required=>true, :class=>"col-sm-2 control-label" %>
|
5
|
+
<div class="col-sm-10">
|
6
|
+
<%= f.text_field :name, :title => "", :class=>"form-control" %>
|
15
7
|
</div>
|
16
|
-
|
17
8
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
|
10
|
+
<div class="form-group">
|
11
|
+
<%=f.label :menu_order, :required=>true,:class => "col-sm-2 control-label"%>
|
12
|
+
<div class="col-sm-10">
|
13
|
+
<%=f.text_field :menu_order, :title => "", :class=>'form-control'%>
|
22
14
|
</div>
|
23
|
-
|
24
15
|
</div>
|
25
16
|
|
17
|
+
<div class="form-group">
|
18
|
+
<%=f.label :spud_page_id, "Page", :class=>"col-sm-2 control-label"%>
|
19
|
+
<div class="col-sm-10">
|
20
|
+
<%= f.select :spud_page_id, options_for_select(SpudPage.options_tree_for_page(:site_id => session[:admin_site]), @menu_item.spud_page_id), {:include_blank => 'Use URL instead'}, {:class=>'form-control',:title => "", :onchange => "if($(this).val() != '') {$('#spud_menu_item_url').val('');}"}%>
|
21
|
+
</div>
|
22
|
+
</div>
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<%=f.text_field :url,:title => "",:size=>40%>
|
24
|
+
<div class="form-group">
|
25
|
+
<%=f.label :url, :class => "col-sm-2 control-label"%>
|
26
|
+
<div class="col-sm-10">
|
27
|
+
<%=f.text_field :url, :title => "", :class=>'form-control' %>
|
32
28
|
</div>
|
33
29
|
</div>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
|
31
|
+
<div class="form-group">
|
32
|
+
<%=f.label :classes, :class => "col-sm-2 control-label"%>
|
33
|
+
<div class="col-sm-10">
|
34
|
+
<%=f.text_field :classes, :title => "", :class=>'form-control'%>
|
38
35
|
</div>
|
39
36
|
</div>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
|
38
|
+
<div class="form-group">
|
39
|
+
<%= f.label :parent, "Parent Menu", :class=>"col-sm-2 control-label" %>
|
40
|
+
<div class="col-sm-10">
|
41
|
+
<%=f.select :parent_id,options_for_select(SpudMenuItem.options_tree_for_item(@menu,:filter => @menu_item),@menu_item.parent_type == 'SpudMenuItem' ? @menu_item.parent_id : nil),{:include_blank => "#{@menu.name}"},{:class => 'form-control', :title => ""}%>
|
44
42
|
</div>
|
45
|
-
|
46
43
|
</div>
|
47
44
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
<div class="form-group">
|
46
|
+
<div class="col-sm-offset-2 col-sm-10">
|
47
|
+
<%= f.submit "Save Menu Item", :class => "btn btn-primary" %>
|
48
|
+
<%= link_to "Cancel", admin_menu_menu_items_path, :class => "btn btn-default" %>
|
49
|
+
</div>
|
50
|
+
</div>
|
@@ -1,22 +1,14 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%=render :partial => 'menu_item_row',:locals => {:menu_item => menu_item}%>
|
16
|
-
</li>
|
17
|
-
<%end%>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<%end%>
|
22
|
-
</ul>
|
1
|
+
<tr>
|
2
|
+
<td>
|
3
|
+
<%= table_nesting_indicator(depth) %>
|
4
|
+
<%= menu_item.name %>
|
5
|
+
</td>
|
6
|
+
<td><%= link_to menu_item.get_url, menu_item.get_url %></td>
|
7
|
+
<td class="table-actions">
|
8
|
+
<%=link_to 'Edit', edit_admin_menu_menu_item_path(:id => menu_item.id), :title => "Edit Menu Item", :class => 'btn btn-default btn-sm' %>
|
9
|
+
<%=link_to 'Delete', admin_menu_menu_item_path(:id => menu_item.id), :method => :delete, :class => 'btn btn-danger btn-sm', :data => {:confirm => "Are you sure you want to remove this menu item?"} %>
|
10
|
+
</td>
|
11
|
+
</tr>
|
12
|
+
<% menu_item.spud_menu_items.each do |item| %>
|
13
|
+
<%= render :partial => 'menu_item_row', :locals => {:menu_item => item, :depth => depth+1} %>
|
14
|
+
<% end %>
|
@@ -1,10 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%=form_for @menu_item,:url => admin_menu_menu_item_path(:id => @menu_item.id),:html=>{:class=>"form-horizontal"} do |f|%>
|
5
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
6
|
-
<div class="form-actions">
|
7
|
-
<%=f.submit "Save Menu Item", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_menu_menu_items_path,:class => "btn"%>
|
8
|
-
</div>
|
9
|
-
<%end%>
|
10
|
-
|
1
|
+
<%= form_for @menu_item, :url => admin_menu_menu_item_path(:id => @menu_item.id), :html => {:class=>"form-horizontal"} do |f| %>
|
2
|
+
<% render :partial => "form",:locals => {:f => f}%>
|
3
|
+
<% end %>
|
@@ -1,17 +1,27 @@
|
|
1
|
-
|
2
|
-
<%=link_to "New Menu Item",new_admin_menu_menu_item_path()
|
3
|
-
<%end%>
|
4
|
-
<%=content_for :detail do%>
|
5
|
-
<ul id="root_menu_list" class="menu_list page_list sortable connectedSortable">
|
6
|
-
<%@menu_items.each do |menu_item|%>
|
7
|
-
<li>
|
8
|
-
<%=render :partial => "menu_item_row",:locals => {:menu_item => menu_item}%>
|
9
|
-
</li>
|
10
|
-
<%end%>
|
1
|
+
<% content_for :data_controls do %>
|
2
|
+
<%= link_to "New Menu Item", new_admin_menu_menu_item_path(), :class => "btn btn-primary", :title => "New Menu Item" %>
|
3
|
+
<% end %>
|
11
4
|
|
12
|
-
|
5
|
+
<% content_for :detail do %>
|
6
|
+
<div class="table-responsive">
|
7
|
+
<table class="table table-striped table-hover">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Name</th>
|
11
|
+
<th>URL</th>
|
12
|
+
<th> </th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @menu_items.each do |item| %>
|
17
|
+
<%= render :partial => 'menu_item_row', :locals => {:menu_item => item, :depth => 0} %>
|
18
|
+
<% end %>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
</div>
|
13
22
|
|
14
23
|
<script type="text/javascript">
|
15
|
-
$(document).ready(function() { spud.admin.cms.menu_items.init();})
|
24
|
+
$(document).ready(function() { spud.admin.cms.menu_items.init();})
|
16
25
|
</script>
|
17
|
-
|
26
|
+
|
27
|
+
<% end %>
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%=form_for @menu_item,:url => admin_menu_menu_items_path,:html=>{:class=>"form-horizontal"} do |f|%>
|
5
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
6
|
-
<div class="form-actions">
|
7
|
-
<%=f.submit "Create Menu Item", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_menu_menu_items_path,:class => "btn"%>
|
8
|
-
</div>
|
9
|
-
<%end%>
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<%= form_for @menu_item, :url => admin_menu_menu_items_path, :html => {:class=>"form-horizontal"} do |f| %>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<% end %>
|
@@ -1,11 +1,15 @@
|
|
1
|
-
<%=
|
2
|
-
<fieldset>
|
3
|
-
<div class="control-group">
|
4
|
-
<%=f.label :name, :required=>true,:class => "control-label"%>
|
5
|
-
<div class="controls">
|
6
|
-
<%=f.text_field :name,:title => "",:size=>40%>
|
7
|
-
</div>
|
1
|
+
<%=tb_form_errors(f.object)%>
|
8
2
|
|
3
|
+
<div class="form-group">
|
4
|
+
<%= f.label :name, nil, :class=>"col-sm-2 control-label" %>
|
5
|
+
<div class="col-sm-10">
|
6
|
+
<%= f.text_field :name, :class => "form-control" %>
|
7
|
+
</div>
|
9
8
|
</div>
|
10
|
-
</fieldset>
|
11
9
|
|
10
|
+
<div class="form-group">
|
11
|
+
<div class="col-sm-offset-2 col-sm-10">
|
12
|
+
<%= f.submit "Save Menu", :class => "btn btn-primary" %>
|
13
|
+
<%= link_to "Cancel", admin_menus_path, :class => "btn btn-default" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -1,13 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%=form_for @menu,:url => admin_menu_path(:id => @menu.id),:html=>{:class=>"form-horizontal"} do |f|%>
|
5
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
6
|
-
<div class="form-actions">
|
7
|
-
<%=f.submit "Save Menu", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_menus_path,:class => "btn"%>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<%end%>
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
<%=form_for @menu,:url => admin_menu_path(:id => @menu.id),:html=>{:class=>"form-horizontal"} do |f|%>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<% end %>
|
@@ -1,21 +1,31 @@
|
|
1
1
|
<% content_for :data_controls do%>
|
2
|
-
<%= link_to "New Menu",new_admin_menu_path()
|
2
|
+
<%= link_to "New Menu", new_admin_menu_path(), :class => "btn btn-primary", :title => "New Menu" %>
|
3
3
|
<% end %>
|
4
|
-
<%=content_for :detail do%>
|
5
|
-
<div class="page_list">
|
6
|
-
<%@menus.each do |menu|%>
|
7
|
-
<div class="page_row">
|
8
|
-
|
9
|
-
<span class="row_meta"><%=link_to menu.name,admin_menu_menu_items_path(:menu_id => menu.id)%></span>
|
10
4
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
5
|
+
<% content_for :detail do %>
|
6
|
+
<div class="table-responsive">
|
7
|
+
<table class="table table-striped table-hover">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Name</th>
|
11
|
+
<th># Items</th>
|
12
|
+
<th> </th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @menus.each do |menu| %>
|
17
|
+
<tr>
|
18
|
+
<td><%= menu.name %></td>
|
19
|
+
<td><%= menu.spud_menu_items.count %></td>
|
20
|
+
<td class="table-actions">
|
21
|
+
<%= link_to 'Items', admin_menu_menu_items_path(:menu_id => menu.id), :class => 'btn btn-default btn-sm' %>
|
22
|
+
<%= link_to 'Edit', edit_admin_menu_path(:id => menu.id), :class => 'btn btn-default btn-sm' %>
|
23
|
+
<%= link_to 'Delete', admin_menu_path(:id => menu.id), :method => :delete, :data => {:confirm => 'Are you sure?"'}, :class => 'btn btn-danger btn-sm' %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
</div>
|
30
|
+
<%= will_paginate @menus, :renderer => BootstrapPagination::Rails %>
|
31
|
+
<% end %>
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%=form_for @menu,:url => admin_menus_path,:html=>{:class=>"form-horizontal"} do |f
|
2
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
3
|
-
|
4
|
-
<%=f.submit "Create Menu", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_menus_path,:class => "btn"%>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<%end%>
|
1
|
+
<%= form_for @menu,:url => admin_menus_path,:html=>{:class=>"form-horizontal"} do |f| %>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<% end %>
|
@@ -1,97 +1,97 @@
|
|
1
|
-
<%=
|
2
|
-
<fieldset>
|
3
|
-
<div class="control-group">
|
4
|
-
<legend>Page Title</legend>
|
5
|
-
<%=f.label :name, :required=>true,:style =>"display:none;", :class=>"control-label"%>
|
1
|
+
<%= tb_form_errors(f.object) %>
|
6
2
|
|
7
|
-
|
3
|
+
<h4>Page Title</h4>
|
8
4
|
|
5
|
+
<div class="form-group">
|
6
|
+
<%= f.label :name, :required => true, :style =>"display:none;", :class=>"form-label" %>
|
7
|
+
<div class="col-lg-12">
|
8
|
+
<%= f.text_field :name, :class => "form-control" %>
|
9
9
|
</div>
|
10
|
-
</
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<h4>Page Content</h4>
|
13
|
+
|
11
14
|
<div id="page_partials_form" class="formtabs tab-content">
|
12
15
|
<ul class="formtab_buttons nav nav-tabs">
|
13
16
|
</ul>
|
14
17
|
<%= f.fields_for :spud_page_partials do |b| %>
|
15
18
|
<div class="formtab tab-pane">
|
16
|
-
<%= b.hidden_field :name
|
17
|
-
<%= b.text_area :content
|
19
|
+
<%= b.hidden_field :name, :class => "tab_name" %>
|
20
|
+
<%= b.text_area :content, :class => "tinymce" %>
|
18
21
|
</div>
|
19
22
|
<% end %>
|
20
23
|
</div>
|
21
|
-
<br />
|
22
|
-
<fieldset>
|
23
|
-
<legend>Advanced Settings (optional)</legend>
|
24
24
|
|
25
|
-
|
25
|
+
<h4>Advanced Settings</h4>
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
<div class="form-group">
|
28
|
+
<%= f.label :layout, "Template", :class=>"col-lg-2 control-label"%>
|
29
|
+
<div class="col-lg-10">
|
30
|
+
<%= f.select :layout, options_for_select(layout_options,@page.layout),{},{:title => "", 'data-source' => page_parts_admin_pages_path(:page => @page.id), class: 'form-control' }%>
|
31
|
+
<span class="help-block">Use this to control the layout template to be used for this page if they are available.</span>
|
32
|
+
</div>
|
33
|
+
</div>
|
33
34
|
|
34
|
-
|
35
|
+
<div class="form-group">
|
36
|
+
<%= f.label :spud_page_id, "Parent Page", :class=>"col-lg-2 control-label"%>
|
37
|
+
<div class="col-lg-10">
|
38
|
+
<%= f.select :spud_page_id,options_for_select(SpudPage.options_tree_for_page(:filter => @page,:site_id => session[:admin_site]),@page.spud_page_id),{:include_blank => 'None'},{:title => "", :class=>'form-control' }%>
|
39
|
+
</div>
|
40
|
+
</div>
|
35
41
|
|
36
|
-
|
37
|
-
|
38
|
-
|
42
|
+
<div class="form-group">
|
43
|
+
<%= f.label :url_name, "Perma Link",:disabled => true, :class=>"col-lg-2 control-label"%>
|
44
|
+
<div class="col-lg-10">
|
45
|
+
<%= root_url %>
|
46
|
+
<%= f.text_field :url_name, :title => "", :size=>20, :class=>'form-inline' %>
|
47
|
+
</div>
|
48
|
+
<div class="col-lg-10">
|
49
|
+
<%= f.check_box :use_custom_url_name, :onchange => "$('#spud_page_url_name').attr('disabled',!this.checked);" %>
|
50
|
+
<%= f.label :use_custom_url_name, 'Customize this pages url' %>
|
51
|
+
</div>
|
52
|
+
</div>
|
39
53
|
|
40
|
-
|
41
|
-
|
42
|
-
<div class="control-group">
|
54
|
+
<h4>Meta Information</h4>
|
55
|
+
<p>These fields are used to notify search engines about important keywords and the appropriate description to display in a search result.</p>
|
43
56
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
</div>
|
52
|
-
</div>
|
57
|
+
<div class="form-group">
|
58
|
+
<%= f.label :meta_keywords, "Keywords", :class=>"col-lg-2 control-label" %>
|
59
|
+
<div class="col-lg-10">
|
60
|
+
<%= f.text_field :meta_keywords, :class=>"form-control" %>
|
61
|
+
<span class="help-block">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span>
|
62
|
+
</div>
|
63
|
+
</div>
|
53
64
|
|
54
|
-
|
55
|
-
|
56
|
-
<
|
57
|
-
|
65
|
+
<div class="form-group">
|
66
|
+
<%= f.label :meta_description, "Description", :class=>"col-lg-2 control-label" %>
|
67
|
+
<div class="col-lg-10">
|
68
|
+
<%= f.text_area :meta_description, :class=>"form-control", :rows=>3 %>
|
69
|
+
<span class="help-block">A short description of the page. This is what appears on a search engines search result page.</span>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div class="form-group">
|
74
|
+
<%= f.label :visibility, :class=>"col-lg-2 control-label" %>
|
75
|
+
<div class="col-lg-10">
|
76
|
+
<%= f.select(:visibility, [["Public",0],["Private",1]], {}, {class: 'form-control'})%>
|
77
|
+
</div>
|
78
|
+
</div>
|
58
79
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
80
|
+
<div class="form-group">
|
81
|
+
<%= f.label :published, "Published", class: "col-lg-2 control-label" %>
|
82
|
+
<div class="col-lg-10">
|
83
|
+
<%= f.check_box :published %>
|
84
|
+
</div>
|
85
|
+
</div>
|
65
86
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<div class="control-group">
|
75
|
-
<%=f.label :visibility, :class=>"control-label"%>
|
76
|
-
<div class="controls">
|
77
|
-
<%=f.select :visibility, [["Public",0],["Private",1]]%>
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
<div class="control-group">
|
81
|
-
<%=f.label :published, :class=>"control-label"%>
|
82
|
-
<div class="controls">
|
83
|
-
<%=f.check_box :published%>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
<div class="control-group">
|
87
|
-
<%=f.label :notes,"Notes", :class=>"control-label"%>
|
88
|
-
<div class="controls">
|
89
|
-
<%=f.text_area :notes,:style =>"width:400px;height:40px;"%>
|
90
|
-
<span class="help-inline">Have a note to make about this page while you work? Place it here for later.</span>
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
<%= hidden_field_tag "preview", 0 %>
|
94
|
-
</fieldset>
|
87
|
+
<div class="form-group">
|
88
|
+
<%= f.label :notes, "Notes", class: "col-lg-2 control-label" %>
|
89
|
+
<div class="col-lg-10">
|
90
|
+
<%= f.text_area :notes, :class=>"form-control", :rows=>2 %>
|
91
|
+
<span class="help-block">Have a note to make about this page while you work? Place it here for later.</span>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
<%= hidden_field_tag "preview", 0 %>
|
95
95
|
|
96
96
|
<script type="text/javascript">
|
97
97
|
$(document).ready(spud.admin.cms.pages.edit);
|
@@ -1,18 +1,15 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= render :partial => 'page_row', :locals => {:page => spud_page} %>
|
16
|
-
<%end%>
|
17
|
-
</div>
|
1
|
+
<tr>
|
2
|
+
<td>
|
3
|
+
<%= table_nesting_indicator(depth) %>
|
4
|
+
<%= page.name %>
|
5
|
+
</td>
|
6
|
+
<td><%= link_to page_path(page.url_name), page_path(page.url_name) %></td>
|
7
|
+
<td class="table-actions">
|
8
|
+
<%= link_to 'View', page_path(page.url_name), :class => 'btn btn-default btn-sm' %>
|
9
|
+
<%= link_to 'Edit', edit_admin_page_path(page), :class => 'btn btn-default btn-sm' %>
|
10
|
+
<%= link_to 'Delete', admin_page_path(page), :method => :delete, :data => {:confirm => 'Are you sure?"'}, :class => 'btn btn-danger btn-sm' %>
|
11
|
+
</td>
|
12
|
+
</tr>
|
13
|
+
<% page.spud_pages.each do |page| %>
|
14
|
+
<%= render :partial => 'page_row', :locals => {:depth => depth+1, :page => page} %>
|
18
15
|
<% end %>
|
@@ -1,7 +1,10 @@
|
|
1
|
-
<%=form_for @page,:url => admin_page_path(:id => @page.id),:html=>{:class=>"form-horizontal page_form"} do |f
|
2
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
3
|
-
<div class="
|
4
|
-
|
1
|
+
<%= form_for @page,:url => admin_page_path(:id => @page.id),:html=>{:class=>"form-horizontal page_form"} do |f| %>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<div class="row">
|
4
|
+
<div class="col-lg-10 col-offset-2">
|
5
|
+
<%= f.submit "Save Page", :class => "btn btn-primary btn-save" %>
|
6
|
+
<%= f.submit "Preview", :class => "btn btn-info btn-preview" %> or
|
7
|
+
<%= link_to "cancel", admin_pages_path, :class => "btn btn-link" %>
|
8
|
+
</div>
|
5
9
|
</div>
|
6
|
-
<%end%>
|
7
|
-
<br />
|
10
|
+
<% end %>
|
@@ -1,13 +1,22 @@
|
|
1
|
-
|
2
|
-
<%=link_to "New Page",new_admin_page_path(),:class => "btn btn-primary",:title => "New Page"%> 
|
3
|
-
<%end%>
|
1
|
+
<% content_for :data_controls do%>
|
2
|
+
<%=link_to "New Page",new_admin_page_path(),:class => "btn btn-primary",:title => "New Page"%>
|
3
|
+
<% end %>
|
4
4
|
|
5
|
-
<%=content_for :detail do%>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<%= content_for :detail do %>
|
6
|
+
<div class="table-responsive">
|
7
|
+
<table class="table table-striped table-hover">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Name</th>
|
11
|
+
<th>URL</th>
|
12
|
+
<th> </th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @pages.each do |page| %>
|
17
|
+
<%= render :partial => 'page_row', :locals => {:depth => 0, :page => page} %>
|
18
|
+
<% end %>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
@@ -1,7 +1,9 @@
|
|
1
|
-
<%=form_for @page,:url => admin_pages_path()
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<%= form_for @page,:url => admin_pages_path(), :html => {:class => "form-horizontal page_form"} do |f| %>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<div class="row">
|
4
|
+
<div class="col-lg-10 col-offset-2">
|
5
|
+
<%= f.submit "Create Page", :class => "btn btn-primary form-btn btn-save", "data-loading-text" => "Saving..." %>
|
6
|
+
<%= f.submit "Preview", :class => "btn btn-primary btn-preview" %> or <%=link_to "cancel", admin_pages_path,:class => "btn btn-link" %>
|
5
7
|
</div>
|
6
|
-
|
7
|
-
<%end%>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<meta name="description" content="<%=@page.meta_description%>" />
|
4
4
|
|
5
5
|
<meta name="keywords" content="<%=@page.meta_keywords%>" />
|
6
|
-
<%end%>
|
6
|
+
<% end %>
|
7
7
|
|
8
8
|
<%if !@inline.blank?%>
|
9
9
|
<%=render :inline => @inline%>
|
10
|
-
<%end%>
|
10
|
+
<% end %>
|
11
11
|
<%@page.spud_page_partials.each do |page_partial|%>
|
12
12
|
|
13
13
|
<%if(page_partial.name.downcase == 'body' && Spud::Cms.yield_body_as_content_block == false)%>
|
@@ -15,6 +15,6 @@
|
|
15
15
|
<%else%>
|
16
16
|
<%=content_for page_partial.name.parameterize.underscore.to_sym do%>
|
17
17
|
<%=page_partial.postprocess_content.html_safe%>
|
18
|
-
<%end%>
|
19
|
-
<%end%>
|
20
|
-
<%end%>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
@@ -1,8 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<%= tb_form_errors(f.object)%>
|
2
|
+
|
3
|
+
<div class="form-group">
|
4
|
+
<%= f.label :name, :required => true, :class => "control-label" %>
|
5
|
+
<%= f.text_field :name, :title => "", :class=>"form-control" %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="form-group">
|
9
|
+
<%= f.label :content, :required => true, :class => "control-label" %>
|
7
10
|
<%= f.text_area :content,:style => "width:100%;", :class => 'tinymce full-width' %>
|
8
11
|
</div>
|
12
|
+
|
13
|
+
<div class="form-group">
|
14
|
+
<%= f.submit "Save Snippet", :class => "btn btn-primary" %>
|
15
|
+
<%= link_to "Cancel", admin_snippets_path, :class => "btn btn-default" %>
|
16
|
+
</div>
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%=form_for @snippet
|
2
|
-
<%=render :partial => "form"
|
3
|
-
|
4
|
-
<%=f.submit "Save Snippet", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_snippets_path,:class => "btn"%>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<%end%>
|
1
|
+
<%= form_for @snippet, :url => admin_snippet_path(@snippet) do |f| %>
|
2
|
+
<%= render :partial => "form", :locals => {:f => f} %>
|
3
|
+
<% end %>
|
@@ -1,24 +1,27 @@
|
|
1
|
-
|
2
|
-
<%=link_to "New Snippet",new_admin_snippet_path
|
3
|
-
<%end%>
|
4
|
-
<%=content_for :detail do%>
|
5
|
-
<div class="page_list">
|
6
|
-
<%@snippets.each do |snippet|%>
|
7
|
-
<div class="page_row">
|
8
|
-
|
9
|
-
<span class="row_meta"><%=link_to snippet.name,edit_admin_snippet_path(:id => snippet.id)%></span>
|
10
|
-
|
11
|
-
<span class="edit_controls">
|
12
|
-
|
13
|
-
<%=link_to "Remove",admin_snippet_path(:id => snippet.id),:method => :delete,:class => 'btn btn-danger', :data => {:confirm => "Are you sure you want to remove this snippet?"} %>
|
14
|
-
</span>
|
15
|
-
<br style="clear:both;"/>
|
16
|
-
</div>
|
17
|
-
<%end%>
|
18
|
-
<%=will_paginate @snippets%>
|
1
|
+
<% content_for :data_controls do %>
|
2
|
+
<%= link_to "New Snippet",new_admin_snippet_path, :class => "btn btn-primary", :title => "New Snippet" %>
|
3
|
+
<% end %>
|
19
4
|
|
5
|
+
<% content_for :detail do %>
|
6
|
+
<div class="table-responsive">
|
7
|
+
<table class="table table-striped table-hover">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Name</th>
|
11
|
+
<th> </th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% @snippets.each do |snippet| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= snippet.name %></td>
|
18
|
+
<td class="table-actions">
|
19
|
+
<%= link_to 'Edit', edit_admin_snippet_path(snippet), :class => 'btn btn-sm btn-default' %>
|
20
|
+
<%= link_to 'delete', admin_snippet_path(snippet), :method => :delete, :class => 'btn btn-sm btn-danger', :data => {:confirm => 'Are you sure you want to delete this snippet?'} %>
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
20
26
|
</div>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<%end%>
|
27
|
+
<% end %>
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%=form_for @snippet
|
2
|
-
<%=render :partial => "form",:locals => {:f => f}%>
|
3
|
-
|
4
|
-
<%=f.submit "Create Snippet", :class=>"btn btn-primary"%> or <%=link_to "cancel",admin_snippets_path,:class => "btn"%>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<%end%>
|
1
|
+
<%= form_for @snippet, :url => admin_snippets_path do |f| %>
|
2
|
+
<%= render :partial => "form",:locals => {:f => f} %>
|
3
|
+
<% end %>
|
data/lib/spud_cms/version.rb
CHANGED
@@ -16,9 +16,8 @@ describe Cms::SitemapsController do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should only respond to an XML format" do
|
19
|
-
|
20
|
-
|
21
|
-
}.to raise_exception(ActionController::UnknownFormat)
|
19
|
+
get :show, :format => :html
|
20
|
+
response.response_code.should == 404
|
22
21
|
end
|
23
22
|
|
24
23
|
describe :multisite do
|
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.
|
4
|
+
version: 1.2.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Westlake Design
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.3.0.beta1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.3.0.beta1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: tb_permalinks
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -363,9 +363,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
363
363
|
version: '0'
|
364
364
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
365
365
|
requirements:
|
366
|
-
- - "
|
366
|
+
- - ">"
|
367
367
|
- !ruby/object:Gem::Version
|
368
|
-
version:
|
368
|
+
version: 1.3.1
|
369
369
|
requirements: []
|
370
370
|
rubyforge_project:
|
371
371
|
rubygems_version: 2.2.1
|