adva_blog 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/app/controllers/admin/blog/contents_controller.rb +1 -1
- data/app/helpers/blog_helper.rb +2 -2
- data/app/views/admin/blog/articles/index.html.erb +4 -4
- data/app/views/blogs/articles/_article.html.erb +1 -1
- data/app/views/blogs/articles/index.atom.builder +1 -1
- data/config/initializers/base_controller.rb +1 -1
- data/config/routes.rb +4 -6
- data/lib/adva_blog/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: be103e746dc5019a37a44afe5f2592cbdf32f49334bb0d9bad8b14d351284d3b
|
4
|
+
data.tar.gz: 96d3af6bcc8b0e4b1cc9b11aa4d40af10e52273074b90a613bc67b3f4157e1a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a01ee29afb12c403f94cb9bb541ff98c17aff2255cfdac5d90166842fa39599ba68a38d4d9b0a7da8f3898aabff7e982d4815c4cd0430a84b8311a7f24157ff
|
7
|
+
data.tar.gz: 1185830c46a1952b7cd7ac67bcef10f12ae5fa515bc50b5529ddf3f2da07f9b93321bbb5e61958de7748ff28a1aac40da973c5e67e823b5bdeb467d2c57b1ceb
|
data/app/helpers/blog_helper.rb
CHANGED
@@ -19,7 +19,7 @@ module BlogHelper
|
|
19
19
|
Time.local(params[:year], params[:month]) if params[:year]
|
20
20
|
end
|
21
21
|
|
22
|
-
def blog_article_path section, article
|
22
|
+
def blog_article_path section, article, options={}
|
23
23
|
if article.published_at
|
24
24
|
super :section_permalink => section.permalink,
|
25
25
|
:year => article.published_at.year,
|
@@ -31,7 +31,7 @@ module BlogHelper
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
def blog_article_url section, article
|
34
|
+
def blog_article_url section, article, options={}
|
35
35
|
if article.published_at
|
36
36
|
super :section_permalink => section.permalink,
|
37
37
|
:year => article.published_at.year,
|
@@ -9,19 +9,19 @@
|
|
9
9
|
|
10
10
|
t.row do |r, content|
|
11
11
|
r.add_class "level_#{content.level}"
|
12
|
-
r.cell content_status(content) + link_to(content.title, [:edit, :admin, @
|
12
|
+
r.cell content_status(content) + " " + link_to(content.title, [:edit, :admin, @section, content], :class => content.state)
|
13
13
|
r.cell content.category_titles.join(", ") if @section.categories.any?
|
14
14
|
r.cell content.accept_comments? && content.comments.present? ? link_to(content.comments.size, admin_comments_path) : t(:"adva.common.none") if defined?(Comment)
|
15
15
|
r.cell published_at_formatted(content)
|
16
|
-
r.cell link_to("Edit", [:edit, :admin, @
|
17
|
-
link_to("Delete", [:admin, @
|
16
|
+
r.cell link_to("Edit", [:edit, :admin, @section, content], :class => "edit content") +
|
17
|
+
link_to("Delete", [:admin, @section, content], :method => :delete, :class => "delete content")
|
18
18
|
end
|
19
19
|
|
20
20
|
t.empty :p, :class => 'empty' do
|
21
21
|
raw params[:filters] ?
|
22
22
|
t(:'adva.content.no_filtered_contents') :
|
23
23
|
t(:'adva.contents.no_contents', :section => @section.title) + "\n" +
|
24
|
-
link_to(t(:'adva.contents.links.create_now'), [:new, :admin, @
|
24
|
+
link_to(t(:'adva.contents.links.create_now'), [:new, :admin, @section, :article])
|
25
25
|
end
|
26
26
|
end
|
27
27
|
%>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= t(:'adva.blog.attribution', :author => article.author_name) %>
|
7
7
|
<%= link_to_content_comments article if (defined?(Comment) && (article.accept_comments? || article.comments.present?)) && mode != :single %>
|
8
8
|
<% authorized_tag :span, :update, article do -%>
|
9
|
-
<%= link_to t(:'adva.common.edit'), edit_admin_article_path(@
|
9
|
+
<%= link_to t(:'adva.common.edit'), edit_admin_article_path(@section, article) %>
|
10
10
|
<% end -%>
|
11
11
|
</p>
|
12
12
|
<p>
|
@@ -8,7 +8,7 @@ atom_feed :url => request.url do |feed|
|
|
8
8
|
feed.updated @articles.first ? @articles.first.updated_at : Time.now.utc
|
9
9
|
|
10
10
|
@articles[0..12].each do |article|
|
11
|
-
url =
|
11
|
+
url = [request.protocol, @site.host, url_for([@section, article])].join("")
|
12
12
|
feed.entry article, :url => url do |entry|
|
13
13
|
entry.title article.title
|
14
14
|
entry.content "#{absolutize_links(article.excerpt_html)} #{absolutize_links(article.body_html)}", :type => 'html'
|
data/config/routes.rb
CHANGED
@@ -8,12 +8,10 @@ Rails.application.routes.draw do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
namespace :admin do
|
11
|
-
resources :
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
put "/", :action => "update_all", :on => :collection
|
16
|
-
end
|
11
|
+
resources :blogs do
|
12
|
+
scope :module => :blog do
|
13
|
+
resources :contents, :articles, :categories do
|
14
|
+
put "/", :action => "update_all", :on => :collection
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
data/lib/adva_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adva_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Adva Blog
|
14
14
|
email:
|
@@ -76,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
|
-
|
80
|
-
rubygems_version: 2.4.6
|
79
|
+
rubygems_version: 3.2.3
|
81
80
|
signing_key:
|
82
81
|
specification_version: 4
|
83
82
|
summary: Engine for Adva CMS blog component
|