cartoonist-pages 0.0.10 → 0.0.11
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/app/models/page.rb +5 -0
- data/app/views/layouts/page.html.erb +10 -0
- metadata +5 -5
data/app/models/page.rb
CHANGED
@@ -3,6 +3,7 @@ class Page < ActiveRecord::Base
|
|
3
3
|
include Entity
|
4
4
|
entity_type :page
|
5
5
|
entity_url &:url
|
6
|
+
entity_preview_url &:preview_url
|
6
7
|
entity_edit_url &:edit_url
|
7
8
|
entity_description &:title
|
8
9
|
attr_accessible :title, :path, :posted_at, :content, :locked, :comments, :in_sitemap
|
@@ -17,6 +18,10 @@ class Page < ActiveRecord::Base
|
|
17
18
|
"/#{path}"
|
18
19
|
end
|
19
20
|
|
21
|
+
def preview_url
|
22
|
+
"/admin/page/#{path}/preview"
|
23
|
+
end
|
24
|
+
|
20
25
|
def edit_url
|
21
26
|
"/admin/page/#{id}/edit"
|
22
27
|
end
|
@@ -1,11 +1,21 @@
|
|
1
1
|
<% content_for :content_class, "page-content" %>
|
2
2
|
|
3
3
|
<% content_for :content do %>
|
4
|
+
<% Cartoonist::Entity.hooks_with(:show_entity_before_partial).each do |hook| %>
|
5
|
+
<%= render :partial => hook.show_entity_before_partial, :locals => { :entity => @page } %>
|
6
|
+
<hr />
|
7
|
+
<% end %>
|
8
|
+
|
4
9
|
<div class="page">
|
5
10
|
<h1><%= content_for?(:page_title) ? yield(:page_title) : yield(:title) %></h1>
|
6
11
|
|
7
12
|
<%= yield %>
|
8
13
|
</div>
|
14
|
+
|
15
|
+
<% Cartoonist::Entity.hooks_with(:show_entity_after_partial).each do |hook| %>
|
16
|
+
<%= render :partial => hook.show_entity_after_partial, :locals => { :entity => @page } %>
|
17
|
+
<hr />
|
18
|
+
<% end %>
|
9
19
|
<% end %>
|
10
20
|
|
11
21
|
<% content_for :admin_content do %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cartoonist-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,19 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cartoonist
|
16
|
-
requirement: &
|
16
|
+
requirement: &21244080 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.0.
|
21
|
+
version: 0.0.11
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21244080
|
25
25
|
description: This core plugin for Cartoonist adds arbitrary pages.
|
26
26
|
email: reasonnumber@gmail.com
|
27
27
|
executables: []
|