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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4aeccbb4208ecd7b1a890680fe8086724371c50
4
- data.tar.gz: 9b0ef1e69fd3ef3c5980abc0617276f65e4a12ab
3
+ metadata.gz: 96e3c79da9db16b728494571bec04f1e52ab7519
4
+ data.tar.gz: 4cf81959a7a7a52693b42027e534fa5bbb130841
5
5
  SHA512:
6
- metadata.gz: e9b24236e3936f07f3f12230462af801a424b6b44670eb85a7bf14f0b0814f660c70c84a06d497c2eaf14e29c7a75b82fcedd752d1819f2c282a8d78cb3d69b8
7
- data.tar.gz: 95fca9a063f545e12a130029ae8b8b0587c48abef97d0cabe934a4d5e16e04eb525a8536c7c0088a380c886d59f70a8464c14d45206385affc453b9b42ee17c2
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, :created_at.gt => 6.months.ago)
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, :created_at.gt => 6.months.ago)
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
+
1
2
  <div class="blog-title">
2
3
  <%= title %>
3
4
  </div>
@@ -21,4 +22,4 @@
21
22
  <iframe id="iframe_edit" name="iframe_edit" scrolling="no"></iframe>
22
23
  <% else %>
23
24
  <br><br><br>This blog has no posts. Yet ;-)
24
- <% end %>
25
+ <% end %>
@@ -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"><h3><%= dc_pretty_date(entry.created_at) %></h3></div>
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"><h3><%= t('dc_blog.published') + ' ' + dc_pretty_date(entry.created_at) %></h3></div>
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
+ <div class="wrap">
1
2
  <div id="last-blogs">
2
3
  <h3><%= t('dc_blog.last_blogs') %></h3>
3
4
 
@@ -7,4 +8,5 @@
7
8
  <span class="title"><%= link_to( entry.subject, "/#{path}/#{entry.link}" )%></span>
8
9
  </div>
9
10
  <% end %>
11
+ </div>
10
12
  </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
- <h3><%= link_to( entry.subject, { path: 'news', link: entry.link } )%></h3>
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
+
@@ -20,3 +20,4 @@
20
20
  </div>
21
21
 
22
22
  <iframe id="iframe_edit" name="iframe_edit" scrolling="no"></iframe>
23
+
@@ -1,3 +1,4 @@
1
+
1
2
  <div id="last-news">
2
3
  <h3><%= t('dc_news.last_news') %></h3>
3
4
 
@@ -8,3 +9,4 @@
8
9
  </div>
9
10
  <% end %>
10
11
  </div>
12
+
@@ -1,3 +1,4 @@
1
+
1
2
  <div class="news-title">
2
3
  <%= title %>
3
4
  </div>
@@ -21,4 +22,5 @@
21
22
  <iframe id="iframe_edit" name="iframe_edit" scrolling="no"></iframe>
22
23
  <% else %>
23
24
  <br><br><br>Sorry no news. Yet ;-)
24
- <% end %>
25
+ <% end %>
26
+
@@ -1,3 +1,3 @@
1
1
  module DrgBlogNewsForum
2
- VERSION = "0.5.5.2"
2
+ VERSION = "0.5.6"
3
3
  end
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.5.2
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: 2016-01-24 00:00:00.000000000 Z
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.2.5
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'