phcdevworks_core_modules 4.0.0 → 5.0.0
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/marketing/optimizations_controller.rb +2 -2
- data/app/controllers/phcdevworks_core_modules/post/categories_controller.rb +2 -2
- data/app/models/phcdevworks_core_modules/marketing/optimization.rb +8 -8
- data/app/models/phcdevworks_core_modules/post/category.rb +6 -10
- data/app/views/phcdevworks_core_modules/marketing/optimizations/_form.html.erb +37 -35
- data/app/views/phcdevworks_core_modules/marketing/optimizations/index.html.erb +5 -5
- data/app/views/phcdevworks_core_modules/marketing/optimizations/show.html.erb +23 -18
- data/app/views/phcdevworks_core_modules/post/categories/_form.html.erb +3 -3
- data/app/views/phcdevworks_core_modules/post/categories/index.html.erb +1 -1
- data/app/views/phcdevworks_core_modules/post/categories/show.html.erb +1 -1
- data/db/migrate/20200705223718_create_phcdevworks_core_modules_marketing_optimizations.rb +10 -10
- data/db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb +1 -1
- data/lib/phcdevworks_core_modules/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cdcd60a2ee952651bdd4d766b8fe5370736f221ad38d3305a1c954b583c6360
|
4
|
+
data.tar.gz: 7017f2ae7481105bfbf5775de2e6a24760c664038bbed1f83088c95e031356f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4c7a54c2055ebc40e5e1bd78fed44cb5202d3c784dceabe8af75bb63d9f69275de6a90e8be1aed51392530ef3215e572df1d5518e3acf20b183a46139fc5000
|
7
|
+
data.tar.gz: e8ff38422b9f8efeb3fa825f408b6d16d25daa17035dd16e6145b1878eed9da00ccae1b630bfa08f39ce0a05014372c29ecb3d2fdaad758700e28ec5543eeaea
|
@@ -11,7 +11,7 @@ module PhcdevworksCoreModules
|
|
11
11
|
|
12
12
|
# GET /marketing/optimizations
|
13
13
|
def index
|
14
|
-
@marketing_optimizations = Marketing::Optimization.order('
|
14
|
+
@marketing_optimizations = Marketing::Optimization.order('marketing_optimization_page_title ASC')
|
15
15
|
end
|
16
16
|
|
17
17
|
# GET /marketing/optimizations/1
|
@@ -74,7 +74,7 @@ module PhcdevworksCoreModules
|
|
74
74
|
|
75
75
|
# Whitelist
|
76
76
|
def marketing_optimization_params
|
77
|
-
params.require(:marketing_optimization).permit(:
|
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
78
|
end
|
79
79
|
|
80
80
|
end
|
@@ -11,7 +11,7 @@ module PhcdevworksCoreModules
|
|
11
11
|
|
12
12
|
# GET /post/categories
|
13
13
|
def index
|
14
|
-
@post_categories = Post::Category.order('
|
14
|
+
@post_categories = Post::Category.order('post_category_name ASC')
|
15
15
|
end
|
16
16
|
|
17
17
|
# GET /post/categories/1
|
@@ -74,7 +74,7 @@ module PhcdevworksCoreModules
|
|
74
74
|
|
75
75
|
# Whitelist
|
76
76
|
def post_category_params
|
77
|
-
params.require(:post_category).permit(:
|
77
|
+
params.require(:post_category).permit(:post_category_name, :slug, :optimization_id, :user_id, :org_id)
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
@@ -5,8 +5,8 @@ module PhcdevworksCoreModules
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Image Upload
|
8
|
-
has_one_attached :
|
9
|
-
has_one_attached :
|
8
|
+
has_one_attached :marketing_optimization_twitter_image
|
9
|
+
has_one_attached :marketing_optimization_og_image
|
10
10
|
|
11
11
|
# Paper Trail Initialize
|
12
12
|
has_paper_trail :class_name => "PhcdevworksCoreModules::MarketingOptimizationVersions"
|
@@ -34,20 +34,20 @@ module PhcdevworksCoreModules
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# Form Fields Validation
|
37
|
-
validates :
|
37
|
+
validates :marketing_optimization_page_title,
|
38
38
|
presence: true
|
39
39
|
|
40
|
-
validates :
|
40
|
+
validates :marketing_optimization_og_title,
|
41
41
|
presence: true
|
42
42
|
|
43
|
-
validates :
|
43
|
+
validates :marketing_optimization_twitter_title,
|
44
44
|
presence: true
|
45
45
|
|
46
46
|
# Clean URL Define
|
47
|
-
friendly_id :
|
47
|
+
friendly_id :marketing_optimization_nice_urls, use: [:slugged, :finders]
|
48
48
|
|
49
|
-
def
|
50
|
-
[:
|
49
|
+
def marketing_optimization_nice_urls
|
50
|
+
[:marketing_optimization_page_title]
|
51
51
|
end
|
52
52
|
|
53
53
|
end
|
@@ -4,10 +4,6 @@ module PhcdevworksCoreModules
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
-
# Image Upload
|
8
|
-
has_one_attached :seo_twitter_image
|
9
|
-
has_one_attached :seo_open_graph_image
|
10
|
-
|
11
7
|
# Paper Trail Initialize
|
12
8
|
has_paper_trail :class_name => "PhcdevworksCoreModules::PostCategoryVersions"
|
13
9
|
|
@@ -28,15 +24,15 @@ module PhcdevworksCoreModules
|
|
28
24
|
end
|
29
25
|
|
30
26
|
# Form Fields Validation
|
31
|
-
validates :
|
32
|
-
|
33
|
-
|
27
|
+
validates :post_category_name,
|
28
|
+
presence: true,
|
29
|
+
uniqueness: true
|
34
30
|
|
35
31
|
# Clean URL Define
|
36
|
-
friendly_id :
|
32
|
+
friendly_id :post_category_nice_urls, use: [:slugged, :finders]
|
37
33
|
|
38
|
-
def
|
39
|
-
[:
|
34
|
+
def post_category_nice_urls
|
35
|
+
[:post_category_name]
|
40
36
|
end
|
41
37
|
|
42
38
|
end
|
@@ -7,74 +7,76 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :marketing_optimization_page_title, "Page Title" %>
|
11
|
+
<%= form.text_field :marketing_optimization_page_title, class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.text_area :
|
15
|
+
<%= form.label :marketing_optimization_page_description, "Page Description" %>
|
16
|
+
<%= form.text_area :marketing_optimization_page_description, class: "form-control" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.text_field :
|
20
|
+
<%= form.label :marketing_optimization_og_title, "Open Graph Title" %>
|
21
|
+
<%= form.text_field :marketing_optimization_og_title, class: "form-control" %>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="form-group">
|
25
|
-
<%= form.label :
|
26
|
-
<%= form.text_field :
|
25
|
+
<%= form.label :marketing_optimization_og_description, "Open Graph Description" %>
|
26
|
+
<%= form.text_field :marketing_optimization_og_description, class: "form-control" %>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<div class="form-group">
|
30
|
-
<%= form.label :
|
31
|
-
<%= form.text_field :
|
30
|
+
<%= form.label :marketing_optimization_og_type, "Open Graph Type" %>
|
31
|
+
<%= form.text_field :marketing_optimization_og_type, class: "form-control" %>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="form-group">
|
35
|
+
<%= form.label :marketing_optimization_og_url, "Open Graph URL" %>
|
36
|
+
<%= form.text_field :marketing_optimization_og_url, class: "form-control" %>
|
32
37
|
</div>
|
33
38
|
|
34
39
|
<div class="form-group field_with_errors">
|
35
|
-
<%= form.label :
|
36
|
-
<%= form.file_field :
|
37
|
-
<% if form.object.
|
38
|
-
<%= image_tag main_app.url_for(form.object.
|
39
|
-
<%= form.label :
|
40
|
-
<%= form.check_box :
|
40
|
+
<%= form.label :marketing_optimization_og_image, "Featured Image" %>
|
41
|
+
<%= form.file_field :marketing_optimization_og_image, class: "form-control" %>
|
42
|
+
<% if form.object.marketing_optimization_og_image.attached? %>
|
43
|
+
<%= image_tag main_app.url_for(form.object.marketing_optimization_og_image), class: "img-responsive img-thumbnail" %>
|
44
|
+
<%= form.label :remove_marketing_optimization_og_image %>
|
45
|
+
<%= form.check_box :remove_marketing_optimization_og_image %>
|
41
46
|
<% end %>
|
42
47
|
</div>
|
43
|
-
|
48
|
+
|
44
49
|
<div class="form-group">
|
45
|
-
<%= form.label :
|
46
|
-
<%= form.text_field :
|
50
|
+
<%= form.label :marketing_optimization_twitter_title, "Twitter Card Title" %>
|
51
|
+
<%= form.text_field :marketing_optimization_twitter_title, class: "form-control" %>
|
47
52
|
</div>
|
48
53
|
|
49
54
|
<div class="form-group">
|
50
|
-
<%= form.label :
|
51
|
-
<%= form.
|
55
|
+
<%= form.label :marketing_optimization_twitter_description, "Twitter Card Description" %>
|
56
|
+
<%= form.text_area :marketing_optimization_twitter_description, class: "form-control" %>
|
52
57
|
</div>
|
53
58
|
|
54
59
|
<div class="form-group">
|
55
|
-
<%= form.label :
|
56
|
-
<%= form.
|
60
|
+
<%= form.label :marketing_optimization_twitter_type, "Twitter Card Type" %>
|
61
|
+
<%= form.text_field :marketing_optimization_twitter_type, class: "form-control" %>
|
57
62
|
</div>
|
58
63
|
|
59
64
|
<div class="form-group">
|
60
|
-
<%= form.label :
|
61
|
-
<%= form.text_field :
|
65
|
+
<%= form.label :marketing_optimization_twitter_url, "Twitter Card URL" %>
|
66
|
+
<%= form.text_field :marketing_optimization_twitter_url, class: "form-control" %>
|
62
67
|
</div>
|
63
68
|
|
64
69
|
<div class="form-group field_with_errors">
|
65
|
-
<%= form.label :
|
66
|
-
<%= form.file_field :
|
67
|
-
<% if form.object.
|
68
|
-
<%= image_tag main_app.url_for(form.object.
|
69
|
-
<%= form.label :
|
70
|
-
<%= form.check_box :
|
70
|
+
<%= form.label :marketing_optimization_twitter_image, "Featured Image" %>
|
71
|
+
<%= form.file_field :marketing_optimization_twitter_image, class: "form-control" %>
|
72
|
+
<% if form.object.marketing_optimization_twitter_image.attached? %>
|
73
|
+
<%= image_tag main_app.url_for(form.object.marketing_optimization_twitter_image), class: "img-responsive img-thumbnail" %>
|
74
|
+
<%= form.label :remove_marketing_optimization_twitter_image %>
|
75
|
+
<%= form.check_box :remove_marketing_optimization_twitter_image %>
|
71
76
|
<% end %>
|
72
77
|
</div>
|
73
78
|
|
74
|
-
|
75
|
-
<%= form.label :seo_twitter_url, "SEO Twitter URL" %>
|
76
|
-
<%= form.text_field :seo_twitter_url, class: "form-control" %>
|
77
|
-
</div>
|
79
|
+
|
78
80
|
<!-- Form Input Fields -->
|
79
81
|
|
80
82
|
<!-- Form Submition Button -->
|
@@ -50,11 +50,11 @@
|
|
50
50
|
<tbody>
|
51
51
|
<% @marketing_optimizations.each do |marketing_optimization| %>
|
52
52
|
<tr>
|
53
|
-
<td><%= marketing_optimization.
|
54
|
-
<td><%= marketing_optimization.
|
55
|
-
<td><%= marketing_optimization.
|
56
|
-
<td><%= marketing_optimization.
|
57
|
-
<td><%= marketing_optimization.
|
53
|
+
<td><%= marketing_optimization.marketing_optimization_page_title %></td>
|
54
|
+
<td><%= marketing_optimization.marketing_optimization_og_title %></td>
|
55
|
+
<td><%= marketing_optimization.marketing_optimization_og_type %></td>
|
56
|
+
<td><%= marketing_optimization.marketing_optimization_twitter_title %></td>
|
57
|
+
<td><%= marketing_optimization.marketing_optimization_twitter_type %></td>
|
58
58
|
<td>
|
59
59
|
<div class="btn-group d-flex" role="group">
|
60
60
|
<%= link_to "SEO Details", marketing_optimization, class: "btn btn-purple btn-xs" %>
|
@@ -1,48 +1,53 @@
|
|
1
1
|
<p id="notice"><%= notice %></p>
|
2
2
|
|
3
3
|
<p>
|
4
|
-
<strong>
|
5
|
-
<%= @marketing_optimization.
|
4
|
+
<strong>Page Title:</strong>
|
5
|
+
<%= @marketing_optimization.marketing_optimization_page_title %>
|
6
6
|
</p>
|
7
7
|
|
8
8
|
<p>
|
9
|
-
<strong>
|
10
|
-
<%= @marketing_optimization.
|
9
|
+
<strong>Page Description:</strong>
|
10
|
+
<%= @marketing_optimization.marketing_optimization_page_description %>
|
11
11
|
</p>
|
12
12
|
|
13
13
|
<p>
|
14
|
-
<strong>
|
15
|
-
<%= @marketing_optimization.
|
14
|
+
<strong>Open Graph Title:</strong>
|
15
|
+
<%= @marketing_optimization.marketing_optimization_og_title %>
|
16
16
|
</p>
|
17
17
|
|
18
18
|
<p>
|
19
|
-
<strong>
|
20
|
-
<%= @marketing_optimization.
|
19
|
+
<strong>Open Graph Description:</strong>
|
20
|
+
<%= @marketing_optimization.marketing_optimization_og_description %>
|
21
21
|
</p>
|
22
22
|
|
23
23
|
<p>
|
24
|
-
<strong>
|
25
|
-
<%= @marketing_optimization.
|
24
|
+
<strong>Open Graph Type:</strong>
|
25
|
+
<%= @marketing_optimization.marketing_optimization_og_type %>
|
26
26
|
</p>
|
27
27
|
|
28
28
|
<p>
|
29
|
-
<strong>
|
30
|
-
<%= @marketing_optimization.
|
29
|
+
<strong>Open Graph URL:</strong>
|
30
|
+
<%= @marketing_optimization.marketing_optimization_og_url %>
|
31
31
|
</p>
|
32
32
|
|
33
33
|
<p>
|
34
|
-
<strong>
|
35
|
-
<%= @marketing_optimization.
|
34
|
+
<strong>Twitter Title:</strong>
|
35
|
+
<%= @marketing_optimization.marketing_optimization_twitter_title %>
|
36
36
|
</p>
|
37
37
|
|
38
38
|
<p>
|
39
|
-
<strong>
|
40
|
-
<%= @marketing_optimization.
|
39
|
+
<strong>Twitter Description:</strong>
|
40
|
+
<%= @marketing_optimization.marketing_optimization_twitter_description %>
|
41
41
|
</p>
|
42
42
|
|
43
43
|
<p>
|
44
|
-
<strong>
|
45
|
-
<%= @marketing_optimization.
|
44
|
+
<strong>Twitter Type:</strong>
|
45
|
+
<%= @marketing_optimization.marketing_optimization_twitter_type %>
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<p>
|
49
|
+
<strong>Twitter URL:</strong>
|
50
|
+
<%= @marketing_optimization.marketing_optimization_twitter_url %>
|
46
51
|
</p>
|
47
52
|
|
48
53
|
<%= link_to 'Edit', edit_marketing_optimization_path(@marketing_optimization) %> |
|
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :post_category_name, "Category Name" %>
|
11
|
+
<%= form.text_field :post_category_name, class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group">
|
15
15
|
<label>Attach SEO Data</label>
|
16
|
-
<%= collection_select(:post_category, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("
|
16
|
+
<%= collection_select(:post_category, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
|
17
17
|
</div>
|
18
18
|
<!-- Form Input Fields -->
|
19
19
|
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<tbody>
|
47
47
|
<% @post_categories.each do |post_category| %>
|
48
48
|
<tr>
|
49
|
-
<td><%= post_category.
|
49
|
+
<td><%= post_category.post_category_name %></td>
|
50
50
|
<td>
|
51
51
|
<div class="btn-group d-flex" role="group">
|
52
52
|
<%= link_to "Category Details", post_category, class: "btn btn-purple btn-xs" %>
|
@@ -2,18 +2,18 @@ class CreatePhcdevworksCoreModulesMarketingOptimizations < ActiveRecord::Migrati
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_core_modules_marketing_optimizations do |t|
|
4
4
|
|
5
|
-
t.string :
|
6
|
-
t.text :
|
5
|
+
t.string :marketing_optimization_page_title
|
6
|
+
t.text :marketing_optimization_page_description
|
7
7
|
|
8
|
-
t.string :
|
9
|
-
t.
|
10
|
-
t.string :
|
11
|
-
t.
|
8
|
+
t.string :marketing_optimization_og_title
|
9
|
+
t.text :marketing_optimization_og_description
|
10
|
+
t.string :marketing_optimization_og_type
|
11
|
+
t.string :marketing_optimization_og_url
|
12
12
|
|
13
|
-
t.string :
|
14
|
-
t.
|
15
|
-
t.string :
|
16
|
-
t.
|
13
|
+
t.string :marketing_optimization_twitter_title
|
14
|
+
t.text :marketing_optimization_twitter_description
|
15
|
+
t.string :marketing_optimization_twitter_type
|
16
|
+
t.string :marketing_optimization_twitter_url
|
17
17
|
|
18
18
|
t.string :slug
|
19
19
|
t.string :user_id
|
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:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|