phcdevworks_core_modules 6.2.0 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_core_modules/application_controller.rb +8 -8
- data/app/controllers/phcdevworks_core_modules/marketing/optimizations_controller.rb +63 -63
- data/app/controllers/phcdevworks_core_modules/post/categories_controller.rb +64 -64
- data/app/views/phcdevworks_core_modules/post/categories/_form.html.erb +1 -6
- data/db/migrate/20201012225709_remove_phcdevworks_core_modules_post_categories.rb +7 -0
- data/lib/phcdevworks_core_modules/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6635c022554150178c187cf48a7f16ecda4b989b402941c403aa056207aea48
|
4
|
+
data.tar.gz: a6a28d94cf8459106d1e6a6b023a2efb14971478c7a5114c171038ed4f1cf02b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de7a0617699b18cf9fdd68a0901a20932dd755cdba0a3cee330da038d8ca2d8a16e240dd6e51f798e270dd7f128643809e93f9657de237572bb7145e6fa1ee5
|
7
|
+
data.tar.gz: b5fe93be8810ac04b4b43ecfb02364a241a55f63940b6c09e4d926a3d043f168cec13e28caed34e7178a33dab295be1168831ca112383a824513834d139ba3a3
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module PhcdevworksCoreModules
|
2
|
-
|
2
|
+
class ApplicationController < ActionController::Base
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
# Security Filters
|
5
|
+
protect_from_forgery with: :exception
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
# Load Requried Helper Files
|
8
|
+
helper PhcdevworksActiveMenus::Engine.helpers
|
9
|
+
helper PhcdevworksNotifications::Engine.helpers
|
10
|
+
helper PhcdevworksTitleseo::Engine.helpers
|
11
11
|
|
12
|
-
|
12
|
+
end
|
13
13
|
end
|
@@ -1,81 +1,81 @@
|
|
1
1
|
require_dependency "phcdevworks_core_modules/application_controller"
|
2
2
|
|
3
3
|
module PhcdevworksCoreModules
|
4
|
-
|
4
|
+
class Marketing::OptimizationsController < ApplicationController
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
# Filters & Security
|
7
|
+
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
+
before_action :authenticate_user!
|
9
|
+
before_action :set_paper_trail_whodunnit
|
10
|
+
before_action :set_marketing_optimization, only: [:show, :edit, :update, :destroy]
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
# GET /marketing/optimizations
|
13
|
+
def index
|
14
|
+
@marketing_optimizations = Marketing::Optimization.order('marketing_optimization_page_title ASC')
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
# GET /marketing/optimizations/1
|
18
|
+
def show
|
19
|
+
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
# GET /marketing/optimizations/new
|
22
|
+
def new
|
23
|
+
@marketing_optimization = Marketing::Optimization.new
|
24
|
+
end
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
# GET /marketing/optimizations/1/edit
|
27
|
+
def edit
|
28
|
+
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
30
|
+
# POST /marketing/optimizations
|
31
|
+
def create
|
32
|
+
@marketing_optimization = Marketing::Optimization.new(marketing_optimization_params)
|
33
|
+
@marketing_optimization.user_id = current_user.id
|
34
|
+
@marketing_optimization.org_id = current_user.org_id
|
35
|
+
respond_to do |format|
|
36
|
+
if @marketing_optimization.save
|
37
|
+
format.html { redirect_to marketing_optimizations_path, :flash => { :success => 'SEO Attributes has been Added.' }}
|
38
|
+
format.json { render :show, status: :created, location: @marketing_optimization }
|
39
|
+
else
|
40
|
+
format.html { render :new }
|
41
|
+
format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
|
42
|
+
end
|
43
|
+
end
|
42
44
|
end
|
43
|
-
end
|
44
|
-
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
# PATCH/PUT /marketing/optimizations/1
|
47
|
+
def update
|
48
|
+
respond_to do |format|
|
49
|
+
if @marketing_optimization.update(marketing_optimization_params)
|
50
|
+
format.html { redirect_to marketing_optimizations_path, :flash => { :notice => 'Tutorial has been Updated.' }}
|
51
|
+
format.json { render :show, status: :ok, location: @marketing_optimization }
|
52
|
+
else
|
53
|
+
format.html { render :edit }
|
54
|
+
format.json { render json: @marketing_optimization.errors, status: :unprocessable_entity }
|
55
|
+
end
|
56
|
+
end
|
55
57
|
end
|
56
|
-
end
|
57
|
-
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
# DELETE /marketing/optimizations/1
|
60
|
+
def destroy
|
61
|
+
@marketing_optimization.destroy
|
62
|
+
respond_to do |format|
|
63
|
+
format.html { redirect_to marketing_optimizations_path, :flash => { :error => 'SEO Attributes and Post Connections have all been Removed.' }}
|
64
|
+
format.json { head :no_content }
|
65
|
+
end
|
66
|
+
end
|
67
67
|
|
68
|
-
|
68
|
+
private
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
70
|
+
# Common Callbacks
|
71
|
+
def set_marketing_optimization
|
72
|
+
@marketing_optimization = Marketing::Optimization.find(params[:id])
|
73
|
+
end
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
# Whitelist
|
76
|
+
def marketing_optimization_params
|
77
|
+
params.require(:marketing_optimization).permit(:marketing_optimization_page_title, :marketing_optimization_page_description, :marketing_optimization_og_title, :marketing_optimization_og_description, :marketing_optimization_og_type, :marketing_optimization_og_url, :marketing_optimization_twitter_title, :marketing_optimization_twitter_description, :marketing_optimization_twitter_type, :marketing_optimization_twitter_url, :marketing_optimization_twitter_image, :marketing_optimization_og_image, :slug, :user_id, :org_id)
|
78
|
+
end
|
79
|
+
|
78
80
|
end
|
79
|
-
|
80
|
-
end
|
81
81
|
end
|
@@ -1,81 +1,81 @@
|
|
1
1
|
require_dependency "phcdevworks_core_modules/application_controller"
|
2
2
|
|
3
3
|
module PhcdevworksCoreModules
|
4
|
-
|
5
|
-
|
6
|
-
# Filters & Security
|
7
|
-
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
-
before_action :authenticate_user!
|
9
|
-
before_action :set_paper_trail_whodunnit
|
10
|
-
before_action :set_post_category, only: [:show, :edit, :update, :destroy]
|
4
|
+
class Post::CategoriesController < ApplicationController
|
11
5
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
# Filters & Security
|
7
|
+
#include PhcdevworksCore::PhcpluginsHelper
|
8
|
+
before_action :authenticate_user!
|
9
|
+
before_action :set_paper_trail_whodunnit
|
10
|
+
before_action :set_post_category, only: [:show, :edit, :update, :destroy]
|
16
11
|
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
# GET /post/categories
|
13
|
+
def index
|
14
|
+
@post_categories = Post::Category.order('post_category_name ASC')
|
15
|
+
end
|
20
16
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
# GET /post/categories/1
|
18
|
+
def show
|
19
|
+
end
|
20
|
+
|
21
|
+
# GET /post/categories/new
|
22
|
+
def new
|
23
|
+
@post_category = Post::Category.new
|
24
|
+
end
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
# GET /post/categories/1/edit
|
27
|
+
def edit
|
28
|
+
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
30
|
+
# POST /post/categories
|
31
|
+
def create
|
32
|
+
@post_category = Post::Category.new(post_category_params)
|
33
|
+
@post_category.user_id = current_user.id
|
34
|
+
@post_category.org_id = current_user.org_id
|
35
|
+
respond_to do |format|
|
36
|
+
if @post_category.save
|
37
|
+
format.html { redirect_to post_categories_path, :flash => { :success => 'Category has been Added.' }}
|
38
|
+
format.json { render :show, status: :created, location: @post_category }
|
39
|
+
else
|
40
|
+
format.html { render :new }
|
41
|
+
format.json { render json: @post_category.errors, status: :unprocessable_entity }
|
42
|
+
end
|
43
|
+
end
|
42
44
|
end
|
43
|
-
end
|
44
|
-
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
# PATCH/PUT /post/categories/1
|
47
|
+
def update
|
48
|
+
respond_to do |format|
|
49
|
+
if @post_category.update(post_category_params)
|
50
|
+
format.html { redirect_to post_categories_path, :flash => { :notice => 'Category has been Updated.' }}
|
51
|
+
format.json { render :show, status: :ok, location: @post_category }
|
52
|
+
else
|
53
|
+
format.html { render :edit }
|
54
|
+
format.json { render json: @post_category.errors, status: :unprocessable_entity }
|
55
|
+
end
|
56
|
+
end
|
55
57
|
end
|
56
|
-
end
|
57
|
-
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
# DELETE /post/categories/1
|
60
|
+
def destroy
|
61
|
+
@post_category.destroy
|
62
|
+
respond_to do |format|
|
63
|
+
format.html { redirect_to post_categories_path, :flash => { :error => 'Categories and Category Connections have all been Removed.' }}
|
64
|
+
format.json { head :no_content }
|
65
|
+
end
|
66
|
+
end
|
67
67
|
|
68
|
-
|
68
|
+
private
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
70
|
+
# Common Callbacks
|
71
|
+
def set_post_category
|
72
|
+
@post_category = Post::Category.find(params[:id])
|
73
|
+
end
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
# Whitelist
|
76
|
+
def post_category_params
|
77
|
+
params.require(:post_category).permit(:post_category_name, :slug, :user_id, :org_id)
|
78
|
+
end
|
79
79
|
|
80
|
-
|
80
|
+
end
|
81
81
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!-- Form - Category -->
|
2
2
|
<%= form_with(model: post_category, local: true) do |form| %>
|
3
3
|
|
4
|
-
|
4
|
+
<!-- PHCNotifi Render Validation -->
|
5
5
|
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @post_category %>
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
@@ -10,11 +10,6 @@
|
|
10
10
|
<%= form.label :post_category_name, "Category Name" %>
|
11
11
|
<%= form.text_field :post_category_name, class: "form-control" %>
|
12
12
|
</div>
|
13
|
-
|
14
|
-
<div class="form-group">
|
15
|
-
<label>Attach SEO Data</label>
|
16
|
-
<%= collection_select(:post_category, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
|
17
|
-
</div>
|
18
13
|
<!-- Form Input Fields -->
|
19
14
|
|
20
15
|
<!-- Form Submition Button -->
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_core_modules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -307,6 +307,7 @@ files:
|
|
307
307
|
- db/migrate/20200705223718_create_phcdevworks_core_modules_marketing_optimizations.rb
|
308
308
|
- db/migrate/20200705225433_create_phcdevworks_core_modules_marketing_optimization_versions.rb
|
309
309
|
- db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb
|
310
|
+
- db/migrate/20201012225709_remove_phcdevworks_core_modules_post_categories.rb
|
310
311
|
- lib/phcdevworks_core_modules.rb
|
311
312
|
- lib/phcdevworks_core_modules/engine.rb
|
312
313
|
- lib/phcdevworks_core_modules/version.rb
|