home_page_blog 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/blog_controller.rb +2 -2
- data/app/views/layouts/home_page_blog/application.html.erb +9 -5
- data/app/views/posts/_sidebar.html.erb +3 -4
- data/app/views/posts/index.html.erb +7 -3
- data/app/views/posts/sidebar/_archive.html.erb +6 -0
- data/app/views/posts/sidebar/_tags.html.erb +6 -0
- data/app/views/settings/plugins/home_page_blog/_panel.html.erb +32 -0
- data/config/initializers/default_settings.rb +3 -0
- data/config/initializers/settings.rb +3 -0
- data/config/locales/resources/setting/en.yml +10 -0
- data/lib/home_page_blog/navigation.rb +1 -1
- data/lib/home_page_blog/version.rb +1 -1
- metadata +12 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 811d801f3160d923ccbf3adf260509116f608ae2
|
4
|
+
data.tar.gz: 5cacf55233e187f5c1a8c6f21c6ffd83cb5dd7c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71921bb1fe499a15f8f6965a11e3c8a335ac6a0af5835378839ec828296bb4d63a43d3d6764e0be3239a49e318a3c1efb8ae0da7692858535c4c95141454d417
|
7
|
+
data.tar.gz: 6421a52b499eb267ba14447ec92adbf7d57299de503aee4af8d6023391456cc85f35e5c47c6f17b4cbb2f92987eac5476ef1d941eb8707137bfa5a58fcedfe2f
|
@@ -11,8 +11,8 @@ module BlogController
|
|
11
11
|
@posts = @posts.order('published_at DESC')
|
12
12
|
end
|
13
13
|
|
14
|
-
@posts = @posts.paginate(page: params[:page], per_page:
|
15
|
-
|
14
|
+
@posts = @posts.paginate(page: params[:page], per_page: 10)
|
15
|
+
begin; @sidebar_modules = PageModule.by_collection_slug('blog-post-sidebar'); rescue ActiveRecord::RecordNotFound; nil; end
|
16
16
|
@home_page_stylesheets = ['home_page/application', 'home_page_blog/posts']
|
17
17
|
|
18
18
|
render 'posts/index', layout: 'home_page_blog/application'
|
@@ -19,16 +19,20 @@
|
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="row">
|
22
|
-
|
22
|
+
<% if content_for? :sidebar %>
|
23
23
|
<div class="col-sm-8 blog-main">
|
24
24
|
<%= yield %>
|
25
|
-
</div
|
25
|
+
</div>
|
26
26
|
|
27
27
|
<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
|
28
28
|
<%= yield :sidebar %>
|
29
|
-
</div
|
30
|
-
|
31
|
-
|
29
|
+
</div>
|
30
|
+
<% else %>
|
31
|
+
<div class="col-sm-12 blog-main">
|
32
|
+
<%= yield %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
32
36
|
|
33
37
|
</div>
|
34
38
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
<%= render partial:
|
3
|
-
|
4
|
-
<%= render partial: 'posts/sidebar/archive' %>
|
1
|
+
<% @sidebar_modules.each do |page_module| %>
|
2
|
+
<%= render partial: page_module.partial_path %>
|
3
|
+
<% end %>
|
@@ -10,10 +10,14 @@
|
|
10
10
|
|
11
11
|
<% if user_signed_in? %>
|
12
12
|
<p>
|
13
|
-
<%= link_to
|
13
|
+
<%= link_to new_post_path, class: 'btn btn-default' do %>
|
14
|
+
<span class="glyphicon glyphicon-plus"></span> <%= t('posts.new.title') %>
|
15
|
+
<% end %>
|
14
16
|
</p>
|
15
17
|
<% end %>
|
16
18
|
|
17
|
-
<%
|
18
|
-
|
19
|
+
<% if @sidebar_modules %>
|
20
|
+
<% content_for :sidebar do %>
|
21
|
+
<%= render partial: 'posts/sidebar' %>
|
22
|
+
<% end %>
|
19
23
|
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div class="panel panel-default">
|
2
|
+
<div class="panel-heading" role="tab" id="heading<%= index + 1 %>">
|
3
|
+
<h4 class="panel-title">
|
4
|
+
<a data-toggle="collapse" data-parent="#settings_accordion" href="#home_page_blog_settings" aria-expanded="true" aria-controls="home_page_blog_settings">
|
5
|
+
<%= t('settings.index.plugins.home_page_blog.index.title') %>
|
6
|
+
</a>
|
7
|
+
</h4>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div id="home_page_blog_settings" class="panel-collapse collapse<% if index == 0 %> in<% end %>" role="tabpanel" aria-labelledby="heading<%= index + 1 %>">
|
11
|
+
<div class="panel-body">
|
12
|
+
<div role="tabpanel">
|
13
|
+
<ul class="nav nav-tabs" role="tablist">
|
14
|
+
<li role="presentation" class="active">
|
15
|
+
<a href="#home_page_blog_settings_general" aria-controls="home_page_blog_settings_general" role="tab" data-toggle="tab">
|
16
|
+
<%= t('settings.index.plugins.home_page.tabs.general.title') %>
|
17
|
+
</a>
|
18
|
+
</li>
|
19
|
+
</ul>
|
20
|
+
<div class="tab-content">
|
21
|
+
<div role="tabpanel" class="tab-pane active" id="home_page_blog_settings_general">
|
22
|
+
<p>
|
23
|
+
<%= setting_input(
|
24
|
+
f, 'home_page_blog.general.partial_paths', label: t('settings.vars.home_page.general.partial_paths')
|
25
|
+
) %>
|
26
|
+
</p>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
@@ -2,7 +2,7 @@ module HomePageBlog
|
|
2
2
|
module Navigation
|
3
3
|
def self.menu_code(resource)
|
4
4
|
case resource
|
5
|
-
when
|
5
|
+
when 'posts'
|
6
6
|
Proc.new do |primary, options|
|
7
7
|
primary.item :posts, I18n.t('posts.index.title'), posts_path do |posts|
|
8
8
|
posts.item :new, I18n.t('general.new'), new_post_path
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: home_page_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathias Gawlista
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rails
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 4.2.0
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: home_page
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
19
|
+
version: 0.0.6
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
26
|
+
version: 0.0.6
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: mysql2
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +38,7 @@ dependencies:
|
|
52
38
|
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
|
-
description: Blog
|
41
|
+
description: 'Blog plugin for #Rails CMS http://Home-Page.Software'
|
56
42
|
email:
|
57
43
|
- gawlista@gmail.com
|
58
44
|
executables: []
|
@@ -77,10 +63,16 @@ files:
|
|
77
63
|
- app/views/posts/new.html.erb
|
78
64
|
- app/views/posts/show.html.erb
|
79
65
|
- app/views/posts/sidebar/_about.html.erb
|
66
|
+
- app/views/posts/sidebar/_archive.html.erb
|
80
67
|
- app/views/posts/sidebar/_social_links.html.erb
|
68
|
+
- app/views/posts/sidebar/_tags.html.erb
|
69
|
+
- app/views/settings/plugins/home_page_blog/_panel.html.erb
|
70
|
+
- config/initializers/default_settings.rb
|
71
|
+
- config/initializers/settings.rb
|
81
72
|
- config/locales/general/en.yml
|
82
73
|
- config/locales/resources/post/en.yml
|
83
74
|
- config/locales/resources/post_archive/en.yml
|
75
|
+
- config/locales/resources/setting/en.yml
|
84
76
|
- config/routes.rb
|
85
77
|
- db/migrate/20150307194234_create_initial_blog_schema.rb
|
86
78
|
- lib/home_page_blog.rb
|
@@ -111,5 +103,5 @@ rubyforge_project:
|
|
111
103
|
rubygems_version: 2.4.5
|
112
104
|
signing_key:
|
113
105
|
specification_version: 4
|
114
|
-
summary: Blog
|
106
|
+
summary: Blog plugin for Rails CMS gem home_page.
|
115
107
|
test_files: []
|