beef-pages 0.3.12 → 0.3.13

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.12
1
+ 0.3.13
@@ -36,6 +36,11 @@
36
36
  </p>
37
37
  <% end %>
38
38
 
39
+ <p>
40
+ <%= f.label :body, 'Body*' %><br/>
41
+ <%= f.text_area 'body', :class => 'editor' %>
42
+ </p>
43
+
39
44
  <p>
40
45
  <%= f.label :description, "Description for search engines*" %><br/>
41
46
  <%= f.text_area :description, "rows" => 4 %>
@@ -58,11 +63,6 @@
58
63
  </p>
59
64
  <% end %>
60
65
 
61
- <p>
62
- <%= f.label :body, 'Body*' %><br/>
63
- <%= f.text_area 'body', :class => 'editor' %>
64
- </p>
65
-
66
66
  <%= publish_select(f) %>
67
67
 
68
68
  <p class="submission">
@@ -0,0 +1,9 @@
1
+ <li>
2
+ <span><%= link_to_unless_current h(page_nav.title), page_path(page_nav.permalink) %></span>
3
+
4
+ <% unless page_nav.children.published.count == 0 %>
5
+ <ul>
6
+ <%= render :partial => 'pages/page_nav', :collection => page_nav.children.published %>
7
+ </ul>
8
+ <% end%>
9
+ </li>
data/beef-pages.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beef-pages}
8
- s.version = "0.3.12"
8
+ s.version = "0.3.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve England"]
12
- s.date = %q{2010-02-03}
12
+ s.date = %q{2010-02-18}
13
13
  s.email = %q{steve@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -30,11 +30,11 @@ Gem::Specification.new do |s|
30
30
  "app/views/admin/pages/index.html.erb",
31
31
  "app/views/admin/pages/preview.rjs",
32
32
  "app/views/admin/pages/show.html.erb",
33
- "app/views/pages/_naviagtion.html.erb",
33
+ "app/views/pages/_page_nav.html.erb",
34
34
  "beef-pages.gemspec",
35
35
  "config/routes.rb",
36
- "generators/page_tempate/page_template_generator.rb",
37
- "generators/page_tempate/templates/default.html.erb",
36
+ "generators/page_template/page_template_generator.rb",
37
+ "generators/page_template/templates/default.html.erb",
38
38
  "generators/pages_migration/pages_migration_generator.rb",
39
39
  "generators/pages_migration/templates/migration.rb",
40
40
  "lib/pages.rb",
@@ -0,0 +1,31 @@
1
+ <% @page_id = @page.root.permalink if @page %>
2
+
3
+ <h1><%= link_to_unless_current h(@page.root.title), page_path(@page.root.permalink) %></h1>
4
+
5
+ <div id="main-content">
6
+ <h2><%= @page.title %></h2>
7
+
8
+ <%= @page.body %>
9
+
10
+ <h3 class="hidden">Document Download</h3>
11
+ <%= documents @page.assets %>
12
+
13
+ <% if @page.assets.images.empty? %>
14
+ <% else -%>
15
+ <h3 class="hidden">Gallery</h3>
16
+ <div id="gallery">
17
+ <div class="image-gallery">
18
+ <%= gallery @page.assets %>
19
+ </div>
20
+ </div>
21
+ <% end -%>
22
+
23
+ </div><!-- eo: main -->
24
+
25
+ <div id="supporting-content">
26
+ <div id="page-nav">
27
+ <ul class="sub-page-nav">
28
+ <%= render :partial => 'page_nav', :collection => @page.root.children.published %>
29
+ </ul>
30
+ </div>
31
+ </div>
data/lib/pages.rb CHANGED
@@ -3,14 +3,17 @@ module Beef
3
3
  module HelperMethods
4
4
  def get_template_names
5
5
  templates = []
6
+
7
+ # get all files that would be useable templates from the templates folder
8
+ # templates that start with an underscore are considered hidden
6
9
  Dir.glob("#{RAILS_ROOT}/app/views/pages/templates/*") do |f|
7
- match = /\/([^\/]+)\.html\.erb$/.match(f)
10
+ match = /\/([^_][^\/]+)\.html\.erb$/.match(f)
8
11
  templates << match[1] unless match.nil?
9
12
  end
10
13
  # Move default to top if it exists
11
14
  if default = templates.delete('default')
12
15
  templates.insert(0, default)
13
- end
16
+ end
14
17
  templates
15
18
  end
16
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-03 00:00:00 +00:00
12
+ date: 2010-02-18 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -37,11 +37,11 @@ files:
37
37
  - app/views/admin/pages/index.html.erb
38
38
  - app/views/admin/pages/preview.rjs
39
39
  - app/views/admin/pages/show.html.erb
40
- - app/views/pages/_naviagtion.html.erb
40
+ - app/views/pages/_page_nav.html.erb
41
41
  - beef-pages.gemspec
42
42
  - config/routes.rb
43
- - generators/page_tempate/page_template_generator.rb
44
- - generators/page_tempate/templates/default.html.erb
43
+ - generators/page_template/page_template_generator.rb
44
+ - generators/page_template/templates/default.html.erb
45
45
  - generators/pages_migration/pages_migration_generator.rb
46
46
  - generators/pages_migration/templates/migration.rb
47
47
  - lib/pages.rb
@@ -1,23 +0,0 @@
1
- <ul id="nav-secondary">
2
-
3
- <li><%= link_to @page.root.title, page_path(@page.root.permalink) %></li><ul>
4
-
5
-
6
-
7
- <% for sibling in @page.root.children.published %>
8
- <li<%= ' class="active"' if sibling == @page %>><%= link_to sibling.title, page_path(sibling.permalink) %>
9
- <% if sibling == @page && sibling.children.published.count > 0 %>
10
- <ul>
11
- <% for child in sibling.children.published %>
12
- <li><%= link_to child.title, page_path(child.permalink) %></li>
13
- <% end %>
14
- </ul>
15
- <% end %></li>
16
- <% end %>
17
-
18
-
19
-
20
- </ul>
21
-
22
-
23
- </ul>
@@ -1,11 +0,0 @@
1
- <div id="main-content">
2
- <h1><%= @page.title %></h1>
3
-
4
- <%= @page.body %>
5
- </div><!-- eo: main -->
6
-
7
- <ul class="page-nav">
8
- <% for page in @page.root? ? @page.children : @page.self_and_siblings %>
9
- <li><%= link_to_unless_current h(page.title), page_path(page.permalink) %></li>
10
- <% end -%>
11
- </ul>