phcpress 6.2.2 → 6.2.3

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
  SHA1:
3
- metadata.gz: f0e11d11b0657bbf8fb9b1ee3edd012bdd2132cc
4
- data.tar.gz: 74968c8ad6cf8fe00c37206a3e466d9ef62b2edb
3
+ metadata.gz: a61c6fecc417a21c4fab0472eabe25b815d624ef
4
+ data.tar.gz: 745e6444c126728aa2118774685affb9ce5dabf0
5
5
  SHA512:
6
- metadata.gz: 67c6bd52ebab653deb583549c18509b5573c6fb217faedd840a6315bd8db0339aae0b70d1c01427dccc85c86bbe905c2e33befcdf8e460a750344ab9fdc651fd
7
- data.tar.gz: e9004a93bc39058d64a25b1b38b51188d624f96802b8ecfb039b6f90d1cab116f06905ee7959d3edbf40b48bcaae85fc6977561e01d823df0550b11c58cdb95a
6
+ metadata.gz: 1a86f844679abda51bfee5621e92809c24d66cedb73f38533d02fd7bec022349a86d4ad89b64fea54d8ea7722afc7b77d3030285e63c2f08db9984e4cae42e87
7
+ data.tar.gz: 445969d3125f604e11b9137cf1e536204c95036847de51cce5b037c908d3138a9486e9ef0f539159f465cf951ad0f01e2d6d76a338e8fec82d1fe6b116e4f9f5
data/README.md CHANGED
@@ -12,7 +12,7 @@ PHCPress(6) rails CMS engine to manage your website's articles, categories and m
12
12
 
13
13
  #### Step 1 - Add PHCPress to your gemfile
14
14
 
15
- gem 'phcpress', '~> 6.2'
15
+ gem 'phcpress', '~> 6.2', '>= 6.2.2'
16
16
  bundle install
17
17
 
18
18
  #### Step 2 - Copy PHCPress Database Tables
@@ -21,13 +21,18 @@ To copy PHCPress' requried database migrations, copy each command individually t
21
21
  rails phcpress:install:migrations
22
22
  rails db:migrate
23
23
 
24
- #### Step 3 - Recompile Assets
24
+ #### Step 3 - Mount PHCPress & Add Routes
25
+ Mount PHCPress by adding code below to your routes file.
26
+
27
+ mount Phcpress::Engine, :at => '/'
28
+
29
+ #### Step 4 - Recompile Assets
25
30
  To properly function re-compile your application's assets to copy over requried files.
26
31
 
27
32
  rails assets:clobber
28
33
  rails assets:precompile
29
34
 
30
- #### Step 4 - Generate Contact Form View (Customization)
35
+ #### Step 5 - Generate Contact Form View (Customization)
31
36
  All PHCPress views and layouts can be overwritten by copying files to your application.
32
37
 
33
38
  rails generate phcpress:views
@@ -1,23 +1 @@
1
- //= require jquery
2
- //= require jquery_ujs
3
- //= require bootstrap-sprockets
4
- //= require codemirror
5
- //= require codemirror/modes/ruby
6
- //= require codemirror/modes/sass
7
- //= require codemirror/modes/shell
8
- //= require codemirror/modes/sql
9
- //= require codemirror/modes/slim
10
- //= require codemirror/modes/nginx
11
- //= require codemirror/modes/markdown
12
- //= require codemirror/modes/javascript
13
- //= require codemirror/modes/http
14
- //= require codemirror/modes/htmlmixed
15
- //= require codemirror/modes/haml
16
- //= require codemirror/modes/xml
17
- //= require codemirror/modes/css
18
- //= require codemirror/modes/yaml
19
- //= require codemirror/modes/slim
20
- //= require codemirror/modes/php
21
- //= require summernote
22
1
  //= require phc_admins_main_three
23
- //= require phcpress/editors/phc_summernote.js
@@ -1,15 +1,2 @@
1
- // Editor: Summernote & Code Mirror
2
- @import "summernote";
3
- @import "codemirror";
4
- @import "codemirror/themes/solarized";
5
-
6
- // UI: Bootstrap & Font Awesome
7
- @import "bootstrap-sprockets";
8
- @import "bootstrap";
9
- @import "font-awesome";
10
-
11
1
  // Add PHCAdmins Styles
12
2
  @import "phc_admins_style_three";
13
-
14
- // Other: Custom Alterations
15
- @import "custom";
@@ -0,0 +1,15 @@
1
+ require_dependency "phcpress/application_controller"
2
+
3
+ module Phcpress
4
+ class Api::V1::CategoriesController < ApplicationController
5
+
6
+ # Only Responds to API Requests
7
+ respond_to :json
8
+
9
+ # Article Category API
10
+ def index
11
+ @modules_categories = Modules::Category.order('catname ASC')
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require_dependency "phcpress/application_controller"
2
+
3
+ module Phcpress
4
+ class Api::V1::PostsController < ApplicationController
5
+
6
+ # Only Responds to API Requests
7
+ respond_to :json
8
+
9
+ # Article Category API
10
+ def index
11
+ @articles_posts = Articles::Post.order('psttitle ASC')
12
+ end
13
+
14
+ end
15
+ end
@@ -1,7 +1,7 @@
1
1
  module Phcpress
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
- # Prevent CSRF attacks by raising an exception.
4
+ # Security Filters
5
5
  protect_from_forgery with: :exception
6
6
 
7
7
  # Load Helpers
@@ -1,19 +1,19 @@
1
1
  require_dependency "phcpress/application_controller"
2
2
 
3
- module Phcpress
3
+ module Phcpresspro
4
4
  class Frontend::ArticlesController < ApplicationController
5
5
 
6
- # Layouts and Filters
7
- layout "phcpress/frontend"
6
+ # Security & Filters
7
+ layout '/layouts/phcpress/frontend.html.erb'
8
8
 
9
9
  # Article Index
10
10
  def index
11
- @frontend_articles = Articles::Post.all
11
+ @articles_index = Articles::Post.all
12
12
  end
13
-
14
- # Article Show
13
+
14
+ # Single Article Post
15
15
  def show
16
- @frontend_article = Articles::Post.find(params[:id])
16
+ @articles_single = Articles::Post.find(params[:id])
17
17
  end
18
18
 
19
19
  end
@@ -0,0 +1,5 @@
1
+ module Phcpresspro
2
+ class Api::V1::Category < ApplicationRecord
3
+
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Phcpress
2
+ class Api::V1::Post < ApplicationRecord
3
+
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Phcpress
2
2
  class Frontend::Article < ApplicationRecord
3
-
3
+
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
1
  <div class="pull-right hidden-xs">
2
- <b>Version</b> 6.0.1 - NOV-14-<%= Date.today.year %>
2
+ <b>Version</b> 6.2.3 - DEC-08-<%= Date.today.year %>
3
3
  </div>
4
4
  <strong>&copy; 2012-<%= Time.now.year %> <%= link_to "https://phcnetworks.net", target: "_blank", rel: "nofollow" do %>PHCNetworks<% end %></strong>
@@ -0,0 +1,2 @@
1
+ object @modules_categories
2
+ attributes :id, :catname
@@ -0,0 +1,2 @@
1
+ object @articles_posts
2
+ attributes :id, :psttitle, :psttext, :pststatus, :pstimage
@@ -1,4 +1,76 @@
1
+ <!-- Title System -->
2
+ <% phc_title "PHCNetworks Blog" %>
3
+ <% phc_title_tagline "News & Information" %>
4
+ <!-- Title System -->
1
5
 
2
- <% @frontend_articles.each do |frontend_article| %>
3
- <%= link_to 'Show', frontend_article_path(frontend_article) %>
4
- <% end %>
6
+ <!-- Page Header -->
7
+ <section class="page-header dark page-header-xs">
8
+ <div class="container">
9
+ <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
10
+ </div>
11
+ </section>
12
+ <!-- Page Header -->
13
+
14
+ <!-- Page Content -->
15
+ <section>
16
+ <div class="container">
17
+ <div class="row">
18
+
19
+ <!-- Left Sidebar -->
20
+ <div class="col-md-3 col-sm-3">
21
+ </div>
22
+ <!-- Left Sidebar -->
23
+
24
+ <!-- Blog List -->
25
+ <div class="col-md-9 col-sm-9">
26
+
27
+ <% @articles_index.each do |frontend_article| %>
28
+ <div class="blog-post-item">
29
+ <% if frontend_article.pstimage? %>
30
+ <figure class="margin-bottom-20">
31
+ <%= link_to phcpress.frontend_article_path(frontend_article) do %>
32
+ <%= image_tag frontend_article.pstimage_url, class: "img-responsive" %>
33
+ <% end %>
34
+ </figure>
35
+ <% end %>
36
+ <h2><%= link_to frontend_article.psttitle, phcpress.frontend_article_path(frontend_article) %></h2>
37
+ <ul class="blog-post-info list-inline">
38
+ <li>
39
+ <%= link_to "#" do %>
40
+ <i class="fa fa-clock-o"></i>
41
+ <span class="font-lato"><%= frontend_article.created_at %></span>
42
+ <% end %>
43
+ </li>
44
+ <li>
45
+ <%= link_to "#" do %>
46
+ <i class="fa fa-comment-o"></i>
47
+ <span class="font-lato">0 Comments</span>
48
+ <% end %>
49
+ </li>
50
+ <li>
51
+ <i class="fa fa-folder-open-o"></i>
52
+ <%= link_to "#" do %>
53
+ <span class="font-lato">Design</span>
54
+ <% end %>
55
+ <%= link_to "#" do %>
56
+ <span class="font-lato">Photography</span>
57
+ <% end %>
58
+ </li>
59
+ <li>
60
+ <%= link_to "#" do %>
61
+ <i class="fa fa-user"></i>
62
+ <span class="font-lato"><%= frontend_article.user_name %></span>
63
+ <% end %>
64
+ </li>
65
+ </ul>
66
+ <div><%= truncate(frontend_article.psttext, :length => 420, :escape => false) %></div>
67
+ </div>
68
+ <% end %>
69
+
70
+ </div>
71
+ <!-- Blog List -->
72
+
73
+ </div>
74
+ </div>
75
+ <section>
76
+ <!-- Page Content -->
@@ -1 +1,72 @@
1
- <%= link_to 'Back', frontend_articles_path %>
1
+ <!-- Title System -->
2
+ <% phc_title "Blog" %>
3
+ <% phc_title_tagline "PHCNetworks News & Information" %>
4
+ <!-- Title System -->
5
+
6
+ <!-- Page Header -->
7
+ <section class="page-header dark page-header-xs">
8
+ <div class="container">
9
+ <h1><%= yield(:phc_title) %> <small><%= yield(:phc_title_tagline) %></small></h1>
10
+ <ol class="breadcrumb">
11
+ <li><a href="#">Home</a></li>
12
+ <li><a href="#">Blog</a></li>
13
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
14
+ </ol>
15
+ </div>
16
+ </section>
17
+ <!-- Page Header -->
18
+
19
+ <section>
20
+ <div class="container">
21
+ <div class="row">
22
+
23
+ <!-- Blog List -->
24
+ <div class="col-md-9 col-sm-9">
25
+ <h1 class="blog-post-title"><%= @articles_single.psttitle %></h1>
26
+ <ul class="blog-post-info list-inline">
27
+ <li>
28
+ <%= link_to "#" do %>
29
+ <i class="fa fa-clock-o"></i>
30
+ <span class="font-lato"><%= @articles_single.created_at %></span>
31
+ <% end %>
32
+ </li>
33
+ <li>
34
+ <%= link_to "#" do %>
35
+ <i class="fa fa-comment-o"></i>
36
+ <span class="font-lato">0 Comments</span>
37
+ <% end %>
38
+ </li>
39
+ <li>
40
+ <i class="fa fa-folder-open-o"></i>
41
+ <%= link_to "#" do %>
42
+ <span class="font-lato">Design</span>
43
+ <% end %>
44
+ <%= link_to "#" do %>
45
+ <span class="font-lato">Photography</span>
46
+ <% end %>
47
+ </li>
48
+ <li>
49
+ <%= link_to "#" do %>
50
+ <i class="fa fa-user"></i>
51
+ <span class="font-lato"><%= @articles_single.user_name %></span>
52
+ <% end %>
53
+ </li>
54
+ </ul>
55
+ <% if @articles_single.pstimage? %>
56
+ <figure class="margin-bottom-20">
57
+ <%= image_tag @articles_single.pstimage_url, class: "img-responsive" %>
58
+ </figure>
59
+ <% end %>
60
+ <div><%= @articles_single.psttext.html_safe %></div>
61
+ </div>
62
+ <!-- Blog List -->
63
+
64
+ <!-- Right Sidebar -->
65
+ <div class="col-md-3 col-sm-3">
66
+ </div>
67
+ <!-- Right Sidebar -->
68
+
69
+ </div>
70
+ </div>
71
+ <section>
72
+ <!-- Page Content -->
data/config/routes.rb CHANGED
@@ -1,19 +1,27 @@
1
1
  Phcpress::Engine.routes.draw do
2
2
 
3
- # Frontend Routes
3
+ # Frontend
4
4
  namespace :frontend do
5
5
  resources :articles
6
6
  end
7
+
8
+ # API
9
+ namespace :api do
10
+ namespace :v1 do
11
+ resources :posts, defaults: {format: 'json'}
12
+ resources :categories, defaults: {format: 'json'}
13
+ end
14
+ end
7
15
 
8
16
  # Article Routes
9
17
  namespace :articles do
10
- resources :posts, class_name: 'Phcpress::Articles::Post'
18
+ resources :posts, class_name: 'Phcpresspro::Articles::Post'
11
19
  end
12
20
 
13
21
  # Module Routes
14
22
  namespace :modules do
15
- resources :connections, class_name: 'Phcpress::Modules::Connection'
16
- resources :categories, class_name: 'Phcpress::Modules::Category'
23
+ resources :connections, class_name: 'Phcpresspro::Modules::Connection'
24
+ resources :categories, class_name: 'Phcpresspro::Modules::Category'
17
25
  end
18
26
 
19
27
  end
@@ -1,3 +1,3 @@
1
1
  module Phcpress
2
- VERSION = "6.2.2"
2
+ VERSION = "6.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.2
4
+ version: 6.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,14 +70,20 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '1.0'
73
+ version: '1.1'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 1.1.1
74
77
  type: :runtime
75
78
  prerelease: false
76
79
  version_requirements: !ruby/object:Gem::Requirement
77
80
  requirements:
78
81
  - - "~>"
79
82
  - !ruby/object:Gem::Version
80
- version: '1.0'
83
+ version: '1.1'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 1.1.1
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: phctitleseo
83
89
  requirement: !ruby/object:Gem::Requirement
@@ -410,20 +416,14 @@ dependencies:
410
416
  requirements:
411
417
  - - "~>"
412
418
  - !ruby/object:Gem::Version
413
- version: '2.10'
414
- - - ">="
415
- - !ruby/object:Gem::Version
416
- version: 2.10.2
419
+ version: '2.11'
417
420
  type: :development
418
421
  prerelease: false
419
422
  version_requirements: !ruby/object:Gem::Requirement
420
423
  requirements:
421
424
  - - "~>"
422
425
  - !ruby/object:Gem::Version
423
- version: '2.10'
424
- - - ">="
425
- - !ruby/object:Gem::Version
426
- version: 2.10.2
426
+ version: '2.11'
427
427
  - !ruby/object:Gem::Dependency
428
428
  name: byebug
429
429
  requirement: !ruby/object:Gem::Requirement
@@ -557,9 +557,9 @@ files:
557
557
  - Rakefile
558
558
  - app/assets/config/phcpress_manifest.js
559
559
  - app/assets/javascripts/phcpress/application.js
560
- - app/assets/javascripts/phcpress/editors/phc_summernote.js
561
- - app/assets/stylesheets/phcpress/_custom.scss
562
560
  - app/assets/stylesheets/phcpress/application.scss
561
+ - app/controllers/phcpress/api/v1/categories_controller.rb
562
+ - app/controllers/phcpress/api/v1/posts_controller.rb
563
563
  - app/controllers/phcpress/application_controller.rb
564
564
  - app/controllers/phcpress/articles/posts_controller.rb
565
565
  - app/controllers/phcpress/frontend/articles_controller.rb
@@ -568,6 +568,8 @@ files:
568
568
  - app/helpers/phcpress/application_helper.rb
569
569
  - app/jobs/phcpress/application_job.rb
570
570
  - app/mailers/phcpress/application_mailer.rb
571
+ - app/models/phcpress/api/v1/category.rb
572
+ - app/models/phcpress/api/v1/post.rb
571
573
  - app/models/phcpress/application_record.rb
572
574
  - app/models/phcpress/articles.rb
573
575
  - app/models/phcpress/articles/post.rb
@@ -583,6 +585,8 @@ files:
583
585
  - app/views/layouts/components/backend/topbar/_topbar_links.html.erb
584
586
  - app/views/layouts/phcpress/application.html.erb
585
587
  - app/views/layouts/phcpress/frontend.html.erb
588
+ - app/views/phcpress/api/v1/categories/index.json.rabl
589
+ - app/views/phcpress/api/v1/posts/index.json.rabl
586
590
  - app/views/phcpress/articles/posts/_form.html.erb
587
591
  - app/views/phcpress/articles/posts/edit.html.erb
588
592
  - app/views/phcpress/articles/posts/index.html.erb
@@ -1,27 +0,0 @@
1
- $(function() {
2
- var summer_note;
3
- summer_note = $('#articles_post_psttext');
4
- summer_note.summernote({
5
- height: 800,
6
- toolbar: [
7
- // [groupName, [list of button]]
8
- ['style', ['bold', 'italic', 'underline', 'clear']],
9
- ['font', ['strikethrough', 'superscript', 'subscript']],
10
- ['fontsize', ['fontsize']],
11
- ['color', ['color']],
12
- ['para', ['ul', 'ol', 'paragraph']],
13
- ['height', ['height']],
14
- ['view', ['fullscreen', 'codeview']],
15
- ],
16
- codemirror: {
17
- lineNumbers: true,
18
- tabSize: 2,
19
- theme: "solarized light"
20
- }
21
- });
22
- summer_note.code(summer_note.val());
23
- return summer_note.closest('form').submit(function() {
24
- summer_note.val(summer_note.code());
25
- return true;
26
- });
27
- });
@@ -1,4 +0,0 @@
1
- // Top Padding Override
2
- .container {
3
- padding-top:40px;
4
- }