drg_blog_news_forum 0.5.52.0 → 0.5.52.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +5 -12
- data/Rakefile +22 -0
- data/app/helpers/dc_blog_renderer.rb +1 -2
- data/app/views/dc_blog/_blog.html.erb +1 -2
- data/app/views/dc_blog/_blogers.html.erb +1 -2
- data/app/views/dc_blog/_last_blogs.erb +1 -0
- data/app/views/dc_blog/_list.html.erb +8 -10
- data/app/views/dc_blog/_show.html.erb +1 -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: bb7ee75586683204eb1f405464282a1e220b417d
|
4
|
+
data.tar.gz: 1cc753d310225e1a2ee45cead6ae072547677701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6150f740cbe57a19ed9780d322e8e39170b19666c08037062f1d9c37eaf4bdf6ae7c7997c8825fa225a6d4cc84676d4620d3c702ee57c53080ab7fc9b9360ae0
|
7
|
+
data.tar.gz: e6395612293542900ac3824bc28bc189e145364a3ddc8686869e00211aa5ef8b5c3854c3fe06879855c70bc10d20a5057cfc287571cee240dc833aa81c98ce0d
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -12,20 +12,13 @@ Add this line to your Gemfile:
|
|
12
12
|
|
13
13
|
Usage:
|
14
14
|
|
15
|
-
Create dc_page documents with blog, news
|
15
|
+
Create dc_page documents with blog, news or forum links.
|
16
16
|
|
17
17
|
Create related dc_design documents and use one of this lines for rendering html code.
|
18
18
|
```irb
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
```
|
23
|
-
|
24
|
-
Add this lines to routes.rb.
|
25
|
-
```ruby
|
26
|
-
get '/blog/:name/:link' => 'dc_main#page', :defaults => { path: 'blog' }
|
27
|
-
get '/blog/:name' => 'dc_main#page', :defaults => { path: 'blog', link: 'all' }
|
28
|
-
get '/news/:link' => 'dc_main#page', :defaults => { path: 'news' }
|
19
|
+
<%= dc_render(:dc_blog) %>
|
20
|
+
<%= dc_render(:dc_news) %>
|
21
|
+
<%= dc_render(:dc_forum) %>
|
29
22
|
```
|
30
23
|
|
31
24
|
Documentation
|
@@ -37,7 +30,7 @@ Please see the DRG CMS website for up-to-date documentation:
|
|
37
30
|
License
|
38
31
|
-------
|
39
32
|
|
40
|
-
Copyright (c) 2014-
|
33
|
+
Copyright (c) 2014-2018 Damjan Rems
|
41
34
|
|
42
35
|
Permission is hereby granted, free of charge, to any person obtaining
|
43
36
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2014-2018 Damjan Rems
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
1
23
|
begin
|
2
24
|
require 'bundler/setup'
|
3
25
|
rescue LoadError
|
@@ -67,7 +67,7 @@ def last_blogs
|
|
67
67
|
.order_by(created_at: -1).limit(limit).to_a
|
68
68
|
|
69
69
|
entries.inject('') do |result, document|
|
70
|
-
result << @parent.link_to("/blog/#{document.link}") do
|
70
|
+
result << @parent.link_to("/blog/#{document.created_by_name}/#{document.link}") do
|
71
71
|
%Q[
|
72
72
|
<span class="date">#{@parent.dc_pretty_date(document.created_at)} : </span>
|
73
73
|
<span class="title">#{document.subject}</span><br><br>
|
@@ -83,7 +83,6 @@ end
|
|
83
83
|
########################################################################
|
84
84
|
def default
|
85
85
|
document_link = @opts[:path].last
|
86
|
-
p @opts[:path]
|
87
86
|
if @opts[:path].size == 1 or document_link == 'blogers'
|
88
87
|
list_blogers
|
89
88
|
elsif @opts[:path].size == 2
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
<% if session[:edit_mode] > 1 %>
|
3
3
|
<%= dc_link_for_create(controller: 'cmsedit', table: 'dc_blog', title: 'dc_blog.new_entry' ) %>
|
4
4
|
<% end %>
|
@@ -11,4 +11,3 @@
|
|
11
11
|
<%= link_to( bloger, { path: "blog/#{bloger}"} )%>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
|
-
</div>
|
@@ -1,13 +1,11 @@
|
|
1
1
|
|
2
|
-
<div
|
3
|
-
|
4
|
-
<h3><%= t('dc_blog.blogs') %></h3>
|
2
|
+
<div id="blogs">
|
3
|
+
<h3><%= t('dc_blog.blogs') %></h3>
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</div>
|
11
|
-
<% end %>
|
5
|
+
<% for document in documents %>
|
6
|
+
<div class="entry">
|
7
|
+
<div class="date"><%= dc_pretty_date(document.created_at) %></div>
|
8
|
+
<div class="title"><%= link_to( document.subject, path: "#{@page.link}/#{document.created_by_name}/#{document.link}" )%></div>
|
12
9
|
</div>
|
13
|
-
|
10
|
+
<% end %>
|
11
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
<% if session[:edit_mode] > 1 %>
|
3
3
|
<%= dc_link_for_create(controller: 'cmsedit', table: 'dc_blog', title: 'dc_blog.new_document' ) %>
|
4
4
|
<br><br>
|
@@ -18,4 +18,3 @@
|
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<iframe id="iframe_edit" name="iframe_edit" scrolling="no"></iframe>
|
21
|
-
</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.52.
|
4
|
+
version: 0.5.52.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|