beef-pages 0.3.7 → 0.3.8
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 +1 -1
- data/app/controllers/admin/pages_controller.rb +1 -0
- data/app/views/admin/pages/_page.html.erb +4 -3
- data/app/views/admin/pages/index.html.erb +4 -2
- data/beef-pages.gemspec +3 -2
- data/config/routes.rb +2 -1
- data/lib/pages.rb +11 -0
- data/rails/init.rb +4 -0
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.8
|
@@ -2,13 +2,14 @@
|
|
2
2
|
<td class="title"><%= link_to page.title, admin_page_path(page) %></td>
|
3
3
|
<td><%= link_to pluralize(page.children.count, "sub page"), admin_page_pages_path(page) %></td>
|
4
4
|
<td><%= content_status(page) %></td>
|
5
|
-
<td><%= page.author
|
6
|
-
<td><%= page.editor
|
5
|
+
<td><%= page.author %></td>
|
6
|
+
<td><%= page.editor %></td>
|
7
|
+
<td class="date"><%= page.updated_at.to_formatted_s(:short) %></td>
|
8
|
+
<td class="date"><%= page.created_at.to_formatted_s(:short) %></td>
|
7
9
|
<td class="date"><%= page.published_at.to_formatted_s(:short) unless page.published_at.nil? %></td>
|
8
10
|
<td class="date"><%= page.published_to.to_formatted_s(:short) unless page.published_to.nil? %></td>
|
9
11
|
<td class="action"><%= link_to 'Show', page_path(page.permalink), :class => 'show' if page.published? %></td>
|
10
12
|
<td class="action"><%= link_to 'Add page', new_admin_page_page_path(page), :class => 'add', :title => "Add a sub-page under #{page.title}" unless page.lock_level >= Page::LOCK_LEVEL_SUBPAGE %></td>
|
11
|
-
<% logger.debug Page::LOCK_LEVEL_SUBPAGE.inspect %>
|
12
13
|
<td class="action"><%= link_to 'Edit', [:admin, page], :class => 'edit' %></td>
|
13
14
|
<td class="action"><%= link_to('Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => 'delete') unless page.lock_level >= Page::LOCK_LEVEL_DELETE %></td>
|
14
15
|
<td class="action"><%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } unless page.first? %></td>
|
@@ -11,8 +11,6 @@
|
|
11
11
|
<% end %>
|
12
12
|
</ul>
|
13
13
|
|
14
|
-
<%= hidden_field_tag 'form_authenticity_token', "#{form_authenticity_token}" %>
|
15
|
-
|
16
14
|
<table class="featurable">
|
17
15
|
<thead>
|
18
16
|
<tr>
|
@@ -21,6 +19,8 @@
|
|
21
19
|
<th>Status</th>
|
22
20
|
<th>Author</th>
|
23
21
|
<th>Editor</th>
|
22
|
+
<th>Created</th>
|
23
|
+
<th>Updated</th>
|
24
24
|
<th>Published At</th>
|
25
25
|
<th>Published To</th>
|
26
26
|
<th colspan="7">Actions</th>
|
@@ -36,6 +36,8 @@
|
|
36
36
|
<th>Status</th>
|
37
37
|
<th>Author</th>
|
38
38
|
<th>Editor</th>
|
39
|
+
<th>Created</th>
|
40
|
+
<th>Updated</th>
|
39
41
|
<th>Published At</th>
|
40
42
|
<th>Published To</th>
|
41
43
|
<th colspan="7">Actions</th>
|
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.
|
8
|
+
s.version = "0.3.8"
|
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{2009-
|
12
|
+
s.date = %q{2009-12-22}
|
13
13
|
s.email = %q{steve@wearebeef.co.uk}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
"generators/pages_migration/pages_migration_generator.rb",
|
39
39
|
"generators/pages_migration/templates/migration.rb",
|
40
40
|
"lib/pages.rb",
|
41
|
+
"rails/init.rb",
|
41
42
|
"test/pages_test.rb",
|
42
43
|
"test/test_helper.rb"
|
43
44
|
]
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
ActionController::Routing::Routes.draw do |map|
|
2
|
-
map.
|
2
|
+
map.page_permalink 'pages/:id.:format', :controller => 'pages', :action => 'show'
|
3
|
+
map.preview_pages 'pages/preview.:format', :controller => 'pages', :action => 'preview'
|
3
4
|
map.namespace(:admin) do |admin|
|
4
5
|
admin.resources :pages, :has_many => :pages, :collection => {:preview => :post}, :member => {:preview => :put, :move_up => :get, :move_down => :get}
|
5
6
|
end
|
data/lib/pages.rb
CHANGED
@@ -14,5 +14,16 @@ module Beef
|
|
14
14
|
templates
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
module UrlHelper
|
19
|
+
def page_path(page, options = {})
|
20
|
+
permalink = page.is_a?( Page ) ? page.permalink : page.to_s
|
21
|
+
page_permalink_path(permalink,options)
|
22
|
+
end
|
23
|
+
|
24
|
+
def page_url(page, options = {})
|
25
|
+
page_path(page, options.merge(:only_path => false))
|
26
|
+
end
|
27
|
+
end
|
17
28
|
end
|
18
29
|
end
|
data/rails/init.rb
ADDED
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.
|
4
|
+
version: 0.3.8
|
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-
|
12
|
+
date: 2009-12-22 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- generators/pages_migration/pages_migration_generator.rb
|
46
46
|
- generators/pages_migration/templates/migration.rb
|
47
47
|
- lib/pages.rb
|
48
|
+
- rails/init.rb
|
48
49
|
- test/pages_test.rb
|
49
50
|
- test/test_helper.rb
|
50
51
|
has_rdoc: true
|