brightcontent-pages 2.0.27 → 2.0.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brightcontent-pages (2.0.27)
4
+ brightcontent-pages (2.0.28)
5
5
  awesome_nested_set
6
- brightcontent-attachments (= 2.0.27)
7
- brightcontent-core (= 2.0.27)
6
+ brightcontent-attachments (= 2.0.28)
7
+ brightcontent-core (= 2.0.28)
8
8
  the_sortable_tree (~> 2.3.0)
9
9
 
10
10
  PATH
11
11
  remote: ../attachments
12
12
  specs:
13
- brightcontent-attachments (2.0.27)
14
- brightcontent-core (= 2.0.27)
13
+ brightcontent-attachments (2.0.28)
14
+ brightcontent-core (= 2.0.28)
15
15
  jquery-fileupload-rails
16
16
  paperclip
17
17
 
18
18
  PATH
19
19
  remote: ../core
20
20
  specs:
21
- brightcontent-core (2.0.27)
21
+ brightcontent-core (2.0.28)
22
22
  bcrypt-ruby
23
23
  bootstrap-wysihtml5-rails
24
24
  has_scope
@@ -3,8 +3,10 @@ module Brightcontent
3
3
  include TheSortableTreeController::Rebuild
4
4
  helper TheSortableTree::Engine.helpers
5
5
 
6
- per_page 99999
7
-
6
+ def self.inherited(subclass)
7
+ subclass.class_eval { per_page 0 }
8
+ super
9
+ end
8
10
 
9
11
  def form_fields
10
12
  %w{name parent_id hidden body attachments}
@@ -1,4 +1,5 @@
1
1
  require_dependency "brightcontent/application_controller"
2
+ require_dependency "brightcontent/page_base_controller"
2
3
 
3
4
  module Brightcontent
4
5
  class PagesController < PageBaseController
@@ -8,6 +8,7 @@ module Brightcontent
8
8
  include TheSortableTree::Scopes
9
9
  validates_presence_of :name
10
10
  after_save :update_slug
11
+ after_move :update_slug
11
12
  end
12
13
 
13
14
  module ClassMethods
@@ -1,3 +1,10 @@
1
- <%= content_tag("ol", class:"sortable_tree", :"data-rebuild_url" => rebuild_pages_url, :"data-max_levels" => 5 ) do -%>
2
- <%= sortable_tree @pages, title:"name" -%>
3
- <% end -%>
1
+ <div id="overview">
2
+
3
+ <%= link_to "Create new #{resource_instance_name.to_s.humanize}", polymorphic_url(resource_class, action: :new), class: "btn btn-primary btn-right" %>
4
+ <h1><%= resource_collection_name.to_s.humanize %></h1>
5
+ <%= render "index_top" %>
6
+
7
+ <%= content_tag("ol", class:"sortable_tree", :"data-rebuild_url" => rebuild_pages_url, :"data-max_levels" => 5 ) do -%>
8
+ <%= sortable_tree @pages, title:"name" -%>
9
+ <% end -%>
10
+ </div>
@@ -20,4 +20,10 @@ feature "Pages index" do
20
20
  page.should have_content "successfully"
21
21
  end
22
22
 
23
+ scenario "does not paginate" do
24
+ 40.times { create(:page) }
25
+ click_link "Pages"
26
+ page.should have_css(".sortable_tree li", :count => 41)
27
+ end
28
+
23
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightcontent-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.27
4
+ version: 2.0.28
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-26 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: brightcontent-core
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 2.0.27
21
+ version: 2.0.28
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.0.27
29
+ version: 2.0.28
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: brightcontent-attachments
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 2.0.27
37
+ version: 2.0.28
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 2.0.27
45
+ version: 2.0.28
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: awesome_nested_set
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -251,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
251
251
  version: '0'
252
252
  segments:
253
253
  - 0
254
- hash: 1181802481775358288
254
+ hash: 2314282457410771759
255
255
  required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  none: false
257
257
  requirements:
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  version: '0'
261
261
  segments:
262
262
  - 0
263
- hash: 1181802481775358288
263
+ hash: 2314282457410771759
264
264
  requirements: []
265
265
  rubyforge_project:
266
266
  rubygems_version: 1.8.24