spud_cms 0.7.2 → 0.8.0

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.
@@ -1,5 +1,5 @@
1
1
  class Spud::Admin::MenusController < Spud::Admin::ApplicationController
2
- layout 'spud/admin/cms/detail'
2
+ layout 'spud/admin/detail'
3
3
  belongs_to_spud_app :menus
4
4
  add_breadcrumb "Menus", :spud_admin_menus_path
5
5
  before_filter :load_menu,:only => [:edit,:update,:show,:destroy]
@@ -130,6 +130,25 @@ class Spud::Admin::PagesController < Spud::Admin::ApplicationController
130
130
  end
131
131
  end
132
132
 
133
+ def clear
134
+ Rails.cache.clear
135
+ SpudPage.published_pages.all.each do |record|
136
+ if Spud::Cms.enable_full_page_caching
137
+ if record.url_name == Spud::Cms.root_page_name
138
+ expire_page root_path
139
+ else
140
+ expire_page page_path(:id => record.url_name)
141
+ end
142
+ elsif Spud::Cms.enable_action_caching
143
+ if record.url_name == Spud::Cms.root_page_name
144
+ expire_action root_path
145
+ else
146
+ expire_action page_path(:id => record.url_name)
147
+ end
148
+ end
149
+ end
150
+ end
151
+
133
152
  private
134
153
  def load_page
135
154
  @page = SpudPage.where(:id => params[:id]).includes(:spud_page_partials).first
@@ -1,5 +1,4 @@
1
1
  <%=content_for :head do%>
2
- <%= javascript_include_tag "wymeditor/jquery.wymeditor.min" %>
3
2
  <%= stylesheet_link_tag "spud/admin/cms/application" %>
4
3
  <%= javascript_include_tag "spud/admin/cms/application" %>
5
4
  <%end%>
@@ -1,33 +1,50 @@
1
1
  <%=error_messages_for(f.object)%>
2
2
  <fieldset>
3
- <ol>
4
- <li><%=f.label :name, :required=>true%>
5
- <%=f.text_field :name,:title => "",:size=>40%>
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>
6
8
 
7
- </li>
8
- <li><%=f.label :menu_order, :required=>true%>
9
- <%=f.text_field :menu_order,:title => "",:size=>5%>
9
+ </div>
10
+ <div class="control-group">
11
+
12
+ <%=f.label :menu_order, :required=>true,:class => "control-label"%>
13
+ <div class="controls">
14
+ <%=f.text_field :menu_order,:title => "",:size=>5%>
15
+ </div>
10
16
 
11
- </li>
12
- <li><%=f.label :spud_page_id, "Page"%>
13
- <%=f.select :spud_page_id,options_for_select(SpudPage.options_tree_for_page(),@menu_item.spud_page_id),{:include_blank => 'Use URL instead'},{:title => "",:onchange => "if($(this).val() != '') {$('#spud_menu_item_url').val('');}"}%>
17
+ </div>
18
+ <div class="control-group">
19
+ <%=f.label :spud_page_id, "Page",:class => "control-label"%>
20
+ <div class="controls">
21
+ <%=f.select :spud_page_id,options_for_select(SpudPage.options_tree_for_page(),@menu_item.spud_page_id),{:include_blank => 'Use URL instead'},{:title => "",:onchange => "if($(this).val() != '') {$('#spud_menu_item_url').val('');}"}%>
22
+ </div>
14
23
 
15
- </li>
24
+ </div>
16
25
 
17
26
 
18
27
 
19
- <li><%=f.label :url%>
20
- <%=f.text_field :url,:title => "",:size=>40%>
21
- </li>
22
- <li><%=f.label :classes%>
23
- <%=f.text_field :classes,:title => "",:size=>40%>
24
-
25
- </li>
26
- <li><%=f.label :parent, "Parent Menu"%>
27
- <%=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}"},{:title => ""}%>
28
+ <div class="control-group">
29
+ <%=f.label :url,:class => "control-label"%>
30
+ <div class="controls">
31
+ <%=f.text_field :url,:title => "",:size=>40%>
32
+ </div>
33
+ </div>
34
+ <div class="control-group">
35
+ <%=f.label :classes,:class => "control-label"%>
36
+ <div class="controls">
37
+ <%=f.text_field :classes,:title => "",:size=>40%>
38
+ </div>
39
+ </div>
40
+ <div class="control-group">
41
+ <%=f.label :parent, "Parent Menu",:class => "control-label"%>
42
+ <div class="controls">
43
+ <%=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}"},{:title => ""}%>
44
+ </div>
28
45
 
29
- </li>
30
- </ol>
46
+ </div>
47
+
31
48
  </fieldset>
32
49
 
33
50
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <span class="row_meta"><%=prefix if defined? prefix%><%=link_to menu_item.name,edit_spud_admin_menu_menu_item_path(:id => menu_item.id)%></span>
4
4
 
5
- <span class="edit_controls"><%=link_to "Edit",edit_spud_admin_menu_menu_item_path(:id => menu_item.id), :title => "Edit Menu Item",:class => 'button'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_menu_menu_item_path(:id => menu_item.id),:method => :delete,:class => 'button',:confirm => "Are you sure you want to remove this menu item?"%></span>
5
+ <span class="edit_controls"><%=link_to "Edit",edit_spud_admin_menu_menu_item_path(:id => menu_item.id), :title => "Edit Menu Item",:class => 'btn'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_menu_menu_item_path(:id => menu_item.id),:method => :delete,:class => 'btn btn-danger',:confirm => "Are you sure you want to remove this menu item?"%></span>
6
6
  <br style="clear:both;"/>
7
7
  </div>
8
8
  <%if !menu_item.spud_menu_items.all.blank?%>
@@ -1,13 +1,10 @@
1
1
 
2
2
 
3
3
 
4
- <%=form_for @menu_item,:url => spud_admin_menu_menu_item_path(:id => @menu_item.id),:html=>{:class=>"right_aligned_form"} do |f|%>
4
+ <%=form_for @menu_item,:url => spud_admin_menu_menu_item_path(:id => @menu_item.id),:html=>{:class=>"form-horizontal"} do |f|%>
5
5
  <%=render :partial => "form",:locals => {:f => f}%>
6
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
6
+ <div class="form-actions">
7
+ <%=f.submit "Save Menu Item", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_menu_menu_items_path,:class => "btn"%>
8
+ </div>
7
9
  <%end%>
8
10
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
13
-
@@ -1,5 +1,5 @@
1
1
  <%=content_for :data_controls do%>
2
- <%=link_to "New Menu Item",new_spud_admin_menu_menu_item_path(),:class => "button",:title => "New Menu Item"%>
2
+ <%=link_to "New Menu Item",new_spud_admin_menu_menu_item_path(),:class => "btn btn-primary",:title => "New Menu Item"%>
3
3
  <%end%>
4
4
  <%=content_for :detail do%>
5
5
  <div class="page_list">
@@ -1,13 +1,12 @@
1
1
 
2
2
 
3
3
 
4
- <%=form_for @menu_item,:url => spud_admin_menu_menu_items_path,:html=>{:class=>"right_aligned_form"} do |f|%>
4
+ <%=form_for @menu_item,:url => spud_admin_menu_menu_items_path,:html=>{:class=>"form-horizontal"} do |f|%>
5
5
  <%=render :partial => "form",:locals => {:f => f}%>
6
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
6
+ <div class="form-actions">
7
+ <%=f.submit "Create Menu Item", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_menu_menu_items_path,:class => "btn"%>
8
+ </div>
7
9
  <%end%>
8
10
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
11
+
13
12
 
@@ -1,9 +1,11 @@
1
1
  <%=error_messages_for(f.object)%>
2
2
  <fieldset>
3
- <ol>
4
- <li><%=f.label :name, :required=>true%>
5
- <%=f.text_field :name,:title => "",:size=>40%>
6
- </li>
7
- </ol>
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>
8
10
  </fieldset>
9
11
 
@@ -1,13 +1,13 @@
1
1
 
2
2
 
3
3
 
4
- <%=form_for @menu,:url => spud_admin_menu_path(:id => @menu.id),:html=>{:class=>"right_aligned_form"} do |f|%>
4
+ <%=form_for @menu,:url => spud_admin_menu_path(:id => @menu.id),:html=>{:class=>"form-horizontal"} do |f|%>
5
5
  <%=render :partial => "form",:locals => {:f => f}%>
6
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
6
+ <div class="form-actions">
7
+ <%=f.submit "Save Menu", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_menus_path,:class => "btn"%>
8
+ </div>
9
+
7
10
  <%end%>
8
11
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
12
+
13
13
 
@@ -1,5 +1,5 @@
1
1
  <%=content_for :data_controls do%>
2
- <%=link_to "New Menu",new_spud_admin_menu_path(),:class => "button",:title => "New Menu"%>
2
+ <%=link_to "New Menu",new_spud_admin_menu_path(),:class => "btn btn-primary",:title => "New Menu"%>
3
3
  <%end%>
4
4
  <%=content_for :detail do%>
5
5
  <div class="page_list">
@@ -9,8 +9,8 @@
9
9
  <span class="row_meta"><%=link_to menu.name,spud_admin_menu_menu_items_path(:menu_id => menu.id)%></span>
10
10
 
11
11
  <span class="edit_controls">
12
- <%=link_to "Edit",edit_spud_admin_menu_path(:id => menu.id),:class => 'button'%>
13
- <%=link_to "Remove",spud_admin_menu_path(:id => menu.id),:method => :delete,:class => 'button',:confirm => "Are you sure you want to remove this menu and all items associated with it?"%>
12
+ <%=link_to "Edit",edit_spud_admin_menu_path(:id => menu.id),:class => 'btn'%>
13
+ <%=link_to "Remove",spud_admin_menu_path(:id => menu.id),:method => :delete,:class => 'btn btn-danger',:confirm => "Are you sure you want to remove this menu and all items associated with it?"%>
14
14
  </span>
15
15
  <br style="clear:both;"/>
16
16
  </div>
@@ -1,13 +1,10 @@
1
1
 
2
2
 
3
3
 
4
- <%=form_for @menu,:url => spud_admin_menus_path,:html=>{:class=>"right_aligned_form"} do |f|%>
4
+ <%=form_for @menu,:url => spud_admin_menus_path,:html=>{:class=>"form-horizontal"} do |f|%>
5
5
  <%=render :partial => "form",:locals => {:f => f}%>
6
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
7
- <%end%>
8
-
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
6
+ <div class="form-actions">
7
+ <%=f.submit "Create Menu", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_menus_path,:class => "btn"%>
8
+ </div>
13
9
 
10
+ <%end%>
@@ -1,10 +1,12 @@
1
1
  <%=error_messages_for(f.object)%>
2
2
  <fieldset>
3
+ <div class="control-group">
3
4
  <legend>Page Title</legend>
4
- <p>
5
- <%=f.label :name, :required=>true, :style => "display:none;" %>
6
- <%=f.text_field :name, :class => "full-width" %>
7
- </p>
5
+ <%=f.label :name, :required=>true,:style =>"display:none;", :class=>"control-label"%>
6
+
7
+ <%=f.text_field :name, :class => "full-width"%>
8
+
9
+ </div>
8
10
  </fieldset>
9
11
  <div id="page_partials_form" class="formtabs">
10
12
  <ul class="formtab_buttons">
@@ -12,59 +14,83 @@
12
14
  <%=f.fields_for :spud_page_partials do |b|%>
13
15
  <div class="formtab">
14
16
  <%=b.hidden_field :name,:class => "tab_name"%>
15
- <%=b.text_area :content,:class => "wysiwym tinymce"%>
17
+ <%=b.text_area :content,:class => "tinymce"%>
16
18
  </div>
17
19
  <%end%>
18
20
  </div>
19
21
  <br />
20
22
  <fieldset>
21
23
  <legend>Advanced Settings (optional)</legend>
22
- <ol>
24
+
23
25
  <%if Spud::Cms.templates_enabled%>
24
- <li>
26
+ <div class="control-group">
25
27
 
26
- <%=f.label :template_id, "Template"%>
27
- <%=f.select :template_id, options_for_select(SpudTemplate.all.collect{|tp| [tp.name,tp.id]},@page.template_id), {:include_blank => 'Default'},{:title => "", 'data-source' => page_parts_spud_admin_pages_path(:page => @page.id) }%>
28
- </li>
28
+ <%=f.label :template_id, "Template", :class=>"control-label"%>
29
+ <div class="controls">
30
+ <%=f.select :template_id, options_for_select(SpudTemplate.all.collect{|tp| [tp.name,tp.id]},@page.template_id), {:include_blank => 'Default'},{:title => "", 'data-source' => page_parts_spud_admin_pages_path(:page => @page.id) }%>
31
+ <span class="help-inline">Use this to control the layout template to be used for this page if they are available.</span>
32
+ </div>
33
+ </div>
29
34
  <%end%>
30
- <li>
35
+ <div class="control-group">
31
36
 
32
- <%=f.label :spud_page_id, "Parent Page"%>
33
- <%=f.select :spud_page_id,options_for_select(SpudPage.options_tree_for_page(:filter => @page),@page.spud_page_id),{:include_blank => 'None'},{:title => ""}%>
34
- </li>
35
- <li>
37
+ <%=f.label :spud_page_id, "Parent Page", :class=>"control-label"%>
38
+ <div class="controls">
39
+ <%=f.select :spud_page_id,options_for_select(SpudPage.options_tree_for_page(:filter => @page),@page.spud_page_id),{:include_blank => 'None'},{:title => ""}%>
40
+
41
+ </div>
42
+ </div>
43
+ <div class="control-group">
36
44
 
37
- <%=f.label :url_name, "Perma Link",:disabled => true%>
38
- <%=root_url%><%=f.text_field :url_name,:title => "",:size=>20%><%=f.check_box :use_custom_url_name,:onchange => "$('#spud_page_url_name').attr('disabled',!this.checked);"%>
39
- </li>
40
- </ol>
45
+ <%=f.label :url_name, "Perma Link",:disabled => true, :class=>"control-label"%>
46
+ <div class="controls">
47
+ <%=root_url%><%=f.text_field :url_name,:title => "",:size=>20%>
48
+ <label class="checkbox inline">
49
+ <%=f.check_box :use_custom_url_name,:onchange => "$('#spud_page_url_name').attr('disabled',!this.checked);"%>
50
+ Customize this pages url
51
+ </label>
52
+ </div>
53
+ </div>
54
+
41
55
  </fieldset>
42
56
  <fieldset>
43
57
  <legend>Meta Information (optional)</legend>
44
58
  <p>These fields are used to notify search engines about important keywords and the appropriate description to display in a search result.</p>
45
- <ol>
46
- <li>
47
- <%=f.label :meta_keywords,"Keywords"%>
48
- <%=f.text_field :meta_keywords,:title => "" %>
49
-
50
- </li>
51
- <li>
52
- <%=f.label :meta_description,"Description"%>
53
- <%=f.text_area :meta_description,:rows => 4,:cols=>75%>
59
+
60
+ <div class="control-group">
61
+ <%=f.label :meta_keywords,"Keywords", :class=>"control-label"%>
62
+ <div class="controls">
63
+ <%=f.text_field :meta_keywords,:title => "",:style=>"width:600px;" %>
64
+ <span class="help-inline">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span>
65
+ </div>
54
66
 
55
- </li>
56
- <li>
57
- <%=f.label :visibility%>
58
- <%=f.select :visibility, [["Public",0],["Private",1]]%>
59
- </li>
60
- <li>
61
- <%=f.label :published%>
62
- <%=f.check_box :published%>
63
- </li>
64
- <li>
65
- <%=f.label :notes,"Notes"%>
66
- <%=f.text_area :notes,:rows => 4,:cols=>75 %>
67
- </li>
68
- </ol>
67
+ </div>
68
+ <div class="control-group">
69
+ <%=f.label :meta_description,"Description", :class=>"control-label"%>
70
+ <div class="controls">
71
+ <%=f.text_area :meta_description,:style =>"width:600px;height:40px;"%>
72
+ <span class="help-inline">A short description of the page. This is what appears on a search engines search result page.</span>
73
+ </div>
74
+ </div>
75
+ <div class="control-group">
76
+ <%=f.label :visibility, :class=>"control-label"%>
77
+ <div class="controls">
78
+ <%=f.select :visibility, [["Public",0],["Private",1]]%>
79
+ </div>
80
+ </div>
81
+ <div class="control-group">
82
+ <%=f.label :published, :class=>"control-label"%>
83
+ <div class="controls">
84
+ <%=f.check_box :published%>
85
+ </div>
86
+ </div>
87
+ <div class="control-group">
88
+ <%=f.label :notes,"Notes", :class=>"control-label"%>
89
+ <div class="controls">
90
+ <%=f.text_area :notes,:style =>"width:400px;height:40px;"%>
91
+ <span class="help-inline">Have a note to make about this page while you work? Place it here for later.</span>
92
+ </div>
93
+ </div>
94
+
69
95
  </fieldset>
70
96
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <span class="row_meta"><%=prefix if defined? prefix%><%=link_to page.name,edit_spud_admin_page_path(:id => page.id)%></span>
4
4
 
5
- <span class="edit_controls"><%=link_to "Preview",spud_admin_page_path(:id => page.id), :title => "Preview",:class => 'button'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_page_path(:id => page.id),:method => :delete,:class => 'button',:confirm => "Are you sure you want to remove this page?"%></span>
5
+ <span class="edit_controls"><%=link_to "Preview",spud_admin_page_path(:id => page.id), :title => "Preview",:class => 'btn'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_page_path(:id => page.id),:method => :delete,:class => 'btn btn-danger',:confirm => "Are you sure you want to remove this page?"%></span>
6
6
  <br style="clear:both;"/>
7
7
  </div>
8
8
  <%if !page.spud_pages.all.blank?%>
@@ -1,13 +1,8 @@
1
- <%=form_for @page,:url => spud_admin_page_path(:id => @page.id),:html=>{:class=>"right_aligned_form"} do |f|%>
1
+ <%=form_for @page,:url => spud_admin_page_path(:id => @page.id),:html=>{:class=>"form-horizontal"} do |f|%>
2
2
  <%=render :partial => "form",:locals => {:f => f}%>
3
- <fieldset class="submit">
4
- <%=f.submit :class => "wymupdate"%> or <%=link_to "cancel",request.referer%>
5
- </fieldset>
3
+ <div class="form-actions">
4
+ <%=f.submit "Save Page", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_pages_path,:class => "btn"%>
5
+ </div>
6
6
  <%end%>
7
7
  <br />
8
8
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
13
-
@@ -1,6 +1,7 @@
1
1
  <%=content_for :data_controls do%>
2
- <%=link_to "New Page",new_spud_admin_page_path(),:class => "button",:title => "New Page"%>
2
+ <%=link_to "New Page",new_spud_admin_page_path(),:class => "btn btn-primary",:title => "New Page"%>&nbsp;<%=link_to "Clear Cache",clear_spud_admin_pages_path(),:class => "btn btn-warning",:title => "Clear Page Cache" if Spud::Cms.enable_full_page_caching || Spud::Cms.enable_action_caching%>
3
3
  <%end%>
4
+
4
5
  <%=content_for :detail do%>
5
6
  <div class="page_list">
6
7
  <%@pages.each do |page|%>
@@ -1,12 +1,10 @@
1
- <%=form_for @page,:url => spud_admin_pages_path(),:html=>{:class=>"right_aligned_form"} do |f|%>
1
+ <%=form_for @page,:url => spud_admin_pages_path(),:html=>{:class=>"form-horizontal"} do |f|%>
2
2
  <%=render :partial => "form",:locals => {:f => f}%>
3
- <fieldset class="submit">
4
- <%=f.submit :class => "wymupdate"%> or <%=link_to "cancel",request.referer%>
5
- </fieldset>
3
+ <div class="form-actions">
4
+ <%=f.submit "Create Page", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",spud_admin_pages_path,:class => "btn"%>
5
+ </div>
6
+
6
7
  <%end%>
7
- <br />
8
8
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
- </script>
12
9
 
10
+
@@ -1,23 +1,35 @@
1
1
  <%=error_messages_for(f.object)%>
2
2
  <fieldset>
3
- <ol>
4
- <li><%=f.label :name, :required=>true%>
5
- <%=f.text_field :name,:title => "",:size=>40%>
6
- </li>
7
3
 
4
+ <div class="control-group">
5
+ <%=f.label :name, :required=>true,:class=>"control-label"%>
6
+ <div class="controls">
7
+ <%=f.text_field :name,:title => "",:size=>40%>
8
+ </div>
9
+ </div>
10
+
11
+
12
+ <div class="control-group">
13
+ <%=f.label :base_layout, "Base Layout",:class=>"control-label"%>
14
+ <div class="controls">
15
+ <%=f.text_field :base_layout%>
16
+ </div>
17
+ </div>
18
+ <div class="control-group">
19
+ <%=f.label :content, "Content",:class=>"control-label"%>
20
+ <div class="controls">
21
+ <%=f.text_area :content, :rows => 20,:cols => 110%>
22
+ </div>
23
+ </div>
24
+ <div class="control-group">
25
+ <%=f.label :page_parts, "Page Parts",:class=>"control-label"%>
26
+ <div class="controls">
27
+ <%=f.text_field :page_parts%>
28
+ </div>
29
+ </div>
8
30
 
9
- <li><%=f.label :base_layout, "Base Layout"%>
10
- <%=f.text_field :base_layout%>
11
- </li>
12
- <li><%=f.label :content, "Content"%>
13
- <%=f.text_area :content, :rows => 20,:cols => 110%>
14
- </li>
15
- <li><%=f.label :page_parts, "Page Parts"%>
16
- <%=f.text_field :page_parts%>
17
- </li>
18
31
 
19
32
 
20
- </ol>
21
33
  </fieldset>
22
34
 
23
35
 
@@ -1,11 +1,9 @@
1
1
 
2
- <%=form_for @template,:url => spud_admin_template_path(:id => @template.id),:html=>{:class=>"right_aligned_form"} do |f|%>
2
+ <%=form_for @template,:url => spud_admin_template_path(:id => @template.id),:html=>{:class=>"form-horizontal"} do |f|%>
3
3
  <%=render :partial => "form",:locals => {:f => f}%>
4
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
4
+ <div class="form-actions">
5
+ <%=f.submit "Save Template", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_templates_path,:class => "btn"%>
6
+ </div>
5
7
  <%end%>
6
8
 
7
- <script type="text/javascript">
8
- $('input[type=submit],.close_dialog').button();
9
-
10
- </script>
11
-
9
+
@@ -1,5 +1,5 @@
1
1
  <%=content_for :data_controls do%>
2
- <%=link_to "New Template",new_spud_admin_template_path(),:class => "button",:title => "New Template"%>
2
+ <%=link_to "New Template",new_spud_admin_template_path(),:class => "btn btn-primary",:title => "New Template"%>
3
3
  <%end%>
4
4
  <%=content_for :detail do%>
5
5
  <div class="page_list">
@@ -7,7 +7,7 @@
7
7
  <div class="page_row">
8
8
  <span class="row_meta"><%=link_to template.name,edit_spud_admin_template_path(:id => template.id)%></span>
9
9
 
10
- <span class="edit_controls"><%=link_to "Edit",edit_spud_admin_template_path(:id => template.id), :title => "Edit Template",:class => 'button'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_template_path(:id => template.id),:method => :delete,:class => 'button',:confirm => "Are you sure you want to remove this template?"%></span>
10
+ <span class="edit_controls"><%=link_to "Edit",edit_spud_admin_template_path(:id => template.id), :title => "Edit Template",:class => 'btn'%>&nbsp;&nbsp;<%=link_to "Remove",spud_admin_template_path(:id => template.id),:method => :delete,:class => 'btn btn-danger',:confirm => "Are you sure you want to remove this template?"%></span>
11
11
  <br style="clear:both;"/>
12
12
  </div>
13
13
  <%end%>
@@ -1,13 +1,11 @@
1
1
 
2
2
 
3
3
 
4
- <%=form_for @template,:url => spud_admin_templates_path(),:html=>{:class=>"right_aligned_form"} do |f|%>
4
+ <%=form_for @template,:url => spud_admin_templates_path(),:html=>{:class=>"form-horizontal"} do |f|%>
5
5
  <%=render :partial => "form",:locals => {:f => f}%>
6
- <fieldset class="submit"><%=f.submit%> or <%=link_to "cancel",request.referer%></fieldset>
6
+ <div class="form-actions">
7
+ <%=f.submit "Create Template", :class=>"btn btn-primary"%> or <%=link_to "cancel",spud_admin_templates_path,:class => "btn"%>
8
+ </div>
7
9
  <%end%>
8
10
 
9
- <script type="text/javascript">
10
- $('input[type=submit],.close_dialog').button();
11
-
12
- </script>
13
11
 
data/config/routes.rb CHANGED
@@ -3,6 +3,7 @@ Rails.application.routes.draw do
3
3
  namespace :admin do
4
4
  resources :pages do
5
5
  get :page_parts, :on => :collection
6
+ get :clear, :on => :collection
6
7
  end
7
8
  resources :templates
8
9
 
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = "0.7.2"
3
+ VERSION = "0.8.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-21 00:00:00.000000000 Z
12
+ date: 2012-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70300504706080 !ruby/object:Gem::Requirement
16
+ requirement: &70107591862880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,24 @@ dependencies:
21
21
  version: 3.2.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70300504706080
24
+ version_requirements: *70107591862880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spud_core
27
- requirement: &70300504705560 !ruby/object:Gem::Requirement
27
+ requirement: &70107591862360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ~>
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.8.0
33
+ - - <
31
34
  - !ruby/object:Gem::Version
32
- version: 0.7.2
35
+ version: 0.9.0
33
36
  type: :runtime
34
37
  prerelease: false
35
- version_requirements: *70300504705560
38
+ version_requirements: *70107591862360
36
39
  - !ruby/object:Gem::Dependency
37
40
  name: spud_permalinks
38
- requirement: &70300504705080 !ruby/object:Gem::Requirement
41
+ requirement: &70107591861480 !ruby/object:Gem::Requirement
39
42
  none: false
40
43
  requirements:
41
44
  - - ~>
@@ -43,10 +46,10 @@ dependencies:
43
46
  version: 0.0.1
44
47
  type: :runtime
45
48
  prerelease: false
46
- version_requirements: *70300504705080
49
+ version_requirements: *70107591861480
47
50
  - !ruby/object:Gem::Dependency
48
51
  name: codemirror-rails
49
- requirement: &70300504704700 !ruby/object:Gem::Requirement
52
+ requirement: &70107591861080 !ruby/object:Gem::Requirement
50
53
  none: false
51
54
  requirements:
52
55
  - - ! '>='
@@ -54,10 +57,10 @@ dependencies:
54
57
  version: '0'
55
58
  type: :runtime
56
59
  prerelease: false
57
- version_requirements: *70300504704700
60
+ version_requirements: *70107591861080
58
61
  - !ruby/object:Gem::Dependency
59
62
  name: mysql2
60
- requirement: &70300504704220 !ruby/object:Gem::Requirement
63
+ requirement: &70107591860480 !ruby/object:Gem::Requirement
61
64
  none: false
62
65
  requirements:
63
66
  - - ! '>='
@@ -65,10 +68,10 @@ dependencies:
65
68
  version: '0'
66
69
  type: :development
67
70
  prerelease: false
68
- version_requirements: *70300504704220
71
+ version_requirements: *70107591860480
69
72
  - !ruby/object:Gem::Dependency
70
73
  name: rspec
71
- requirement: &70300504703800 !ruby/object:Gem::Requirement
74
+ requirement: &70107591860060 !ruby/object:Gem::Requirement
72
75
  none: false
73
76
  requirements:
74
77
  - - ! '>='
@@ -76,10 +79,10 @@ dependencies:
76
79
  version: '0'
77
80
  type: :development
78
81
  prerelease: false
79
- version_requirements: *70300504703800
82
+ version_requirements: *70107591860060
80
83
  - !ruby/object:Gem::Dependency
81
84
  name: rspec-rails
82
- requirement: &70300504703380 !ruby/object:Gem::Requirement
85
+ requirement: &70107591859520 !ruby/object:Gem::Requirement
83
86
  none: false
84
87
  requirements:
85
88
  - - ! '>='
@@ -87,10 +90,10 @@ dependencies:
87
90
  version: '0'
88
91
  type: :development
89
92
  prerelease: false
90
- version_requirements: *70300504703380
93
+ version_requirements: *70107591859520
91
94
  - !ruby/object:Gem::Dependency
92
95
  name: factory_girl
93
- requirement: &70300504702860 !ruby/object:Gem::Requirement
96
+ requirement: &70107591858980 !ruby/object:Gem::Requirement
94
97
  none: false
95
98
  requirements:
96
99
  - - =
@@ -98,10 +101,10 @@ dependencies:
98
101
  version: 2.5.0
99
102
  type: :development
100
103
  prerelease: false
101
- version_requirements: *70300504702860
104
+ version_requirements: *70107591858980
102
105
  - !ruby/object:Gem::Dependency
103
106
  name: mocha
104
- requirement: &70300504702360 !ruby/object:Gem::Requirement
107
+ requirement: &70107591858300 !ruby/object:Gem::Requirement
105
108
  none: false
106
109
  requirements:
107
110
  - - =
@@ -109,10 +112,10 @@ dependencies:
109
112
  version: 0.10.3
110
113
  type: :development
111
114
  prerelease: false
112
- version_requirements: *70300504702360
115
+ version_requirements: *70107591858300
113
116
  - !ruby/object:Gem::Dependency
114
117
  name: database_cleaner
115
- requirement: &70300504701880 !ruby/object:Gem::Requirement
118
+ requirement: &70107591857680 !ruby/object:Gem::Requirement
116
119
  none: false
117
120
  requirements:
118
121
  - - =
@@ -120,7 +123,7 @@ dependencies:
120
123
  version: 0.7.1
121
124
  type: :development
122
125
  prerelease: false
123
- version_requirements: *70300504701880
126
+ version_requirements: *70107591857680
124
127
  description: Spud CMS is a full-featured light weight modular cms engine as a part
125
128
  of the spud suite of rails gems. This particular gem comes with page management,
126
129
  administrative dashboard, template management, menu management and more. It is also
@@ -248,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
251
  version: '0'
249
252
  segments:
250
253
  - 0
251
- hash: -1342933116980746766
254
+ hash: -1833908218773550740
252
255
  required_rubygems_version: !ruby/object:Gem::Requirement
253
256
  none: false
254
257
  requirements:
@@ -257,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
260
  version: '0'
258
261
  segments:
259
262
  - 0
260
- hash: -1342933116980746766
263
+ hash: -1833908218773550740
261
264
  requirements: []
262
265
  rubyforge_project:
263
266
  rubygems_version: 1.8.15