refinerycms-white_papers 1.0 → 1.0.1
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/white_paper.rb
CHANGED
|
@@ -4,5 +4,11 @@ class WhitePaper < ActiveRecord::Base
|
|
|
4
4
|
|
|
5
5
|
validates :title, :presence => true, :uniqueness => true
|
|
6
6
|
|
|
7
|
+
default_scope :order => "publish_date DESC"
|
|
8
|
+
|
|
7
9
|
belongs_to :paper, :class_name => 'Resource'
|
|
10
|
+
|
|
11
|
+
def not_published? # has the published date not yet arrived?
|
|
12
|
+
publish_date > Time.now
|
|
13
|
+
end
|
|
8
14
|
end
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
<%= f.select :content_level, [["Premium", 10],["Complimentary", 5],["Anonymous", 0]] -%>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
|
+
<div class='field'>
|
|
33
|
+
<%= f.label :publish_date -%>
|
|
34
|
+
<%= f.date_select :summary -%>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
32
37
|
<div class='field'>
|
|
33
38
|
<%= f.label :summary -%>
|
|
34
39
|
<%= f.text_area :summary, :rows => 20, :class => 'wymeditor widest' -%>
|
metadata
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: refinerycms-white_papers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
|
|
9
|
+
- 1
|
|
10
|
+
version: 1.0.1
|
|
10
11
|
platform: ruby
|
|
11
|
-
authors:
|
|
12
|
-
|
|
12
|
+
authors:
|
|
13
|
+
- David Christiansen
|
|
13
14
|
autorequire:
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
@@ -19,7 +20,7 @@ default_executable:
|
|
|
19
20
|
dependencies: []
|
|
20
21
|
|
|
21
22
|
description: Ruby on Rails White Papers engine for Refinery CMS
|
|
22
|
-
email:
|
|
23
|
+
email: dave@developertown.com
|
|
23
24
|
executables: []
|
|
24
25
|
|
|
25
26
|
extensions: []
|
|
@@ -47,7 +48,7 @@ files:
|
|
|
47
48
|
- app/views/white_papers/index.html.haml
|
|
48
49
|
- app/views/white_papers/show.html.haml
|
|
49
50
|
has_rdoc: true
|
|
50
|
-
homepage:
|
|
51
|
+
homepage: http://github.com/davidray/white_papers
|
|
51
52
|
licenses: []
|
|
52
53
|
|
|
53
54
|
post_install_message:
|