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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 636fb304f8074f8b716c04fe20379356c46dd14763327e3c2cfc060915be423d
4
- data.tar.gz: 180c7f9060c0a19878faa65e76776db14c11d633c38c23b97968652d00ddb208
3
+ metadata.gz: 714a89a81c4e6ccbc6a184049606e5d2d716d0f8538efbcd2089b3829681edcf
4
+ data.tar.gz: 311fcfde67196a63b5a09e79043e65776dce8d34cd3cf175b55c96e9fc034832
5
5
  SHA512:
6
- metadata.gz: 38d79b62b6c220ceb34279b3732cd6bec0f72fd2f5497c45bb3854e7786deee9a5ae2f440ce297c4ac797d1ea63a82523fa176cc4a0bcaaeb61169736b5e2a82
7
- data.tar.gz: 38d2ecd8a7b67317942149add205b2042c411fed457154b2ddc44cfc99f63dd0b9380a0b271fc4a1a6f1cee99d6c4bd6c2ca0dad1aa4202e19ec89689b6fc19b
6
+ metadata.gz: a636883b00031a1d0949d6bf2e2e3c6ad69a9ece4b832833d242cfab27f083a2a76981610d159fe8b956cdd494a4ee920f81e1a4a76be2c73bf941aa032354b1
7
+ data.tar.gz: 2685c937390f670b006adac1483b700f8c198d2614e625426aa97cfe83373ba5ab20ca859698a3e23724801a8424773bd9715f66a511ce99ad0f4afe91a9d544
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the website::pages controller here.
1
+ // Place all the styles related to the blog::articles controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -16,11 +16,5 @@ module Phcpresspro
16
16
 
17
17
  private
18
18
 
19
- def phcaccounts_pro_admin_filter!
20
- if current_user.admin?
21
- else
22
- end
23
- end
24
-
25
19
  end
26
20
  end
@@ -1,19 +1,18 @@
1
1
  require_dependency "phcpresspro/application_controller"
2
2
 
3
3
  module Phcpresspro
4
- class Website::PagesController < ApplicationController
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 post_index
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 post_single
15
+ def show
17
16
  @phcpresspro_posts_single = Article::Post.friendly.find(params[:id])
18
17
  end
19
18
 
@@ -0,0 +1,4 @@
1
+ module Phcpresspro
2
+ module Blog::ArticlesHelper
3
+ end
4
+ end
@@ -0,0 +1,5 @@
1
+ <!-- Page Content -->
2
+ <div id="content" class="content">
3
+ <%= yield %>
4
+ </div>
5
+ <!-- Page Content -->
@@ -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 %>
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
- get 'blog/index', to: 'website/pages#post_index'
14
- get 'blog/index/:id', to: 'website/pages#post_single'
13
+ namespace :blog do
14
+ resources :articles, only: [:index, :show]
15
+ end
15
16
 
16
17
  # Application API
17
18
  namespace :api do
@@ -1,3 +1,3 @@
1
1
  module Phcpresspro
2
- VERSION = "78.1.0"
2
+ VERSION = "78.2.0"
3
3
  end
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.1.0
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/website/pages.scss
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/website/pages_controller.rb
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/website/pages/post_index.html.erb
696
- - app/views/phcpresspro/website/pages/post_single.html.erb
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
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,4 +0,0 @@
1
- module Phcpresspro
2
- class Website::Page < ApplicationRecord
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Phcpresspro
2
- module Website
3
- end
4
- end