phcdevworks_portfolio 10.1.1 → 11.0.2
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 +3 -0
- data/app/assets/config/phcdevworks_portfolio_manifest.js +2 -3
- data/app/controllers/phcdevworks_portfolio/application_controller.rb +13 -13
- data/app/controllers/phcdevworks_portfolio/project/pages_controller.rb +21 -21
- data/app/controllers/phcdevworks_portfolio/project/posts_controller.rb +76 -76
- data/app/controllers/phcdevworks_portfolio/project/types_controller.rb +77 -77
- data/app/helpers/phcdevworks_portfolio/application_helper.rb +4 -4
- data/app/helpers/phcdevworks_portfolio/project/pages_helper.rb +4 -4
- data/app/helpers/phcdevworks_portfolio/project/posts_helper.rb +4 -4
- data/app/helpers/phcdevworks_portfolio/project/types_helper.rb +4 -4
- data/app/jobs/phcdevworks_portfolio/application_job.rb +4 -4
- data/app/mailers/phcdevworks_portfolio/application_mailer.rb +6 -6
- data/app/models/phcdevworks_portfolio/application_record.rb +5 -5
- data/app/models/phcdevworks_portfolio/project/post.rb +27 -27
- data/app/models/phcdevworks_portfolio/project/type.rb +22 -22
- data/app/models/phcdevworks_portfolio/project.rb +7 -7
- data/app/models/phcdevworks_portfolio/project_post_versions.rb +5 -5
- data/app/models/phcdevworks_portfolio/project_type_versions.rb +5 -5
- data/app/views/layouts/phcdevworks_portfolio/application.html.erb +58 -116
- data/app/views/layouts/phcdevworks_portfolio/components/backend/footer/_footer.html.erb +10 -9
- data/app/views/layouts/phcdevworks_portfolio/components/backend/navigation/_top_menu.html.erb +26 -25
- data/app/views/layouts/phcdevworks_portfolio/components/backend/sidebars/_side_menu.html.erb +491 -349
- data/app/views/phcdevworks_portfolio/project/posts/_form.html.erb +64 -64
- data/app/views/phcdevworks_portfolio/project/posts/edit.html.erb +39 -47
- data/app/views/phcdevworks_portfolio/project/posts/index.html.erb +75 -83
- data/app/views/phcdevworks_portfolio/project/posts/new.html.erb +39 -47
- data/app/views/phcdevworks_portfolio/project/types/_form.html.erb +22 -22
- data/app/views/phcdevworks_portfolio/project/types/edit.html.erb +39 -47
- data/app/views/phcdevworks_portfolio/project/types/index.html.erb +71 -79
- data/app/views/phcdevworks_portfolio/project/types/new.html.erb +39 -47
- data/config/routes.rb +10 -14
- data/config/spring.rb +1 -1
- data/db/migrate/20191014112330_create_phcdevworks_portfolio_project_posts.rb +21 -21
- data/db/migrate/20191021225316_create_phcdevworks_portfolio_project_types.rb +17 -17
- data/db/migrate/20191024232111_create_phcdevworks_portfolio_project_categories_posts.rb +10 -10
- data/db/migrate/20191024232406_create_phcdevworks_portfolio_project_posts_types.rb +10 -10
- data/db/migrate/20191102091459_create_phcdevworks_portfolio_project_post_versions.rb +18 -18
- data/db/migrate/20191102091744_create_phcdevworks_portfolio_project_type_versions.rb +18 -18
- data/lib/phcdevworks_portfolio/engine.rb +45 -45
- data/lib/phcdevworks_portfolio/version.rb +3 -3
- metadata +36 -84
- data/app/assets/stylesheets/phcdevworks_portfolio/application.scss +0 -0
- data/app/assets/stylesheets/phcdevworks_portfolio/project/pages.scss +0 -3
- data/app/assets/stylesheets/phcdevworks_portfolio/project/posts.scss +0 -0
- data/app/assets/stylesheets/phcdevworks_portfolio/project/types.scss +0 -3
- data/app/views/layouts/phcdevworks_portfolio/frontend.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: ac6ba044d95b9926fc3cafd5d0d93d8b231edc1e21204826ea7cca4289b2d4ff
|
4
|
+
data.tar.gz: 3c7f589db57c3daf244d780be419b5ab9d516511b3a0618900f905816e94af76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9b72fafeadd3814795f512b343cee2a07e807e402e1a4678f77c90aec4da2ec48f7bf79997f5f28156f3d7cbe55bb1ad0713827a9d48dfd21e136785460ff3
|
7
|
+
data.tar.gz: d3e69993301cbde223614d031a0d8b0a0890b95efaa7059ab660179e2b5b45b7a562b87b502650abcd18844b5d8114643e95027c97714707d47b206c5c468d1c
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -0,0 +1,3 @@
|
|
1
|
+
### Status
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/phcdevworks_portfolio.svg)](https://badge.fury.io/rb/phcdevworks_portfolio) [![Publish to Github.com](https://github.com/phcdevworks/phcdevworks_portfolio/actions/workflows/publish_gem_github_com.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_portfolio/actions/workflows/publish_gem_github_com.yml) [![Publish to Rubygems.org](https://github.com/phcdevworks/phcdevworks_portfolio/actions/workflows/publish_gem_rubygems_org.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_portfolio/actions/workflows/publish_gem_rubygems_org.yml)
|
@@ -1,3 +1,2 @@
|
|
1
|
-
//=
|
2
|
-
//= link phcthemes_admin_panel_pack_coloradmin.
|
3
|
-
//= link phcthemes_admin_panel_pack_coloradmin.js
|
1
|
+
//= link coloradmin/default/phcthemes_admin_panel_pack_coloradmin.css
|
2
|
+
//= link coloradmin/phcthemes_admin_panel_pack_coloradmin.js
|
@@ -1,13 +1,13 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ApplicationController < ActionController::Base
|
3
|
-
|
4
|
-
# Security Filters
|
5
|
-
protect_from_forgery with: :exception
|
6
|
-
|
7
|
-
# Load Requried Helper Files
|
8
|
-
helper PhcdevworksActiveMenus::Engine.helpers
|
9
|
-
helper PhcdevworksNotifications::Engine.helpers
|
10
|
-
helper PhcdevworksTitleseo::Engine.helpers
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
# Security Filters
|
5
|
+
protect_from_forgery with: :exception
|
6
|
+
|
7
|
+
# Load Requried Helper Files
|
8
|
+
helper PhcdevworksActiveMenus::Engine.helpers
|
9
|
+
helper PhcdevworksNotifications::Engine.helpers
|
10
|
+
helper PhcdevworksTitleseo::Engine.helpers
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -1,21 +1,21 @@
|
|
1
|
-
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
-
|
3
|
-
module PhcdevworksPortfolio
|
4
|
-
class Project::PagesController < ApplicationController
|
5
|
-
|
6
|
-
# Layout
|
7
|
-
layout "phcdevworks_portfolio/frontend"
|
8
|
-
|
9
|
-
# INDEX
|
10
|
-
def index
|
11
|
-
@phcdevworks_projects_index = Project::Post.where(project_post_status: "published").order("project_post_title ASC")
|
12
|
-
@phcdevworks_projects_randomizer = Project::Post.order('RANDOM()').limit(1)
|
13
|
-
end
|
14
|
-
|
15
|
-
# SHOW
|
16
|
-
def show
|
17
|
-
@phcdevworks_projects_single = Project::Post.friendly.find(params[:id])
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
1
|
+
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
+
|
3
|
+
module PhcdevworksPortfolio
|
4
|
+
class Project::PagesController < ApplicationController
|
5
|
+
|
6
|
+
# Layout
|
7
|
+
layout "phcdevworks_portfolio/frontend"
|
8
|
+
|
9
|
+
# INDEX
|
10
|
+
def index
|
11
|
+
@phcdevworks_projects_index = Project::Post.where(project_post_status: "published").order("project_post_title ASC")
|
12
|
+
@phcdevworks_projects_randomizer = Project::Post.order('RANDOM()').limit(1)
|
13
|
+
end
|
14
|
+
|
15
|
+
# SHOW
|
16
|
+
def show
|
17
|
+
@phcdevworks_projects_single = Project::Post.friendly.find(params[:id])
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -1,77 +1,77 @@
|
|
1
|
-
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
-
|
3
|
-
module PhcdevworksPortfolio
|
4
|
-
class Project::PostsController < ApplicationController
|
5
|
-
|
6
|
-
# Filters & Security
|
7
|
-
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
-
before_action :authenticate_user!
|
9
|
-
before_action :set_paper_trail_whodunnit
|
10
|
-
before_action :set_project_post, only: [:edit, :update, :destroy]
|
11
|
-
|
12
|
-
# GET /project/posts
|
13
|
-
def index
|
14
|
-
@project_posts = Project::Post.all.order("project_post_title ASC")
|
15
|
-
end
|
16
|
-
|
17
|
-
# GET /project/posts/new
|
18
|
-
def new
|
19
|
-
@project_post = Project::Post.new
|
20
|
-
end
|
21
|
-
|
22
|
-
# GET /project/posts/1/edit
|
23
|
-
def edit
|
24
|
-
end
|
25
|
-
|
26
|
-
# POST /project/posts
|
27
|
-
def create
|
28
|
-
@project_post = Project::Post.new(project_post_params)
|
29
|
-
@project_post.user_id = current_user.id
|
30
|
-
@project_post.org_id = current_user.org_id
|
31
|
-
respond_to do |format|
|
32
|
-
if @project_post.save
|
33
|
-
format.html { redirect_to project_posts_path, :flash => { :success => 'Project Post has been Added.' }}
|
34
|
-
format.json { render :show, status: :created, location: @project_post }
|
35
|
-
else
|
36
|
-
format.html { render :new }
|
37
|
-
format.json { render json: @project_post.errors, status: :unprocessable_entity }
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# PATCH/PUT /project/posts/1
|
43
|
-
def update
|
44
|
-
respond_to do |format|
|
45
|
-
if @project_post.update(project_post_params)
|
46
|
-
format.html { redirect_to project_posts_path, :flash => { :notice => 'Project Post has been Updated.' }}
|
47
|
-
format.json { render :show, status: :ok, location: @project_post }
|
48
|
-
else
|
49
|
-
format.html { render :edit }
|
50
|
-
format.json { render json: @project_post.errors, status: :unprocessable_entity }
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# DELETE /project/posts/1
|
56
|
-
def destroy
|
57
|
-
@project_post.destroy
|
58
|
-
respond_to do |format|
|
59
|
-
format.html { redirect_to project_posts_path, :flash => { :error => 'Project Post has been Removed.' }}
|
60
|
-
format.json { head :no_content }
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
private
|
65
|
-
|
66
|
-
# Common Callbacks
|
67
|
-
def set_project_post
|
68
|
-
@project_post = Project::Post.find(params[:id])
|
69
|
-
end
|
70
|
-
|
71
|
-
# Whitelist
|
72
|
-
def project_post_params
|
73
|
-
params.require(:project_post).permit(:project_post_title, :project_post_description, :project_post_url, :project_post_type, :project_post_status, :project_post_image, :project_post_images, :slug, :optimization_id, :user_id, :org_id, category_ids: [], type_ids: [])
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
1
|
+
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
+
|
3
|
+
module PhcdevworksPortfolio
|
4
|
+
class Project::PostsController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
+
before_action :authenticate_user!
|
9
|
+
before_action :set_paper_trail_whodunnit
|
10
|
+
before_action :set_project_post, only: [:edit, :update, :destroy]
|
11
|
+
|
12
|
+
# GET /project/posts
|
13
|
+
def index
|
14
|
+
@project_posts = Project::Post.all.order("project_post_title ASC")
|
15
|
+
end
|
16
|
+
|
17
|
+
# GET /project/posts/new
|
18
|
+
def new
|
19
|
+
@project_post = Project::Post.new
|
20
|
+
end
|
21
|
+
|
22
|
+
# GET /project/posts/1/edit
|
23
|
+
def edit
|
24
|
+
end
|
25
|
+
|
26
|
+
# POST /project/posts
|
27
|
+
def create
|
28
|
+
@project_post = Project::Post.new(project_post_params)
|
29
|
+
@project_post.user_id = current_user.id
|
30
|
+
@project_post.org_id = current_user.org_id
|
31
|
+
respond_to do |format|
|
32
|
+
if @project_post.save
|
33
|
+
format.html { redirect_to project_posts_path, :flash => { :success => 'Project Post has been Added.' }}
|
34
|
+
format.json { render :show, status: :created, location: @project_post }
|
35
|
+
else
|
36
|
+
format.html { render :new }
|
37
|
+
format.json { render json: @project_post.errors, status: :unprocessable_entity }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# PATCH/PUT /project/posts/1
|
43
|
+
def update
|
44
|
+
respond_to do |format|
|
45
|
+
if @project_post.update(project_post_params)
|
46
|
+
format.html { redirect_to project_posts_path, :flash => { :notice => 'Project Post has been Updated.' }}
|
47
|
+
format.json { render :show, status: :ok, location: @project_post }
|
48
|
+
else
|
49
|
+
format.html { render :edit }
|
50
|
+
format.json { render json: @project_post.errors, status: :unprocessable_entity }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# DELETE /project/posts/1
|
56
|
+
def destroy
|
57
|
+
@project_post.destroy
|
58
|
+
respond_to do |format|
|
59
|
+
format.html { redirect_to project_posts_path, :flash => { :error => 'Project Post has been Removed.' }}
|
60
|
+
format.json { head :no_content }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
# Common Callbacks
|
67
|
+
def set_project_post
|
68
|
+
@project_post = Project::Post.find(params[:id])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Whitelist
|
72
|
+
def project_post_params
|
73
|
+
params.require(:project_post).permit(:project_post_title, :project_post_description, :project_post_url, :project_post_type, :project_post_status, :project_post_image, :project_post_images, :slug, :optimization_id, :user_id, :org_id, category_ids: [], type_ids: [])
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
77
|
end
|
@@ -1,77 +1,77 @@
|
|
1
|
-
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
-
|
3
|
-
module PhcdevworksPortfolio
|
4
|
-
class Project::TypesController < ApplicationController
|
5
|
-
|
6
|
-
# Filters & Security
|
7
|
-
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
-
before_action :authenticate_user!
|
9
|
-
before_action :set_paper_trail_whodunnit
|
10
|
-
before_action :set_project_type, only: [:edit, :update, :destroy]
|
11
|
-
|
12
|
-
# GET /project/types
|
13
|
-
def index
|
14
|
-
@project_types = Project::Type.all
|
15
|
-
end
|
16
|
-
|
17
|
-
# GET /project/types/new
|
18
|
-
def new
|
19
|
-
@project_type = Project::Type.new
|
20
|
-
end
|
21
|
-
|
22
|
-
# GET /project/types/1/edit
|
23
|
-
def edit
|
24
|
-
end
|
25
|
-
|
26
|
-
# POST /project/types
|
27
|
-
def create
|
28
|
-
@project_type = Project::Type.new(project_type_params)
|
29
|
-
@project_type.user_id = current_user.id
|
30
|
-
@project_type.org_id = current_user.org_id
|
31
|
-
respond_to do |format|
|
32
|
-
if @project_type.save
|
33
|
-
format.html { redirect_to project_types_path, :flash => { :success => 'Project Type has been Added.' }}
|
34
|
-
format.json { render :show, status: :created, location: @project_type }
|
35
|
-
else
|
36
|
-
format.html { render :new }
|
37
|
-
format.json { render json: @project_type.errors, status: :unprocessable_entity }
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# PATCH/PUT /project/types/1
|
43
|
-
def update
|
44
|
-
respond_to do |format|
|
45
|
-
if @project_type.update(project_type_params)
|
46
|
-
format.html { redirect_to project_types_path, :flash => { :notice => 'Project Type has been Updated.' }}
|
47
|
-
format.json { render :show, status: :ok, location: @project_type }
|
48
|
-
else
|
49
|
-
format.html { render :edit }
|
50
|
-
format.json { render json: @project_type.errors, status: :unprocessable_entity }
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# DELETE /project/types/1
|
56
|
-
def destroy
|
57
|
-
@project_type.destroy
|
58
|
-
respond_to do |format|
|
59
|
-
format.html { redirect_to project_types_path, :flash => { :error => 'Project Type has been Removed.' }}
|
60
|
-
format.json { head :no_content }
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
private
|
65
|
-
|
66
|
-
# Common Callbacks
|
67
|
-
def set_project_type
|
68
|
-
@project_type = Project::Type.find(params[:id])
|
69
|
-
end
|
70
|
-
|
71
|
-
# Whitelist
|
72
|
-
def project_type_params
|
73
|
-
params.require(:project_type).permit(:project_type_name, :slug, :user_id, :org_id)
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
1
|
+
require_dependency "phcdevworks_portfolio/application_controller"
|
2
|
+
|
3
|
+
module PhcdevworksPortfolio
|
4
|
+
class Project::TypesController < ApplicationController
|
5
|
+
|
6
|
+
# Filters & Security
|
7
|
+
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
+
before_action :authenticate_user!
|
9
|
+
before_action :set_paper_trail_whodunnit
|
10
|
+
before_action :set_project_type, only: [:edit, :update, :destroy]
|
11
|
+
|
12
|
+
# GET /project/types
|
13
|
+
def index
|
14
|
+
@project_types = Project::Type.all
|
15
|
+
end
|
16
|
+
|
17
|
+
# GET /project/types/new
|
18
|
+
def new
|
19
|
+
@project_type = Project::Type.new
|
20
|
+
end
|
21
|
+
|
22
|
+
# GET /project/types/1/edit
|
23
|
+
def edit
|
24
|
+
end
|
25
|
+
|
26
|
+
# POST /project/types
|
27
|
+
def create
|
28
|
+
@project_type = Project::Type.new(project_type_params)
|
29
|
+
@project_type.user_id = current_user.id
|
30
|
+
@project_type.org_id = current_user.org_id
|
31
|
+
respond_to do |format|
|
32
|
+
if @project_type.save
|
33
|
+
format.html { redirect_to project_types_path, :flash => { :success => 'Project Type has been Added.' }}
|
34
|
+
format.json { render :show, status: :created, location: @project_type }
|
35
|
+
else
|
36
|
+
format.html { render :new }
|
37
|
+
format.json { render json: @project_type.errors, status: :unprocessable_entity }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# PATCH/PUT /project/types/1
|
43
|
+
def update
|
44
|
+
respond_to do |format|
|
45
|
+
if @project_type.update(project_type_params)
|
46
|
+
format.html { redirect_to project_types_path, :flash => { :notice => 'Project Type has been Updated.' }}
|
47
|
+
format.json { render :show, status: :ok, location: @project_type }
|
48
|
+
else
|
49
|
+
format.html { render :edit }
|
50
|
+
format.json { render json: @project_type.errors, status: :unprocessable_entity }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# DELETE /project/types/1
|
56
|
+
def destroy
|
57
|
+
@project_type.destroy
|
58
|
+
respond_to do |format|
|
59
|
+
format.html { redirect_to project_types_path, :flash => { :error => 'Project Type has been Removed.' }}
|
60
|
+
format.json { head :no_content }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
# Common Callbacks
|
67
|
+
def set_project_type
|
68
|
+
@project_type = Project::Type.find(params[:id])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Whitelist
|
72
|
+
def project_type_params
|
73
|
+
params.require(:project_type).permit(:project_type_name, :slug, :user_id, :org_id)
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
module ApplicationHelper
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
module ApplicationHelper
|
3
|
+
end
|
4
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
module Project::PagesHelper
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
module Project::PagesHelper
|
3
|
+
end
|
4
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
module Project::PostsHelper
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
module Project::PostsHelper
|
3
|
+
end
|
4
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
module Project::TypesHelper
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
module Project::TypesHelper
|
3
|
+
end
|
4
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ApplicationJob < ActiveJob::Base
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ApplicationJob < ActiveJob::Base
|
3
|
+
end
|
4
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ApplicationMailer < ActionMailer::Base
|
3
|
-
default from: 'from@example.com'
|
4
|
-
layout 'mailer'
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ApplicationMailer < ActionMailer::Base
|
3
|
+
default from: 'from@example.com'
|
4
|
+
layout 'mailer'
|
5
|
+
end
|
6
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ApplicationRecord < ActiveRecord::Base
|
3
|
-
self.abstract_class = true
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ApplicationRecord < ActiveRecord::Base
|
3
|
+
self.abstract_class = true
|
4
|
+
end
|
5
|
+
end
|
@@ -1,27 +1,27 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class Project::Post < ApplicationRecord
|
3
|
-
|
4
|
-
# Clean URL Initialize
|
5
|
-
extend FriendlyId
|
6
|
-
|
7
|
-
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectPostVersions'
|
9
|
-
|
10
|
-
# Image Upload
|
11
|
-
has_one_attached :project_post_image
|
12
|
-
|
13
|
-
# Relationships
|
14
|
-
belongs_to :user, class_name: "
|
15
|
-
has_and_belongs_to_many :types, class_name: "PhcdevworksPortfolio::Project::Type", :join_table => "phcdevworks_portfolio_project_posts_types", :dependent => :destroy
|
16
|
-
has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Post::Category", :join_table => "phcdevworks_portfolio_project_categories_posts", :dependent => :destroy
|
17
|
-
belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
|
18
|
-
|
19
|
-
# Clean URL Define
|
20
|
-
friendly_id :project_post_nice_urls, use: [:slugged, :finders]
|
21
|
-
|
22
|
-
def project_post_nice_urls
|
23
|
-
[:project_post_title]
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class Project::Post < ApplicationRecord
|
3
|
+
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
|
+
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectPostVersions'
|
9
|
+
|
10
|
+
# Image Upload
|
11
|
+
has_one_attached :project_post_image
|
12
|
+
|
13
|
+
# Relationships
|
14
|
+
belongs_to :user, class_name: "PhcdevworksAccountsDevise::User"
|
15
|
+
has_and_belongs_to_many :types, class_name: "PhcdevworksPortfolio::Project::Type", :join_table => "phcdevworks_portfolio_project_posts_types", :dependent => :destroy
|
16
|
+
has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Post::Category", :join_table => "phcdevworks_portfolio_project_categories_posts", :dependent => :destroy
|
17
|
+
belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
|
18
|
+
|
19
|
+
# Clean URL Define
|
20
|
+
friendly_id :project_post_nice_urls, use: [:slugged, :finders]
|
21
|
+
|
22
|
+
def project_post_nice_urls
|
23
|
+
[:project_post_title]
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -1,22 +1,22 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class Project::Type < ApplicationRecord
|
3
|
-
|
4
|
-
# Clean URL Initialize
|
5
|
-
extend FriendlyId
|
6
|
-
|
7
|
-
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectTypeVersions'
|
9
|
-
|
10
|
-
# Relationships
|
11
|
-
belongs_to :user, class_name: "
|
12
|
-
has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_project_posts_types", :dependent => :destroy
|
13
|
-
|
14
|
-
# Clean URL Define
|
15
|
-
friendly_id :project_type_nice_urls, use: [:slugged, :finders]
|
16
|
-
|
17
|
-
def project_type_nice_urls
|
18
|
-
[:project_type_name]
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class Project::Type < ApplicationRecord
|
3
|
+
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
|
+
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectTypeVersions'
|
9
|
+
|
10
|
+
# Relationships
|
11
|
+
belongs_to :user, class_name: "PhcdevworksAccountsDevise::User"
|
12
|
+
has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_project_posts_types", :dependent => :destroy
|
13
|
+
|
14
|
+
# Clean URL Define
|
15
|
+
friendly_id :project_type_nice_urls, use: [:slugged, :finders]
|
16
|
+
|
17
|
+
def project_type_nice_urls
|
18
|
+
[:project_type_name]
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
module Project
|
3
|
-
def self.table_name_prefix
|
4
|
-
'phcdevworks_portfolio_project_'
|
5
|
-
end
|
6
|
-
end
|
7
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
module Project
|
3
|
+
def self.table_name_prefix
|
4
|
+
'phcdevworks_portfolio_project_'
|
5
|
+
end
|
6
|
+
end
|
7
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ProjectPostVersions < PaperTrail::Version
|
3
|
-
self.table_name = :phcdevworks_portfolio_project_post_versions
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ProjectPostVersions < PaperTrail::Version
|
3
|
+
self.table_name = :phcdevworks_portfolio_project_post_versions
|
4
|
+
end
|
5
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
module PhcdevworksPortfolio
|
2
|
-
class ProjectTypeVersions < PaperTrail::Version
|
3
|
-
self.table_name = :phcdevworks_portfolio_project_type_versions
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module PhcdevworksPortfolio
|
2
|
+
class ProjectTypeVersions < PaperTrail::Version
|
3
|
+
self.table_name = :phcdevworks_portfolio_project_type_versions
|
4
|
+
end
|
5
|
+
end
|