phcpresspro 78.1.0 → 78.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/{views/phcpresspro/website/pages/post_index.html.erb → assets/javascripts/phcpresspro/blog/articles.js} +0 -0
- data/app/assets/stylesheets/phcpresspro/{website/pages.scss → blog/articles.scss} +1 -1
- data/app/controllers/phcpresspro/application_controller.rb +0 -6
- data/app/controllers/phcpresspro/{website/pages_controller.rb → blog/articles_controller.rb} +6 -7
- data/app/helpers/phcpresspro/blog/articles_helper.rb +4 -0
- data/app/views/layouts/phcpresspro/frontend.html.erb +5 -0
- data/app/views/phcpresspro/blog/articles/index.html.erb +69 -0
- data/app/views/phcpresspro/blog/articles/show.html.erb +1 -0
- data/config/routes.rb +5 -4
- data/lib/phcpresspro/version.rb +1 -1
- metadata +7 -8
- data/app/assets/javascripts/phcpresspro/website/pages.coffee +0 -3
- data/app/models/phcpresspro/website/page.rb +0 -4
- data/app/models/phcpresspro/website.rb +0 -4
- data/app/views/phcpresspro/website/pages/post_single.html.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 714a89a81c4e6ccbc6a184049606e5d2d716d0f8538efbcd2089b3829681edcf
|
4
|
+
data.tar.gz: 311fcfde67196a63b5a09e79043e65776dce8d34cd3cf175b55c96e9fc034832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a636883b00031a1d0949d6bf2e2e3c6ad69a9ece4b832833d242cfab27f083a2a76981610d159fe8b956cdd494a4ee920f81e1a4a76be2c73bf941aa032354b1
|
7
|
+
data.tar.gz: 2685c937390f670b006adac1483b700f8c198d2614e625426aa97cfe83373ba5ab20ca859698a3e23724801a8424773bd9715f66a511ce99ad0f4afe91a9d544
|
File without changes
|
data/app/controllers/phcpresspro/{website/pages_controller.rb → blog/articles_controller.rb}
RENAMED
@@ -1,19 +1,18 @@
|
|
1
1
|
require_dependency "phcpresspro/application_controller"
|
2
2
|
|
3
3
|
module Phcpresspro
|
4
|
-
class
|
5
|
-
|
4
|
+
class Blog::ArticlesController < ApplicationController
|
5
|
+
|
6
6
|
# Security, Layouts & Action Filters
|
7
|
-
before_action :set_website_page, only: [:show]
|
8
7
|
layout 'phcpresspro/frontend'
|
9
|
-
|
8
|
+
|
10
9
|
# Index for All Published Posts
|
11
|
-
def
|
10
|
+
def index
|
12
11
|
@phcpresspro_posts_index = Article::Post.where(pststatus: "published")
|
13
12
|
end
|
14
|
-
|
13
|
+
|
15
14
|
# Single Page for Published Post
|
16
|
-
def
|
15
|
+
def show
|
17
16
|
@phcpresspro_posts_single = Article::Post.friendly.find(params[:id])
|
18
17
|
end
|
19
18
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<% @phcpresspro_posts_index.each do |blog_post_index| %>
|
2
|
+
<div class="row blog-post">
|
3
|
+
<div class="col-md-2 date-md">
|
4
|
+
<div class="date-wrapper">
|
5
|
+
<span class="date-m bg-primary"><%= blog_post_index.created_at.strftime("%B") %></span>
|
6
|
+
<span class="date-d"><%= blog_post_index.created_at.strftime("%d") %></span>
|
7
|
+
</div>
|
8
|
+
<p class="text-muted text-sm">
|
9
|
+
<i class="fas fa-user-tie text-xs"></i>
|
10
|
+
<%= blog_post_index.user_id %>
|
11
|
+
</p>
|
12
|
+
</div>
|
13
|
+
<div class="col-md-10">
|
14
|
+
<div class="text-xs">
|
15
|
+
<a href="#" class="text-primary text-uppercase">Blog</a> /
|
16
|
+
<a href="#" class="text-dark text-uppercase">Post</a>
|
17
|
+
</div>
|
18
|
+
<h4 class="title media-heading">
|
19
|
+
<%= blog_post_index.psttittle %>
|
20
|
+
</h4>
|
21
|
+
<ul class="list-inline meta text-muted">
|
22
|
+
<li class="list-inline-item">
|
23
|
+
<i class="fas fa-calendar-alt text-xs"></i>
|
24
|
+
<%= blog_post_index.created_at.strftime("%a %B %d %Y") %>
|
25
|
+
</li>
|
26
|
+
<li class="list-inline-item">
|
27
|
+
<i class="fas fa-user-tie text-xs"></i>
|
28
|
+
<%= blog_post_index.user_id %>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-md-12">
|
33
|
+
<% if blog_post_index.pstimage.attached? %>
|
34
|
+
<div class="blog-media">
|
35
|
+
<img src="<%= url_for(blog_post_index.pstimage) %>" alt="Picture for Blog Post - <%= blog_post_index.psttittle %>" class="img-fluid" />
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<div class="row">
|
41
|
+
<div class="col-md-12">
|
42
|
+
<%= truncate(blog_post_index.psttext, :length => 120, :escape => false) %>
|
43
|
+
<ul class="list-inline links">
|
44
|
+
<li class="list-inline-item">
|
45
|
+
<%= link_to blog_article_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
|
46
|
+
<i class="fas fa-arrow-alt-circle-right"></i> Read More
|
47
|
+
<% end %>
|
48
|
+
</li>
|
49
|
+
<li class="list-inline-item">
|
50
|
+
<a href="blog-post.html#comments" class="btn btn-secondary btn-sm"><i class="fa fa-comment"></i> 64 Comments</a>
|
51
|
+
</li>
|
52
|
+
<% if current_user.admin! %>
|
53
|
+
<li class="list-inline-item">
|
54
|
+
<%= link_to edit_article_post_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
|
55
|
+
<i class="fas fa-edit"></i> Edit Post
|
56
|
+
<% end %>
|
57
|
+
</li>
|
58
|
+
<li class="list-inline-item">
|
59
|
+
<%= link_to blog_post_index, class: "btn btn-danger btn-sm", method: :delete, data: { confirm: 'Are you sure?' } do %>
|
60
|
+
<i class="fas fa-dumpster"></i> Delete Post
|
61
|
+
<% end %>
|
62
|
+
</li>
|
63
|
+
<% end %>
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Show
|
data/config/routes.rb
CHANGED
@@ -2,16 +2,17 @@ Phcpresspro::Engine.routes.draw do
|
|
2
2
|
|
3
3
|
# Mount Accounts Engine
|
4
4
|
mount Phcaccountspro::Engine, :at => '/'
|
5
|
-
|
5
|
+
|
6
6
|
# Application Articles
|
7
7
|
namespace :article do
|
8
8
|
resources :categories, class_name: 'Phcpresspro::Articles::Category'
|
9
9
|
resources :posts, class_name: 'Phcpresspro::Articles::Post'
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
# Application FrontEnd
|
13
|
-
|
14
|
-
|
13
|
+
namespace :blog do
|
14
|
+
resources :articles, only: [:index, :show]
|
15
|
+
end
|
15
16
|
|
16
17
|
# Application API
|
17
18
|
namespace :api do
|
data/lib/phcpresspro/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcpresspro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 78.
|
4
|
+
version: 78.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
@@ -652,21 +652,22 @@ files:
|
|
652
652
|
- app/assets/javascripts/phcpresspro/application.js
|
653
653
|
- app/assets/javascripts/phcpresspro/article/categories.js
|
654
654
|
- app/assets/javascripts/phcpresspro/article/posts.js
|
655
|
+
- app/assets/javascripts/phcpresspro/blog/articles.js
|
655
656
|
- app/assets/javascripts/phcpresspro/custom/custom.js
|
656
|
-
- app/assets/javascripts/phcpresspro/website/pages.coffee
|
657
657
|
- app/assets/stylesheets/phcpresspro/application.scss
|
658
658
|
- app/assets/stylesheets/phcpresspro/article/categories.scss
|
659
659
|
- app/assets/stylesheets/phcpresspro/article/posts.scss
|
660
|
-
- app/assets/stylesheets/phcpresspro/
|
660
|
+
- app/assets/stylesheets/phcpresspro/blog/articles.scss
|
661
661
|
- app/controllers/phcpresspro/api/v1/post_index.json.rabl
|
662
662
|
- app/controllers/phcpresspro/api/v1/post_single.json.rabl
|
663
663
|
- app/controllers/phcpresspro/application_controller.rb
|
664
664
|
- app/controllers/phcpresspro/article/categories_controller.rb
|
665
665
|
- app/controllers/phcpresspro/article/posts_controller.rb
|
666
|
-
- app/controllers/phcpresspro/
|
666
|
+
- app/controllers/phcpresspro/blog/articles_controller.rb
|
667
667
|
- app/helpers/phcpresspro/application_helper.rb
|
668
668
|
- app/helpers/phcpresspro/article/categories_helper.rb
|
669
669
|
- app/helpers/phcpresspro/article/posts_helper.rb
|
670
|
+
- app/helpers/phcpresspro/blog/articles_helper.rb
|
670
671
|
- app/jobs/phcpresspro/application_job.rb
|
671
672
|
- app/mailers/phcpresspro/application_mailer.rb
|
672
673
|
- app/models/phcpresspro/application_record.rb
|
@@ -675,8 +676,6 @@ files:
|
|
675
676
|
- app/models/phcpresspro/article/post.rb
|
676
677
|
- app/models/phcpresspro/category_versions.rb
|
677
678
|
- app/models/phcpresspro/post_versions.rb
|
678
|
-
- app/models/phcpresspro/website.rb
|
679
|
-
- app/models/phcpresspro/website/page.rb
|
680
679
|
- app/views/layouts/phcpresspro/application.html.erb
|
681
680
|
- app/views/layouts/phcpresspro/components/backend/footer/_footer.html.erb
|
682
681
|
- app/views/layouts/phcpresspro/components/backend/navigation/_top_menu.html.erb
|
@@ -692,8 +691,8 @@ files:
|
|
692
691
|
- app/views/phcpresspro/article/posts/index.html.erb
|
693
692
|
- app/views/phcpresspro/article/posts/new.html.erb
|
694
693
|
- app/views/phcpresspro/article/posts/show.html.erb
|
695
|
-
- app/views/phcpresspro/
|
696
|
-
- app/views/phcpresspro/
|
694
|
+
- app/views/phcpresspro/blog/articles/index.html.erb
|
695
|
+
- app/views/phcpresspro/blog/articles/show.html.erb
|
697
696
|
- config/routes.rb
|
698
697
|
- db/migrate/20170509002355_create_phcpresspro_friendly_id_slugs.rb
|
699
698
|
- db/migrate/20170517064030_create_phcpresspro_post_versions.rb
|
File without changes
|