cartoonist-comics 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/comic.rb +6 -1
- data/app/views/layouts/comic.html.erb +10 -0
- metadata +5 -5
data/app/models/comic.rb
CHANGED
|
@@ -4,11 +4,16 @@ class Comic < ActiveRecord::Base
|
|
|
4
4
|
entity_type :comic
|
|
5
5
|
entity_global_url "/comic"
|
|
6
6
|
entity_url &:url
|
|
7
|
+
entity_preview_url &:preview_url
|
|
7
8
|
entity_edit_url &:edit_url
|
|
8
9
|
entity_description &:title
|
|
9
10
|
attr_accessible :number, :posted_at, :title, :description, :scene_description, :dialogue, :title_text, :database_file_id, :database_file, :locked
|
|
10
11
|
belongs_to :database_file
|
|
11
12
|
|
|
13
|
+
def preview_url
|
|
14
|
+
"/admin/comic/#{number}/preview"
|
|
15
|
+
end
|
|
16
|
+
|
|
12
17
|
def url
|
|
13
18
|
"/comic/#{number}"
|
|
14
19
|
end
|
|
@@ -90,7 +95,7 @@ class Comic < ActiveRecord::Base
|
|
|
90
95
|
comic.dialogue = params[:dialogue]
|
|
91
96
|
comic.title_text = params[:title_text]
|
|
92
97
|
comic.locked = true
|
|
93
|
-
comic.database_file = DatabaseFile.create_from_param params[:image], :allowed_extensions => ["png"]
|
|
98
|
+
comic.database_file = DatabaseFile.create_from_param params[:image], :allowed_extensions => ["png"] if params[:image]
|
|
94
99
|
comic.save!
|
|
95
100
|
comic
|
|
96
101
|
end
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
<% end %>
|
|
13
13
|
|
|
14
14
|
<% content_for :content do %>
|
|
15
|
+
<% Cartoonist::Entity.hooks_with(:show_entity_before_partial).each do |hook| %>
|
|
16
|
+
<%= render :partial => hook.show_entity_before_partial, :locals => { :entity => @comic } %>
|
|
17
|
+
<hr />
|
|
18
|
+
<% end %>
|
|
19
|
+
|
|
15
20
|
<div class="comic-page">
|
|
16
21
|
<div class="nav-container top-nav">
|
|
17
22
|
<div class="nav">
|
|
@@ -63,6 +68,11 @@
|
|
|
63
68
|
</div>
|
|
64
69
|
</div>
|
|
65
70
|
</div>
|
|
71
|
+
|
|
72
|
+
<% Cartoonist::Entity.hooks_with(:show_entity_after_partial).each do |hook| %>
|
|
73
|
+
<%= render :partial => hook.show_entity_after_partial, :locals => { :entity => @comic } %>
|
|
74
|
+
<hr />
|
|
75
|
+
<% end %>
|
|
66
76
|
<% end %>
|
|
67
77
|
|
|
68
78
|
<% content_for :post_date_content do %>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cartoonist-comics
|
|
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: &18959360 !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: *18959360
|
|
25
25
|
description: This core plugin for Cartoonist adds comics.
|
|
26
26
|
email: reasonnumber@gmail.com
|
|
27
27
|
executables: []
|