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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f64cf1a5e78f62105b27b6613a58341a9940db0
4
- data.tar.gz: 067c2d2659af75249e1f482a3a1f00fe30f539f8
3
+ metadata.gz: cd8b7a0e95a2859524357b74e8f8b15d9861d3d9
4
+ data.tar.gz: 0d1be920499ae56bfd393700add73aa37116fcdd
5
5
  SHA512:
6
- metadata.gz: 41f0f0c3fdc2e06e1098da3dd69f3bc5e3f5f20fb14df0d41f509204a54c09aa63009a14faa105bda21736f42affe04d248c3dee0deaf907ddd2cd2018ccb9a4
7
- data.tar.gz: 14d5ae8db71cb58cb857a235c587eefd97547e88923de3b8cb3093d7cac09eae775ef61b7ffaa0e905beb076e18ee446919ac9d068eb674c076a0daf51c01a50
6
+ metadata.gz: 77a2b073594ec416efa51f45fc035aec6cdb605867b344c6f4d7cb606d07b70ee55437e0d93824e23d849bee3f9d4efe6a2ae951867a6737ee2ae11dd1486648
7
+ data.tar.gz: 129e7627bff4b50aa2b55f4bf59e742155b038984bf280ce416b3da1eafec0af133ac5b52d3f1cd569247d2d1f9de3b0f9700c1f364eabe6eef0782760fb7473
@@ -34,6 +34,10 @@ form:
34
34
  size: 80
35
35
 
36
36
  30:
37
+ name: created_at
38
+ type: datetime_picker
39
+
40
+ 40:
37
41
  name: body
38
42
  type: html_field
39
43
  options: 'height: 500'
@@ -34,6 +34,10 @@ form:
34
34
  size: 80
35
35
 
36
36
  30:
37
+ name: created_at
38
+ type: datetime_picker
39
+
40
+ 40:
37
41
  name: body
38
42
  type: html_field
39
43
  options: 'height: 500'
@@ -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.gt => 2.months.ago)
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
- @parent.render partial: 'dc_blog/last_blogs', formats: [:html], locals: { entries: entries }
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.gt => 2.months.ago)
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
- @parent.render partial: 'dc_news/last_news', formats: [:html], locals: { entries: entries }
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, { path: 'news', link: entry.link } )%></span>
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, { path: 'news', link: entry.link } )%></span>
7
+ <span class="title"><%= link_to( entry.subject, "/#{path}/#{entry.link}" )%></span>
8
8
  </div>
9
9
  <% end %>
10
- </div>
10
+ </div>
@@ -1,3 +1,3 @@
1
1
  module DrgBlogNewsForum
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
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.4
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-14 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails