beef-pages 0.2.0 → 0.2.2

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.2.0
1
+ 0.2.2
@@ -43,7 +43,7 @@ class Admin::PagesController < Admin::BaseController
43
43
  if @page.save
44
44
  flash[:notice] = 'Page was successfully created.'
45
45
  format.html {
46
- if params[:page_id].nil?
46
+ if @page.parent.nil?
47
47
  redirect_to(admin_pages_url)
48
48
  else
49
49
  redirect_to(admin_page_pages_url(@page.parent))
@@ -1,5 +1,5 @@
1
1
  <tr id="pages-<%= page.id %>">
2
- <td class="title"><%= link_to page.title, admin_page_page_path(page) %></td>
2
+ <td class="title"><%= link_to page.title, admin_page_pages_path(page) %></td>
3
3
  <td><%= content_status(page) %></td>
4
4
  <td><%= page.author %><br />(<%= page.created_at.to_formatted_s(:short) %>)</td>
5
5
  <td><%= page.editor %><%= "<br />(#{page.updated_at.to_formatted_s(:short)})" unless page.updated_at.nil? %></td>
@@ -13,5 +13,4 @@
13
13
  <%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } if current_user.admin? && !page.first? %>
14
14
  <%= link_to 'down', move_down_admin_page_path(page), { :class => 'page_down' } if current_user.admin? && !page.last? %>
15
15
  </td>
16
- </tr>
17
- <%= render :partial => page.children, :locals => { :level => level + 1 } %>
16
+ </tr>
@@ -0,0 +1,12 @@
1
+ <ul id="nav-secondary">
2
+ <% for sibling in @page.self_and_siblings %>
3
+ <li<%= ' class="active"' if sibling == @page %>><%= link_to sibling.title, page_path(sibling.permalink) %>
4
+ <% if sibling == @page && sibling.children.count >0 %>
5
+ <ul>
6
+ <% for child in sibling.children %>
7
+ <li><%= link_to child.title, page_path(child.permalink) %></li>
8
+ <% end %>
9
+ </ul>
10
+ <% end %></li>
11
+ <% end %>
12
+ </ul>
data/config/routes.rb CHANGED
@@ -3,5 +3,4 @@ ActionController::Routing::Routes.draw do |map|
3
3
  map.namespace(:admin) do |admin|
4
4
  admin.resources :pages, :has_many => :pages, :collection => {:preview => :post}, :member => {:preview => :put, :feature => [:get, :put], :move_up => :get, :move_down => :get}
5
5
  end
6
- map.page ':id', :controller => 'pages', :action => 'show'
7
6
  end
data/pages.gemspec CHANGED
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{pages}
5
- s.version = "0.2.0"
8
+ s.version = "0.2.2"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Steve England"]
9
- s.date = %q{2009-08-27}
12
+ s.date = %q{2009-08-28}
10
13
  s.email = %q{steve@wearebeef.co.uk}
11
14
  s.extra_rdoc_files = [
12
15
  "LICENSE",
@@ -28,6 +31,7 @@ Gem::Specification.new do |s|
28
31
  "app/views/admin/pages/index.html.erb",
29
32
  "app/views/admin/pages/preview.rjs",
30
33
  "app/views/admin/pages/show.html.erb",
34
+ "app/views/pages/_naviagtion.html.erb",
31
35
  "config/routes.rb",
32
36
  "generators/page_tempate/page_template_generator.rb",
33
37
  "generators/page_tempate/templates/default.html.erb",
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.2.0
4
+ version: 0.2.2
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: 2009-08-27 00:00:00 -07:00
12
+ date: 2009-08-28 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -38,6 +38,7 @@ files:
38
38
  - app/views/admin/pages/index.html.erb
39
39
  - app/views/admin/pages/preview.rjs
40
40
  - app/views/admin/pages/show.html.erb
41
+ - app/views/pages/_naviagtion.html.erb
41
42
  - config/routes.rb
42
43
  - generators/page_tempate/page_template_generator.rb
43
44
  - generators/page_tempate/templates/default.html.erb
@@ -49,7 +50,6 @@ files:
49
50
  - test/test_helper.rb
50
51
  has_rdoc: false
51
52
  homepage: http://github.com/stengland/pages
52
- licenses:
53
53
  post_install_message:
54
54
  rdoc_options:
55
55
  - --charset=UTF-8
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements: []
71
71
 
72
72
  rubyforge_project:
73
- rubygems_version: 1.3.5
73
+ rubygems_version: 1.2.0
74
74
  signing_key:
75
75
  specification_version: 3
76
76
  summary: Pages engine