phcpresspro 10.0.0 → 10.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +15 -15
- data/Rakefile +1 -1
- data/app/assets/config/phcpresspro_manifest.js +1 -1
- data/app/assets/javascripts/phcpresspro/application.js +1 -1
- data/app/assets/stylesheets/phcpresspro/application.scss +1 -1
- data/app/controllers/phcpresspro/api/v1/categories_controller.rb +4 -4
- data/app/controllers/phcpresspro/api/v1/posts_controller.rb +1 -1
- data/app/controllers/phcpresspro/application_controller.rb +10 -10
- data/app/controllers/phcpresspro/articles/posts_controller.rb +11 -11
- data/app/controllers/phcpresspro/frontend/articles_controller.rb +5 -5
- data/app/controllers/phcpresspro/modules/categories_controller.rb +12 -12
- data/app/controllers/phcpresspro/modules/connections_controller.rb +12 -12
- data/app/helpers/phcpresspro/application_helper.rb +2 -2
- data/app/jobs/phcpresspro/application_job.rb +1 -1
- data/app/mailers/phcpresspro/application_mailer.rb +1 -1
- data/app/models/phcpresspro/api/v1/category.rb +1 -1
- data/app/models/phcpresspro/api/v1/post.rb +1 -1
- data/app/models/phcpresspro/application_record.rb +1 -1
- data/app/models/phcpresspro/articles.rb +1 -1
- data/app/models/phcpresspro/articles/post.rb +5 -5
- data/app/models/phcpresspro/frontend.rb +1 -1
- data/app/models/phcpresspro/frontend/article.rb +1 -1
- data/app/models/phcpresspro/modules.rb +1 -1
- data/app/models/phcpresspro/modules/category.rb +1 -1
- data/app/models/phcpresspro/modules/connection.rb +3 -3
- data/app/uploaders/phcpresspro/pstimage_uploader.rb +2 -2
- data/app/views/layouts/phcpresspro/application.html.erb +5 -5
- data/app/views/layouts/phcpresspro/components/backend/footer/_footer.html.erb +2 -2
- data/app/views/layouts/phcpresspro/components/backend/navigation/_top_bar.html.erb +2 -2
- data/app/views/layouts/phcpresspro/components/backend/sidebars/_left_sidebar.html.erb +3 -3
- data/app/views/layouts/phcpresspro/frontend.html.erb +20 -20
- data/app/views/phcpresspro/api/v1/categories/index.json.rabl +1 -1
- data/app/views/phcpresspro/api/v1/posts/index.json.rabl +1 -1
- data/app/views/phcpresspro/articles/posts/_form.html.erb +4 -4
- data/app/views/phcpresspro/articles/posts/edit.html.erb +1 -1
- data/app/views/phcpresspro/articles/posts/index.html.erb +2 -2
- data/app/views/phcpresspro/articles/posts/new.html.erb +1 -1
- data/app/views/phcpresspro/articles/posts/show.html.erb +1 -1
- data/app/views/phcpresspro/frontend/articles/index.html.erb +8 -8
- data/app/views/phcpresspro/frontend/articles/show.html.erb +4 -4
- data/app/views/phcpresspro/modules/categories/_form.html.erb +1 -1
- data/app/views/phcpresspro/modules/categories/index.html.erb +2 -2
- data/app/views/phcpresspro/modules/connections/_form.html.erb +1 -1
- data/app/views/phcpresspro/modules/connections/edit.html.erb +1 -1
- data/app/views/phcpresspro/modules/connections/index.html.erb +2 -2
- data/app/views/phcpresspro/modules/connections/new.html.erb +1 -1
- data/app/views/phcpresspro/modules/connections/show.html.erb +3 -3
- data/config/routes.rb +3 -3
- data/config/tinymce.yml +1 -1
- data/db/migrate/20160716182936_create_phcpresspro_modules_categories.rb +5 -5
- data/db/migrate/20160718204718_create_phcpresspro_articles_posts.rb +5 -5
- data/db/migrate/20160719221205_create_phcpresspro_modules_connections.rb +5 -5
- data/lib/phcpresspro.rb +1 -1
- data/lib/phcpresspro/engine.rb +24 -17
- data/lib/phcpresspro/version.rb +1 -1
- data/lib/tasks/phcpresspro_tasks.rake +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ba4ac5ecae9c5ec3627ded978f7d3df2e9b295b
|
4
|
+
data.tar.gz: cbaac7f4d8a4b40fcf6bf8a91aa9fc7e27168dbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fb25dcf5fb1d9ba186f126b85afc86670de3753150af0911f57c9133358a48f980a1770921f55f02d20e5d771b808ac5ec61ac60e0869609bbdd3a4ad91b3be
|
7
|
+
data.tar.gz: ba01df99fd5b4042b7237ea6fb6fc3ed6c1ea421062d1088df1c33b483cc7c3ee9167ec9e7e6244846be84e95e0a852bcedc8650cb6ae8199f7604f148496eab
|
data/MIT-LICENSE
CHANGED
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -3,41 +3,41 @@
|
|
3
3
|
|
4
4
|
### PHCPress(PRO) (News/Blog Engine) Documentation
|
5
5
|
PHCPress(PRO) rails CMS engine to manage your website's articles, categories and media.
|
6
|
-
|
6
|
+
|
7
7
|
* Website article posts with WYSIWYG editor.
|
8
8
|
* Upload images locally or use any popular cloud service.
|
9
9
|
* Customizable article categories module included.
|
10
|
-
|
10
|
+
|
11
11
|
#### Step 1 - Add PHCPress to your gemfile and run command
|
12
|
-
|
12
|
+
|
13
13
|
gem 'phcpresspro', '~> 8.0'
|
14
14
|
bundle install
|
15
|
-
|
15
|
+
|
16
16
|
#### Step 2 - Copy PHCPress Database Tables
|
17
17
|
To copy PHCPress' requried database migrations, copy each command individually to your terminal's command line.
|
18
|
-
|
18
|
+
|
19
19
|
rails phcpresspro:install:migrations
|
20
20
|
rails db:migrate
|
21
|
-
|
21
|
+
|
22
22
|
#### Step 3 - Mount PHCPress & Add Routes
|
23
23
|
Mount PHCPress by adding code below to your routes file.
|
24
|
-
|
24
|
+
|
25
25
|
mount Phcpresspro::Engine, :at => '/'
|
26
|
-
|
26
|
+
|
27
27
|
#### Step 4 - Recompile Assets
|
28
28
|
To properly function re-compile your application's assets to copy over requried files.
|
29
|
-
|
29
|
+
|
30
30
|
rails assets:clobber
|
31
31
|
rails assets:precompile
|
32
|
-
|
32
|
+
|
33
33
|
#### Step 5 - Generate Contact Form View (Customization)
|
34
34
|
All PHCPress views and layouts can be overwritten by copying files to your application.
|
35
|
-
|
36
|
-
rails generate phcpresspro:views
|
37
|
-
|
35
|
+
|
36
|
+
rails generate phcpresspro:views
|
37
|
+
|
38
38
|
#### How to Setup Image Uploads
|
39
39
|
PHCPress default Carrierwave settings can be overwritten.
|
40
|
-
|
40
|
+
|
41
41
|
- [How to Override PHCPress Uploader](https://github.com/PHCNetworks/phc-press/wiki/Image-Uploader---Override)
|
42
42
|
- [How to Override Cloudinary Uploader](https://github.com/PHCNetworks/phc-press/wiki/Image-Uploader-(Cloudinary))
|
43
|
-
- [Critical Security Updates](https://github.com/PHCNetworks/phc-press/wiki/Critical-Security-Updates)
|
43
|
+
- [Critical Security Updates](https://github.com/PHCNetworks/phc-press/wiki/Critical-Security-Updates)
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
//= link_directory ../javascripts/phcpresspro .js
|
2
|
-
//= link_directory ../stylesheets/phcpresspro .scss
|
2
|
+
//= link_directory ../stylesheets/phcpresspro .scss
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// Add PHCAdmin2 Javascript
|
2
|
-
//= require phc_admins_main_two
|
2
|
+
//= require phc_admins_main_two
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// Add PHCAdmin2 Styles
|
2
|
-
@import "phc_admins_style_two";
|
2
|
+
@import "phc_admins_style_two";
|
@@ -2,14 +2,14 @@ require_dependency "phcpresspro/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpresspro
|
4
4
|
class Api::V1::CategoriesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Only Responds to API Requests
|
7
7
|
respond_to :json
|
8
|
-
|
8
|
+
|
9
9
|
# Article Category API
|
10
10
|
def index
|
11
11
|
@modules_categories = Modules::Category.order('catname ASC')
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
|
3
|
+
|
4
4
|
# Load Helpers for PHCPress Widgets
|
5
5
|
before_action :phcpress_recent_posts
|
6
|
-
|
6
|
+
|
7
7
|
# Security Filters
|
8
8
|
protect_from_forgery with: :exception
|
9
|
-
|
9
|
+
|
10
10
|
# AuthRocket User Helpers
|
11
11
|
def require_user
|
12
12
|
unless current_user
|
@@ -15,31 +15,31 @@ module Phcpresspro
|
|
15
15
|
redirect_to new_login_url
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def current_user
|
20
20
|
@_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user)
|
21
21
|
end
|
22
22
|
helper_method :current_user
|
23
|
-
|
23
|
+
|
24
24
|
def new_login_url
|
25
25
|
ENV['AUTHROCKET_LOGIN_URL']
|
26
26
|
end
|
27
27
|
helper_method :new_login_url
|
28
|
-
|
28
|
+
|
29
29
|
# Grab Auth Member Information
|
30
30
|
def membership_info
|
31
31
|
AuthRocket::Membership.all(user_id: current_user.id).first
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
# Load Helpers
|
35
35
|
helper Phctitleseo::Engine.helpers
|
36
36
|
helper Phcnotifi::Engine.helpers
|
37
37
|
helper Phcaccountspro::Engine.helpers
|
38
|
-
|
38
|
+
|
39
39
|
# PHCPress Widget Helpers
|
40
40
|
def phcpress_recent_posts
|
41
41
|
@recent_posts = Articles::Post.all
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
end
|
45
|
-
end
|
45
|
+
end
|
@@ -7,25 +7,25 @@ module Phcpresspro
|
|
7
7
|
before_action :require_user
|
8
8
|
before_action :membership_info
|
9
9
|
before_action :set_articles_post, only: [:show, :edit, :update, :destroy]
|
10
|
-
|
10
|
+
|
11
11
|
# Article Index
|
12
12
|
def index
|
13
13
|
@articles_posts = Articles::Post.all
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
# Article Show
|
17
17
|
def show
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
# Article New
|
21
21
|
def new
|
22
22
|
@articles_post = Articles::Post.new
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
# Article Edit
|
26
26
|
def edit
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# POST
|
30
30
|
def create
|
31
31
|
@articles_post = Articles::Post.new(articles_post_params)
|
@@ -40,7 +40,7 @@ module Phcpresspro
|
|
40
40
|
render :new
|
41
41
|
end
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
# PATCH/PUT
|
45
45
|
def update
|
46
46
|
@articles_post.user_id = current_user.id
|
@@ -54,24 +54,24 @@ module Phcpresspro
|
|
54
54
|
render :edit
|
55
55
|
end
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
# DELETE
|
59
59
|
def destroy
|
60
60
|
@articles_post.destroy
|
61
61
|
redirect_to articles_posts_url, notice: 'Post was successfully destroyed.'
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
private
|
65
|
-
|
65
|
+
|
66
66
|
# Common Callbacks
|
67
67
|
def set_articles_post
|
68
68
|
@articles_post = Articles::Post.find(params[:id])
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
# Params Whitelist
|
72
72
|
def articles_post_params
|
73
73
|
params.require(:articles_post).permit(:psttitle, :psttext, :pststatus, :pstimage, :remove_pstimage, :user_name, :user_id, :membership_id, :oganization_id, category_ids: [])
|
74
74
|
end
|
75
75
|
|
76
76
|
end
|
77
|
-
end
|
77
|
+
end
|
@@ -2,19 +2,19 @@ require_dependency "phcpresspro/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpresspro
|
4
4
|
class Frontend::ArticlesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security & Filters
|
7
7
|
layout '/layouts/phcpresspro/frontend.html.erb'
|
8
|
-
|
8
|
+
|
9
9
|
# Article Index
|
10
10
|
def index
|
11
11
|
@articles_index = Articles::Post.where(pststatus: "published")
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Single Article Post
|
15
15
|
def show
|
16
16
|
@articles_single = Articles::Post.where(pststatus: "published").find(params[:id])
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -2,30 +2,30 @@ require_dependency "phcpresspro/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpresspro
|
4
4
|
class Modules::CategoriesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security and Filters
|
7
7
|
before_action :require_user
|
8
8
|
before_action :membership_info
|
9
9
|
before_action :set_modules_category, only: [:show, :edit, :update, :destroy]
|
10
|
-
|
10
|
+
|
11
11
|
# Categories Index
|
12
12
|
def index
|
13
13
|
@modules_categories = Modules::Category.all
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
# Categories Show
|
17
17
|
def show
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
# Categories New
|
21
21
|
def new
|
22
22
|
@modules_category = Modules::Category.new
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
# Categories Edit
|
26
26
|
def edit
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# POST
|
30
30
|
def create
|
31
31
|
@modules_category = Modules::Category.new(modules_category_params)
|
@@ -39,7 +39,7 @@ module Phcpresspro
|
|
39
39
|
render :new
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# PATCH/PUT
|
44
44
|
def update
|
45
45
|
@modules_category.user_id = current_user.id
|
@@ -52,24 +52,24 @@ module Phcpresspro
|
|
52
52
|
render :edit
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
# DELETE
|
57
57
|
def destroy
|
58
58
|
@modules_category.destroy
|
59
59
|
redirect_to modules_categories_url, notice: 'Category was successfully destroyed.'
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
private
|
63
|
-
|
63
|
+
|
64
64
|
# Common Callbacks
|
65
65
|
def set_modules_category
|
66
66
|
@modules_category = Modules::Category.find(params[:id])
|
67
67
|
end
|
68
|
-
|
68
|
+
|
69
69
|
# Whitelist
|
70
70
|
def modules_category_params
|
71
71
|
params.require(:modules_category).permit(:catname, :user_name, :user_id, :membership_id, :oganization_id)
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
end
|
75
75
|
end
|
@@ -2,30 +2,30 @@ require_dependency "phcpresspro/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpresspro
|
4
4
|
class Modules::ConnectionsController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security and Filters
|
7
7
|
before_action :require_user
|
8
8
|
before_action :membership_info
|
9
9
|
before_action :set_modules_connection, only: [:show, :edit, :update, :destroy]
|
10
|
-
|
10
|
+
|
11
11
|
# Connections Index
|
12
12
|
def index
|
13
13
|
@modules_connections = Modules::Connection.all
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
# Connections Show
|
17
17
|
def show
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
# Connections New
|
21
21
|
def new
|
22
22
|
@modules_connection = Modules::Connection.new
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
# Connections Edit
|
26
26
|
def edit
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# POST
|
30
30
|
def create
|
31
31
|
@modules_connection = Modules::Connection.new(modules_connection_params)
|
@@ -39,7 +39,7 @@ module Phcpresspro
|
|
39
39
|
render :new
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# PATCH/PUT
|
44
44
|
def update
|
45
45
|
@modules_connection.user_id = current_user.id
|
@@ -52,24 +52,24 @@ module Phcpresspro
|
|
52
52
|
render :edit
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
# DELETE
|
57
57
|
def destroy
|
58
58
|
@modules_connection.destroy
|
59
59
|
redirect_to modules_connections_url, notice: 'Connection was successfully destroyed.'
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
private
|
63
|
-
|
63
|
+
|
64
64
|
# Common Callbacks
|
65
65
|
def set_modules_connection
|
66
66
|
@modules_connection = Modules::Connection.find(params[:id])
|
67
67
|
end
|
68
|
-
|
68
|
+
|
69
69
|
# Whitelist
|
70
70
|
def modules_connection_params
|
71
71
|
params.require(:modules_connection).permit(:post_id, :category_id, :user_name, :user_id, :membership_id, :oganization_id)
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
end
|
75
75
|
end
|
@@ -5,10 +5,10 @@ module Phcpresspro
|
|
5
5
|
def is_active_controller(controller_name)
|
6
6
|
params[:controller] == controller_name ? "active open selected" : nil
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
def is_active_action(action_name)
|
10
10
|
params[:action] == action_name ? "active" : nil
|
11
11
|
end
|
12
12
|
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class Articles::Post < ApplicationRecord
|
3
|
-
|
3
|
+
|
4
4
|
# For Image Uploads
|
5
5
|
mount_uploader :pstimage, Phcpresspro::PstimageUploader
|
6
|
-
|
6
|
+
|
7
7
|
# Relationships
|
8
8
|
has_many :connections, class_name: 'Phcpresspro::Modules::Connection', dependent: :destroy
|
9
9
|
has_many :categories, class_name: 'Phcpresspro::Modules::Category', :through => :connections
|
10
|
-
|
10
|
+
|
11
11
|
# Validation for Form Fields
|
12
12
|
validates :psttitle,
|
13
13
|
presence: true,
|
@@ -19,6 +19,6 @@ module Phcpresspro
|
|
19
19
|
|
20
20
|
validates :pststatus,
|
21
21
|
presence: true
|
22
|
-
|
22
|
+
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
@@ -9,10 +9,10 @@
|
|
9
9
|
|
10
10
|
<!-- Font -->
|
11
11
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
|
12
|
-
|
12
|
+
|
13
13
|
<!-- Requried Style Sheets -->
|
14
14
|
<%= stylesheet_link_tag "phcpresspro/application", media: "all", 'data-turbolinks-track': 'reload' %>
|
15
|
-
|
15
|
+
|
16
16
|
<!-- Security -->
|
17
17
|
<%= csrf_meta_tags %>
|
18
18
|
|
@@ -33,9 +33,9 @@
|
|
33
33
|
</div>
|
34
34
|
<%= render 'layouts/phcpresspro/components/backend/sidebars/right_sidebar' %>
|
35
35
|
</div>
|
36
|
-
|
36
|
+
|
37
37
|
<!-- Requried JavaScripts -->
|
38
38
|
<%= javascript_include_tag "phcpresspro/application", 'data-turbolinks-track': 'reload' %>
|
39
|
-
|
39
|
+
|
40
40
|
</body>
|
41
|
-
</html>
|
41
|
+
</html>
|
@@ -24,8 +24,8 @@
|
|
24
24
|
<% if defined?(phcpresspro) %>
|
25
25
|
<li class="<%= is_active_controller('phcpresspro/articles/posts') %> <%= is_active_controller('phcpresspro/modules/categories') %>">
|
26
26
|
<%= link_to '#' do %>
|
27
|
-
<i class="fa fa-newspaper-o"></i>
|
28
|
-
<span class="nav-label">News Posts</span>
|
27
|
+
<i class="fa fa-newspaper-o"></i>
|
28
|
+
<span class="nav-label">News Posts</span>
|
29
29
|
<span class="fa arrow"></span>
|
30
30
|
<% end %>
|
31
31
|
<ul class="nav nav-second-level collapse">
|
@@ -37,4 +37,4 @@
|
|
37
37
|
<% end %>
|
38
38
|
|
39
39
|
</ul>
|
40
|
-
</div>
|
40
|
+
</div>
|
@@ -1,48 +1,48 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
|
4
|
+
|
5
5
|
<!-- Meta Info (Page Specific) -->
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
7
|
<title><%= content_for?(:title) ? yield(:title) : "PHCNetworks - News & Developer Blog" %></title>
|
8
|
-
|
8
|
+
|
9
9
|
<!-- Meta Info (All) -->
|
10
10
|
<%= render 'layouts/components/frontend/seo/all_metainfo' %>
|
11
|
-
|
11
|
+
|
12
12
|
<!-- Font -->
|
13
13
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
|
14
|
-
|
14
|
+
|
15
15
|
<!-- Requried StyleSheets -->
|
16
16
|
<%= stylesheet_link_tag "application", media: "all", 'data-turbolinks-track': 'reload' %>
|
17
|
-
|
17
|
+
|
18
18
|
<!-- Requried JavaScripts -->
|
19
19
|
<%= javascript_include_tag "application", 'data-turbolinks-track': 'reload' %>
|
20
|
-
|
20
|
+
|
21
21
|
<!-- Security -->
|
22
22
|
<%= csrf_meta_tags %>
|
23
|
-
|
23
|
+
|
24
24
|
</head>
|
25
25
|
|
26
26
|
<body class="enable-animation">
|
27
|
-
|
27
|
+
|
28
28
|
<div id="slidetop">
|
29
29
|
<%= render 'layouts/components/frontend/header/slideout' %>
|
30
30
|
</div>
|
31
|
-
|
31
|
+
|
32
32
|
<div id="wrapper">
|
33
|
-
|
33
|
+
|
34
34
|
<div id="topBar">
|
35
35
|
<%= render 'layouts/components/frontend/header/topbar' %>
|
36
36
|
</div>
|
37
|
-
|
37
|
+
|
38
38
|
<div id="header" class="sticky clearfix">
|
39
39
|
<%= render 'layouts/components/frontend/navigation/navigation' %>
|
40
40
|
</div>
|
41
|
-
|
41
|
+
|
42
42
|
<%= yield %>
|
43
|
-
|
43
|
+
|
44
44
|
<footer id="footer">
|
45
|
-
|
45
|
+
|
46
46
|
<div class="container">
|
47
47
|
<div class="row">
|
48
48
|
<div class="col-md-3">
|
@@ -56,17 +56,17 @@
|
|
56
56
|
</div>
|
57
57
|
<div class="col-md-3">
|
58
58
|
<%= render 'layouts/components/frontend/footer/footer_socialconnect' %>
|
59
|
-
</div>
|
59
|
+
</div>
|
60
60
|
</div>
|
61
61
|
</div>
|
62
|
-
|
62
|
+
|
63
63
|
<div class="copyright">
|
64
64
|
<%= render 'layouts/components/frontend/footer/footer_copyright' %>
|
65
65
|
</div>
|
66
|
-
|
66
|
+
|
67
67
|
</footer>
|
68
|
-
|
68
|
+
|
69
69
|
</div>
|
70
|
-
|
70
|
+
|
71
71
|
</body>
|
72
|
-
</html>
|
72
|
+
</html>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
object @modules_categories
|
2
|
-
attributes :id, :catname
|
2
|
+
attributes :id, :catname
|
@@ -1,2 +1,2 @@
|
|
1
1
|
object @articles_posts
|
2
|
-
attributes :id, :psttitle, :psttext, :pststatus, :pstimage
|
2
|
+
attributes :id, :psttitle, :psttext, :pststatus, :pstimage
|
@@ -52,9 +52,9 @@
|
|
52
52
|
</div>
|
53
53
|
<div class="col-md-9 ">
|
54
54
|
<div class="ibox float-e-margins">
|
55
|
-
|
55
|
+
|
56
56
|
<div class="ibox-content">
|
57
|
-
|
57
|
+
|
58
58
|
<%= render 'phcnotifi/validations', :object => @articles_post %>
|
59
59
|
|
60
60
|
<div class="form-group">
|
@@ -66,11 +66,11 @@
|
|
66
66
|
<%= f.text_area :psttext, :class => "tinymce form-control", :rows => 20, :cols => 60 %>
|
67
67
|
</div>
|
68
68
|
</div>
|
69
|
-
|
69
|
+
|
70
70
|
</div>
|
71
71
|
</div>
|
72
72
|
|
73
73
|
</div>
|
74
74
|
<% end %>
|
75
75
|
|
76
|
-
<%= tinymce %>
|
76
|
+
<%= tinymce %>
|
@@ -30,28 +30,28 @@
|
|
30
30
|
<% end %>
|
31
31
|
</figure>
|
32
32
|
<% end %>
|
33
|
-
|
33
|
+
|
34
34
|
<h2><%= link_to frontend_article.psttitle, phcpresspro.frontend_article_path(frontend_article) %></h2>
|
35
|
-
|
35
|
+
|
36
36
|
<ul class="blog-post-info list-inline">
|
37
37
|
<li>
|
38
38
|
<%= link_to "#" do %>
|
39
|
-
<i class="fa fa-clock-o"></i>
|
39
|
+
<i class="fa fa-clock-o"></i>
|
40
40
|
<span class="font-lato"><%= frontend_article.created_at %></span>
|
41
41
|
<% end %>
|
42
42
|
</li>
|
43
43
|
<li>
|
44
44
|
<%= link_to "#" do %>
|
45
|
-
<i class="fa fa-comment-o"></i>
|
45
|
+
<i class="fa fa-comment-o"></i>
|
46
46
|
<span class="font-lato">0 Comments</span>
|
47
47
|
<% end %>
|
48
48
|
</li>
|
49
49
|
<li>
|
50
|
-
|
50
|
+
|
51
51
|
</li>
|
52
52
|
<li>
|
53
53
|
<%= link_to "#" do %>
|
54
|
-
<i class="fa fa-user"></i>
|
54
|
+
<i class="fa fa-user"></i>
|
55
55
|
<span class="font-lato"><%= frontend_article.user_name %></span>
|
56
56
|
<% end %>
|
57
57
|
</li>
|
@@ -59,11 +59,11 @@
|
|
59
59
|
<div><%= truncate(frontend_article.psttext, :length => 420, :escape => false) %></div>
|
60
60
|
</div>
|
61
61
|
<% end %>
|
62
|
-
|
62
|
+
|
63
63
|
</div>
|
64
64
|
<!-- Blog List -->
|
65
65
|
|
66
66
|
</div>
|
67
67
|
</div>
|
68
68
|
</section>
|
69
|
-
<!-- Page Content -->
|
69
|
+
<!-- Page Content -->
|
@@ -19,13 +19,13 @@
|
|
19
19
|
<ul class="blog-post-info list-inline">
|
20
20
|
<li>
|
21
21
|
<%= link_to "#" do %>
|
22
|
-
<i class="fa fa-clock-o"></i>
|
22
|
+
<i class="fa fa-clock-o"></i>
|
23
23
|
<span class="font-lato"><%= @articles_single.created_at %></span>
|
24
24
|
<% end %>
|
25
25
|
</li>
|
26
26
|
<li>
|
27
27
|
<%= link_to "#" do %>
|
28
|
-
<i class="fa fa-comment-o"></i>
|
28
|
+
<i class="fa fa-comment-o"></i>
|
29
29
|
<span class="font-lato">0 Comments</span>
|
30
30
|
<% end %>
|
31
31
|
</li>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</li>
|
34
34
|
<li>
|
35
35
|
<%= link_to "#" do %>
|
36
|
-
<i class="fa fa-user"></i>
|
36
|
+
<i class="fa fa-user"></i>
|
37
37
|
<span class="font-lato"><%= @articles_single.user_name %></span>
|
38
38
|
<% end %>
|
39
39
|
</li>
|
@@ -55,4 +55,4 @@
|
|
55
55
|
</div>
|
56
56
|
</div>
|
57
57
|
</section>
|
58
|
-
<!-- Page Content -->
|
58
|
+
<!-- Page Content -->
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<div class="col-lg-12">
|
48
48
|
|
49
49
|
<div class="table-responsive">
|
50
|
-
<table class="table table-striped table-bordered table-hover dataTables-example">
|
50
|
+
<table class="table table-striped table-bordered table-hover dataTables-example">
|
51
51
|
<thead>
|
52
52
|
<tr>
|
53
53
|
<th>Item</th>
|
@@ -75,4 +75,4 @@
|
|
75
75
|
</div>
|
76
76
|
</div>
|
77
77
|
</div>
|
78
|
-
<!-- Page Content -->
|
78
|
+
<!-- Page Content -->
|
@@ -46,9 +46,9 @@
|
|
46
46
|
<div class="ibox-content">
|
47
47
|
<div class="row">
|
48
48
|
<div class="col-lg-12">
|
49
|
-
|
49
|
+
|
50
50
|
<p id="notice"><%= notice %></p>
|
51
|
-
|
51
|
+
|
52
52
|
<%= link_to 'Edit', edit_modules_connection_path(@modules_connection) %> |
|
53
53
|
<%= link_to 'Back', modules_connections_path %>
|
54
54
|
|
@@ -60,4 +60,4 @@
|
|
60
60
|
</div>
|
61
61
|
</div>
|
62
62
|
</div>
|
63
|
-
<!-- Page Content -->
|
63
|
+
<!-- Page Content -->
|
data/config/routes.rb
CHANGED
@@ -8,7 +8,7 @@ Phcpresspro::Engine.routes.draw do
|
|
8
8
|
# API
|
9
9
|
namespace :api do
|
10
10
|
namespace :v1 do
|
11
|
-
resources :posts, defaults: {format: 'json'}
|
11
|
+
resources :posts, defaults: {format: 'json'}
|
12
12
|
resources :categories, defaults: {format: 'json'}
|
13
13
|
end
|
14
14
|
end
|
@@ -17,11 +17,11 @@ Phcpresspro::Engine.routes.draw do
|
|
17
17
|
namespace :articles do
|
18
18
|
resources :posts, class_name: 'Phcpresspro::Articles::Post'
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
# Module Routes
|
22
22
|
namespace :modules do
|
23
23
|
resources :connections, class_name: 'Phcpresspro::Modules::Connection'
|
24
24
|
resources :categories, class_name: 'Phcpresspro::Modules::Category'
|
25
25
|
end
|
26
26
|
|
27
|
-
end
|
27
|
+
end
|
data/config/tinymce.yml
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
class CreatePhcpressproModulesCategories < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :phcpresspro_modules_categories do |t|
|
4
|
-
|
4
|
+
|
5
5
|
t.string :catname
|
6
|
-
|
6
|
+
|
7
7
|
t.string :user_id
|
8
8
|
t.string :user_name
|
9
9
|
t.string :membership_id
|
10
10
|
t.string :oganization_id
|
11
|
-
|
11
|
+
|
12
12
|
t.timestamps
|
13
|
-
|
13
|
+
|
14
14
|
end
|
15
15
|
end
|
16
|
-
end
|
16
|
+
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
class CreatePhcpressproArticlesPosts < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :phcpresspro_articles_posts do |t|
|
4
|
-
|
4
|
+
|
5
5
|
t.string :psttitle
|
6
6
|
t.text :psttext
|
7
7
|
t.string :pststatus
|
8
8
|
t.string :pstimage
|
9
|
-
|
9
|
+
|
10
10
|
t.string :user_id
|
11
11
|
t.string :user_name
|
12
12
|
t.string :membership_id
|
13
13
|
t.string :oganization_id
|
14
|
-
|
14
|
+
|
15
15
|
t.timestamps
|
16
|
-
|
16
|
+
|
17
17
|
end
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
class CreatePhcpressproModulesConnections < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :phcpresspro_modules_connections do |t|
|
4
|
-
|
4
|
+
|
5
5
|
t.references :post
|
6
6
|
t.references :category
|
7
|
-
|
7
|
+
|
8
8
|
t.string :user_id
|
9
9
|
t.string :user_name
|
10
10
|
t.string :membership_id
|
11
11
|
t.string :oganization_id
|
12
|
-
|
12
|
+
|
13
13
|
t.timestamps
|
14
|
-
|
14
|
+
|
15
15
|
end
|
16
16
|
end
|
17
|
-
end
|
17
|
+
end
|
data/lib/phcpresspro.rb
CHANGED
data/lib/phcpresspro/engine.rb
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
|
4
|
-
|
5
|
-
#require 'authrocket'
|
4
|
+
# Main Dependencies
|
6
5
|
require 'paper_trail'
|
7
|
-
|
8
|
-
# PHCEngines & Theme Dependencies
|
9
|
-
require 'phcnotifi'
|
10
|
-
require 'phctitleseo'
|
11
|
-
require 'phctheme1'
|
12
|
-
require 'phcadmin2'
|
13
6
|
require 'phcaccountspro'
|
14
7
|
|
15
|
-
|
8
|
+
# UI & Frontend Dependencies
|
16
9
|
require 'jquery-rails'
|
17
10
|
require 'jquery-ui-rails'
|
18
11
|
require 'sass-rails'
|
@@ -21,20 +14,34 @@ module Phcpresspro
|
|
21
14
|
require 'country_select'
|
22
15
|
require 'gravtastic'
|
23
16
|
|
24
|
-
|
25
|
-
require '
|
17
|
+
# WYSIWYG Editor Dependencies
|
18
|
+
require 'tinymce-rails'
|
19
|
+
|
20
|
+
# API Dependencies
|
21
|
+
require 'rabl'
|
26
22
|
require 'oj'
|
27
23
|
require 'multi_json'
|
28
24
|
require 'responders'
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# Upload & Media Dependencies
|
34
|
-
require 'carrierwave'
|
26
|
+
# Upload & Media Dependencies
|
27
|
+
require 'carrierwave'
|
35
28
|
require 'cloudinary'
|
36
29
|
|
37
|
-
|
30
|
+
# Clean URLS
|
31
|
+
require 'friendly_id'
|
32
|
+
|
33
|
+
# PHCEngine Dependencies
|
34
|
+
require 'phcnotifi'
|
35
|
+
require 'phctitleseo'
|
36
|
+
|
37
|
+
# PHCTheme Dependencies
|
38
|
+
require 'phctheme1'
|
39
|
+
require 'phctheme2'
|
40
|
+
|
41
|
+
# PHCAdmin Dependencies
|
42
|
+
require 'phcadmin2'
|
43
|
+
|
44
|
+
# Isolate Namespace
|
38
45
|
isolate_namespace Phcpresspro
|
39
46
|
|
40
47
|
# Testing Generator
|
data/lib/phcpresspro/version.rb
CHANGED