drg_blog_news_forum 0.5.5.2 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/dc_blog_renderer.rb +12 -1
- data/app/helpers/dc_news_renderer.rb +11 -1
- data/app/views/dc_blog/_blog.html.erb +2 -1
- data/app/views/dc_blog/_blogers.html.erb +2 -0
- data/app/views/dc_blog/_entries.html.erb +2 -1
- data/app/views/dc_blog/_entry.html.erb +1 -1
- data/app/views/dc_blog/_last_blogs.erb +2 -0
- data/app/views/dc_news/_entries.html.erb +3 -1
- data/app/views/dc_news/_entry.html.erb +1 -0
- data/app/views/dc_news/_last_news.erb +2 -0
- data/app/views/dc_news/_news.html.erb +3 -1
- data/lib/drg_blog_news_forum/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96e3c79da9db16b728494571bec04f1e52ab7519
|
4
|
+
data.tar.gz: 4cf81959a7a7a52693b42027e534fa5bbb130841
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8131604c128ed5c223cb0ef076fabcf64204401be622d33a1798531952d82fd563a367c40c1fecffe45ba44ee4ceb3fa85c723b578f48d62d547c459cca4a22
|
7
|
+
data.tar.gz: 377dc01dfde9e364094991c296fde50c771b3d69bed7836992c410c213620824df2913e83bb221680db93e742e5c3615b21d69dcce5e3a96f11e6b98a99fb9bf
|
@@ -65,8 +65,9 @@ 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
|
68
|
+
.where(active: true) #, :created_at.gt => 6.months.ago)
|
69
69
|
.order_by(created_at: -1).limit(limit).to_a
|
70
|
+
=begin
|
70
71
|
if entries.size > 0
|
71
72
|
# for document link.
|
72
73
|
path = @opts[:path] || 'blog'
|
@@ -74,6 +75,16 @@ def last_blogs
|
|
74
75
|
else
|
75
76
|
''
|
76
77
|
end
|
78
|
+
=end
|
79
|
+
entries.inject('') do |result, element|
|
80
|
+
result << @parent.link_to("/blog/#{element.link}") do
|
81
|
+
%Q[
|
82
|
+
<span class="date">#{@parent.dc_pretty_date(element.created_at)} : </span>
|
83
|
+
<span class="title">#{element.subject}</span><br><br>
|
84
|
+
].html_safe
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
77
88
|
end
|
78
89
|
|
79
90
|
|
@@ -56,8 +56,9 @@ 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
|
59
|
+
.where(active: true) #, :created_at.gt => 6.months.ago)
|
60
60
|
.order_by(created_at: -1).limit(limit).to_a
|
61
|
+
=begin
|
61
62
|
if entries.size > 0
|
62
63
|
# for document link.
|
63
64
|
path = @opts[:path] || 'news'
|
@@ -65,6 +66,15 @@ def last_news
|
|
65
66
|
else
|
66
67
|
''
|
67
68
|
end
|
69
|
+
=end
|
70
|
+
entries.inject('') do |result, element|
|
71
|
+
result << @parent.link_to("/news/#{element.link}") do
|
72
|
+
%Q[
|
73
|
+
<span class="date">#{@parent.dc_pretty_date(element.created_at)} : </span>
|
74
|
+
<span class="title">#{element.subject}</span><br><br>
|
75
|
+
].html_safe
|
76
|
+
end
|
77
|
+
end
|
68
78
|
end
|
69
79
|
|
70
80
|
########################################################################
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<div class="wrap">
|
1
2
|
<% if session[:edit_mode] > 1 %>
|
2
3
|
<%= dc_link_for_create(controller: 'cmsedit', table: 'dc_blog', title: 'dc_blog.new_entry' ) %>
|
3
4
|
<% end %>
|
@@ -10,3 +11,4 @@
|
|
10
11
|
<%= link_to( bloger, { path: 'blog', name: bloger} )%>
|
11
12
|
</div>
|
12
13
|
<% end %>
|
14
|
+
</div>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
<div class="blog-title">
|
2
3
|
<h1><%= params[:name] %>, <%= t('dc_blog.my_blog') %></h1>
|
3
4
|
</div>
|
@@ -12,6 +13,6 @@
|
|
12
13
|
<%= link_to( entry.subject,
|
13
14
|
{ path: 'blog', name: params[:name], link: entry.link } )%>
|
14
15
|
|
15
|
-
<div class="blog-date"><
|
16
|
+
<div class="blog-date"><h4><%= dc_pretty_date(entry.created_at) %></h4></div>
|
16
17
|
</div>
|
17
18
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<div class="blog-subject"><h1><%= entry.subject %></h1></div>
|
9
|
-
<div class="blog-date"><
|
9
|
+
<div class="blog-date"><h4><%= t('dc_blog.published') + ' ' + dc_pretty_date(entry.created_at) %></h4></div>
|
10
10
|
|
11
11
|
<div class="blog-body"><%= entry.body.html_safe %></div>
|
12
12
|
<div class="social-sites"><%= social_sites %></div>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
<div class="news-title">
|
2
3
|
<h1><%= t('dc_news.news') %></h1>
|
3
4
|
</div>
|
@@ -7,7 +8,8 @@
|
|
7
8
|
<% for entry in entries %>
|
8
9
|
|
9
10
|
<div class="news-entry">
|
10
|
-
<
|
11
|
+
<h4><%= link_to( entry.subject, { path: 'news', link: entry.link } )%></h4>
|
11
12
|
<%= dc_pretty_date(entry.created_at) %>
|
12
13
|
</div>
|
13
14
|
<% end %>
|
15
|
+
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.5.1
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: 'DRG CMS: Blog, news and forum plugin for DRG CMS'
|