drg_blog_news_forum 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/forms/dc_blog.yml +4 -0
- data/app/forms/dc_news.yml +4 -0
- data/app/helpers/dc_blog_renderer.rb +4 -2
- data/app/helpers/dc_news_renderer.rb +4 -2
- data/app/views/dc_blog/_last_blogs.erb +1 -1
- data/app/views/dc_news/_last_news.erb +2 -2
- data/lib/drg_blog_news_forum/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd8b7a0e95a2859524357b74e8f8b15d9861d3d9
|
4
|
+
data.tar.gz: 0d1be920499ae56bfd393700add73aa37116fcdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77a2b073594ec416efa51f45fc035aec6cdb605867b344c6f4d7cb606d07b70ee55437e0d93824e23d849bee3f9d4efe6a2ae951867a6737ee2ae11dd1486648
|
7
|
+
data.tar.gz: 129e7627bff4b50aa2b55f4bf59e742155b038984bf280ce416b3da1eafec0af133ac5b52d3f1cd569247d2d1f9de3b0f9700c1f364eabe6eef0782760fb7473
|
data/app/forms/dc_blog.yml
CHANGED
data/app/forms/dc_news.yml
CHANGED
@@ -65,10 +65,12 @@ end
|
|
65
65
|
def last_blogs
|
66
66
|
limit = @opts[:limit] || 3
|
67
67
|
entries = DcBlog.only(:created_by_name, :link, :subject, :created_at)
|
68
|
-
.where(active: true, :created_at.
|
68
|
+
.where(active: true, :created_at.lt => 2.months.ago)
|
69
69
|
.order_by(created_at: -1).limit(limit).to_a
|
70
70
|
if entries.size > 0
|
71
|
-
|
71
|
+
# for document link.
|
72
|
+
path = @opts[:path] || 'blog'
|
73
|
+
@parent.render partial: 'dc_blog/last_blogs', formats: [:html], locals: { entries: entries, path: path }
|
72
74
|
else
|
73
75
|
''
|
74
76
|
end
|
@@ -56,10 +56,12 @@ end
|
|
56
56
|
def last_news
|
57
57
|
limit = @opts[:limit] || 3
|
58
58
|
entries = DcNews.only(:created_by_name, :link, :subject, :created_at)
|
59
|
-
.where(active: true, :created_at.
|
59
|
+
.where(active: true, :created_at.lt => 2.months.ago)
|
60
60
|
.order_by(created_at: -1).limit(limit).to_a
|
61
61
|
if entries.size > 0
|
62
|
-
|
62
|
+
# for document link.
|
63
|
+
path = @opts[:path] || 'news'
|
64
|
+
@parent.render partial: 'dc_news/last_news', formats: [:html], locals: { entries: entries, path: path }
|
63
65
|
else
|
64
66
|
''
|
65
67
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% for entry in entries %>
|
5
5
|
<div class="entry">
|
6
6
|
<span class="date"><%= dc_pretty_date(entry.created_at) %></span>
|
7
|
-
<span class="title"><%= link_to( entry.subject, {
|
7
|
+
<span class="title"><%= link_to( entry.subject, "/#{path}/#{entry.link}" )%></span>
|
8
8
|
</div>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% for entry in entries %>
|
5
5
|
<div class="entry">
|
6
6
|
<span class="date"><%= dc_pretty_date(entry.created_at) %></span>
|
7
|
-
<span class="title"><%= link_to( entry.subject, {
|
7
|
+
<span class="title"><%= link_to( entry.subject, "/#{path}/#{entry.link}" )%></span>
|
8
8
|
</div>
|
9
9
|
<% end %>
|
10
|
-
</div>
|
10
|
+
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drg_blog_news_forum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|