phcdevworks_portfolio 4.7.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/phcdevworks_portfolio/project/posts_controller.rb +2 -2
  3. data/app/controllers/phcdevworks_portfolio/project/types_controller.rb +1 -1
  4. data/app/models/phcdevworks_portfolio/project/post.rb +7 -6
  5. data/app/models/phcdevworks_portfolio/project/type.rb +4 -4
  6. data/app/views/layouts/phcdevworks_portfolio/components/backend/sidebars/_side_menu.html.erb +75 -58
  7. data/app/views/phcdevworks_portfolio/project/posts/_form.html.erb +26 -22
  8. data/app/views/phcdevworks_portfolio/project/posts/index.html.erb +3 -3
  9. data/app/views/phcdevworks_portfolio/project/types/_form.html.erb +2 -2
  10. data/app/views/phcdevworks_portfolio/project/types/index.html.erb +1 -1
  11. data/config/routes.rb +1 -1
  12. data/db/migrate/20191014112330_create_phcdevworks_portfolio_project_posts.rb +6 -6
  13. data/db/migrate/20191021225316_create_phcdevworks_portfolio_project_types.rb +3 -1
  14. data/db/migrate/20191024232111_create_phcdevworks_portfolio_project_categories_posts.rb +10 -0
  15. data/db/migrate/20191024232406_create_phcdevworks_portfolio_project_posts_types.rb +10 -0
  16. data/db/migrate/20191102091459_create_phcdevworks_portfolio_project_post_versions.rb +1 -2
  17. data/db/migrate/20191102091744_create_phcdevworks_portfolio_project_type_versions.rb +1 -2
  18. data/lib/phcdevworks_portfolio/engine.rb +1 -0
  19. data/lib/phcdevworks_portfolio/version.rb +1 -1
  20. metadata +35 -33
  21. data/app/assets/javascripts/phcdevworks_portfolio/project/categories.coffee +0 -3
  22. data/app/assets/stylesheets/phcdevworks_portfolio/project/categories.scss +0 -3
  23. data/app/controllers/phcdevworks_portfolio/project/categories_controller.rb +0 -77
  24. data/app/helpers/phcdevworks_portfolio/project/categories_helper.rb +0 -4
  25. data/app/models/phcdevworks_portfolio/project/category.rb +0 -22
  26. data/app/models/phcdevworks_portfolio/project_category_versions.rb +0 -5
  27. data/app/views/phcdevworks_portfolio/project/categories/_form.html.erb +0 -22
  28. data/app/views/phcdevworks_portfolio/project/categories/edit.html.erb +0 -47
  29. data/app/views/phcdevworks_portfolio/project/categories/index.html.erb +0 -79
  30. data/app/views/phcdevworks_portfolio/project/categories/new.html.erb +0 -47
  31. data/db/migrate/20191021225231_create_phcdevworks_portfolio_project_categories.rb +0 -15
  32. data/db/migrate/20191024232111_create_phcdevworks_portfolio_categories_posts.rb +0 -10
  33. data/db/migrate/20191024232406_create_phcdevworks_portfolio_posts_types.rb +0 -10
  34. data/db/migrate/20191102091731_create_phcdevworks_portfolio_project_category_versions.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f48ea44e6296747a82d217ce779a99ba554224370dcb52e8fe637d2d179dba6a
4
- data.tar.gz: 85c6caf4824b6197278e0b769a0280ee898310d634a93d3ede71f5a3cbef384d
3
+ metadata.gz: da2e2e36ccbdd210e5178d43c2aa6abb2183d47a55933059b243b30086505d6e
4
+ data.tar.gz: 9598976385d79bfcfa46ca23951486cd6a44b8cf4f21ea557468e1cbb16b6712
5
5
  SHA512:
6
- metadata.gz: 51a663b86d076b685336b44907abcfad5a12620f6a0351a238348793ccf25ff5eeba1886f10a50505b5292063c4a48507a3dc112d7a2b15c93ce7819f4cac6ab
7
- data.tar.gz: 24c4b2358abc70af570dfc52e41c41eb80bf12e2a2cba95068e0ced1d4ff9bef96bf4536ec540c64b835d80352308ef43a23b1e8704a0fbfb81d75c02bab2906
6
+ metadata.gz: 4774169691361ae8cc6aa8d98115d8ea630432dbd6cc3a09e6d3a86beb54409b2d7bea284a34e464334a885c76aafb3111522747c8c05e09d168f1dc44467698
7
+ data.tar.gz: 7527e3390a9b0e4bcaedaf5470e9cdad9d25eea35ad501328d9be3c715b2770e953fb1b7bf87988a53c7517f94518b88abe14a3563f781dc4218ec45832a594e
@@ -11,7 +11,7 @@ module PhcdevworksPortfolio
11
11
 
12
12
  # GET /project/posts
13
13
  def index
14
- @project_posts = Project::Post.all.order("post_title ASC")
14
+ @project_posts = Project::Post.all.order("project_post_title ASC")
15
15
  end
16
16
 
17
17
  # GET /project/posts/new
@@ -70,7 +70,7 @@ module PhcdevworksPortfolio
70
70
 
71
71
  # Whitelist
72
72
  def project_post_params
73
- params.require(:project_post).permit(:post_title, :post_description, :post_url, :post_type, :post_status, :post_image, :post_images, :slug, :user_id, :org_id, category_ids: [], type_ids: [])
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
74
  end
75
75
 
76
76
  end
@@ -70,7 +70,7 @@ module PhcdevworksPortfolio
70
70
 
71
71
  # Whitelist
72
72
  def project_type_params
73
- params.require(:project_type).permit(:type_name, :slug, :user_id, :org_id)
73
+ params.require(:project_type).permit(:project_type_name, :slug, :user_id, :org_id)
74
74
  end
75
75
 
76
76
  end
@@ -8,18 +8,19 @@ module PhcdevworksPortfolio
8
8
  has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectPostVersions'
9
9
 
10
10
  # Image Upload
11
- has_one_attached :post_image
11
+ has_one_attached :project_post_image
12
12
 
13
13
  # Relationships
14
- has_and_belongs_to_many :categories, class_name: "Project::Category", :join_table => "phcdevworks_portfolio_categories_posts"
15
- has_and_belongs_to_many :types, class_name: "Project::Type", :join_table => "phcdevworks_portfolio_posts_types"
16
14
  belongs_to :user, class_name: "PhcdevworksAccounts::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
17
18
 
18
19
  # Clean URL Define
19
- friendly_id :phcdev_project_post_nice_urls, use: [:slugged, :finders]
20
+ friendly_id :project_post_nice_urls, use: [:slugged, :finders]
20
21
 
21
- def phcdev_project_post_nice_urls
22
- [:post_title]
22
+ def project_post_nice_urls
23
+ [:project_post_title]
23
24
  end
24
25
 
25
26
  end
@@ -8,14 +8,14 @@ module PhcdevworksPortfolio
8
8
  has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectTypeVersions'
9
9
 
10
10
  # Relationships
11
- has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_posts_types", :dependent => :destroy
11
+ has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_project_posts_types", :dependent => :destroy
12
12
  belongs_to :user, class_name: "PhcdevworksAccounts::User"
13
13
 
14
14
  # Clean URL Define
15
- friendly_id :phcdev_project_type_nice_urls, use: [:slugged, :finders]
15
+ friendly_id :project_type_nice_urls, use: [:slugged, :finders]
16
16
 
17
- def phcdev_project_type_nice_urls
18
- [:type_name]
17
+ def project_type_nice_urls
18
+ [:project_type_name]
19
19
  end
20
20
 
21
21
  end
@@ -38,37 +38,47 @@
38
38
  <!-- -PHC- Sidebar - Sidebar Navigation -->
39
39
  <ul class="nav">
40
40
 
41
- <% if defined?phcdevworks_members %>
42
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
43
- <li class="nav-header">Membership Manager</li>
41
+ <% if defined?phcdevworks_press %>
42
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
43
+ <li class="nav-header">Articles & Blogging</li>
44
44
  <li class="has-sub">
45
45
  <a href="javascript:;">
46
46
  <b class="caret"></b>
47
- <i class="fad fa-users"></i>
48
- <span>Member"s Data</span>
47
+ <i class="fad fa-newspaper"></i>
48
+ <span>Blog Articles</span>
49
49
  </a>
50
50
  <ul class="sub-menu">
51
- <li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles") %>"><%= link_to("Profile Index", phcdevworks_members.member_profiles_path) %></li>
52
- <li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles#new") %>"><%= link_to("New Member Profile", phcdevworks_members.new_member_profile_path) %></li>
51
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts") %>"><%= link_to("Article Index", phcdevworks_press.article_posts_path) %></li>
52
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts#new") %>"><%= link_to("Add a New Aritcle", phcdevworks_press.new_article_post_path) %></li>
53
53
  </ul>
54
54
  </li>
55
- <li class="nav-header">Member"s Directory</li>
56
55
  <li class="has-sub">
57
56
  <a href="javascript:;">
58
57
  <b class="caret"></b>
59
- <i class="fad fa-list-alt"></i>
60
- <span>Member"s Directory</span>
58
+ <i class="fad fa-star-half"></i>
59
+ <span>Review Articles</span>
61
60
  </a>
62
61
  <ul class="sub-menu">
63
- <li class="<%= phc_menu_active_controller("phcdevworks_members/directory/categories") %>"><%= link_to("Directory Index", phcdevworks_members.directory_categories_path) %></li>
64
- <li class="<%= phc_menu_active_controller("phcdevworks_members/directory/categories#new") %>"><%= link_to("New Directory Listing", phcdevworks_members.new_directory_category_path) %></li>
62
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/review/posts") %>"><%= link_to("Reviews Index", phcdevworks_press.review_posts_path) %></li>
63
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/review/posts#new") %>"><%= link_to("Add a New Review", phcdevworks_press.new_review_post_path) %></li>
65
64
  </ul>
66
65
  </li>
67
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
66
+ <li class="has-sub">
67
+ <a href="javascript:;">
68
+ <b class="caret"></b>
69
+ <i class="fad fa-th-list"></i>
70
+ <span>List Articles</span>
71
+ </a>
72
+ <ul class="sub-menu">
73
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/list/posts") %>"><%= link_to("Lists Index", phcdevworks_press.list_posts_path) %></li>
74
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/list/posts#new") %>"><%= link_to("Add a New List", phcdevworks_press.new_list_post_path) %></li>
75
+ </ul>
76
+ </li>
77
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
68
78
  <% end %>
69
79
 
70
80
  <% if defined?phcdevworks_portfolio %>
71
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
81
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Portfolio -->
72
82
  <li class="nav-header">Portfolio</li>
73
83
  <li class="has-sub">
74
84
  <a href="javascript:;">
@@ -84,54 +94,73 @@
84
94
  <li class="has-sub">
85
95
  <a href="javascript:;">
86
96
  <b class="caret"></b>
87
- <i class="fad fa-sitemap"></i>
88
- <span>Project Categories</span>
97
+ <i class="fad fa-folders"></i>
98
+ <span>Project Types</span>
89
99
  </a>
90
100
  <ul class="sub-menu">
91
- <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Category", phcdevworks_portfolio.project_categories_path) %></li>
92
- <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Category", phcdevworks_portfolio.new_project_category_path) %></li>
101
+ <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Type", phcdevworks_portfolio.project_types_path) %></li>
102
+ <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
93
103
  </ul>
94
104
  </li>
105
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Portfolio -->
106
+ <% end %>
107
+
108
+ <% if defined?phcdevworks_tutorials %>
109
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
110
+ <li class="nav-header">Tutorial Posts</li>
95
111
  <li class="has-sub">
96
112
  <a href="javascript:;">
97
113
  <b class="caret"></b>
98
- <i class="fad fa-folders"></i>
99
- <span>Project Types</span>
114
+ <i class="fad fa-chalkboard-teacher"></i>
115
+ <span>Tutorial Posts</span>
100
116
  </a>
101
117
  <ul class="sub-menu">
102
- <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Type", phcdevworks_portfolio.project_types_path) %></li>
103
- <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
118
+ <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts") %>"><%= link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %></li>
119
+ <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts#new") %>"><%= link_to "New Tutorial", phcdevworks_tutorials.new_tutorial_post_path %></li>
104
120
  </ul>
105
121
  </li>
106
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
122
+ <li class="nav-header">Command Lists & Items</li>
123
+ <li class="has-sub">
124
+ <a href="javascript:;">
125
+ <b class="caret"></b>
126
+ <i class="fad fa-terminal"></i>
127
+ <span>Command Lists</span>
128
+ </a>
129
+ <ul class="sub-menu">
130
+ <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts") %>"><%= link_to "List Index", phcdevworks_tutorials.command_posts_path %></li>
131
+ <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts#new") %>"><%= link_to "New List", phcdevworks_tutorials.new_command_post_path %></li>
132
+ </ul>
133
+ </li>
134
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
107
135
  <% end %>
108
136
 
109
- <% if defined?phcdevworks_press %>
110
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
111
- <li class="nav-header">Articles & Blogging</li>
137
+ <% if defined?phcdevworks_members %>
138
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
139
+ <li class="nav-header">Membership Manager</li>
112
140
  <li class="has-sub">
113
141
  <a href="javascript:;">
114
142
  <b class="caret"></b>
115
- <i class="fad fa-newspaper"></i>
116
- <span>Article Posts</span>
143
+ <i class="fad fa-users"></i>
144
+ <span>Member"s Data</span>
117
145
  </a>
118
146
  <ul class="sub-menu">
119
- <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts") %>"><%= link_to("Article Index", phcdevworks_press.article_posts_path) %></li>
120
- <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts#new") %>"><%= link_to("New Aritcle", phcdevworks_press.new_article_post_path) %></li>
147
+ <li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles") %>"><%= link_to("Profile Index", phcdevworks_members.member_profiles_path) %></li>
148
+ <li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles#new") %>"><%= link_to("New Member Profile", phcdevworks_members.new_member_profile_path) %></li>
121
149
  </ul>
122
150
  </li>
151
+ <li class="nav-header">Member"s Directory</li>
123
152
  <li class="has-sub">
124
153
  <a href="javascript:;">
125
154
  <b class="caret"></b>
126
- <i class="fad fa-sitemap"></i>
127
- <span>Article Categories</span>
155
+ <i class="fad fa-list-alt"></i>
156
+ <span>Member"s Directory</span>
128
157
  </a>
129
158
  <ul class="sub-menu">
130
- <li class="<%= phc_menu_active_controller("phcdevworks_press/article/categories") %>"><%= link_to("Category Index", phcdevworks_press.article_categories_path) %></li>
131
- <li class="<%= phc_menu_active_controller("phcdevworks_press/article/categories#new") %>"><%= link_to("New Category", phcdevworks_press.new_article_category_path) %></li>
159
+ <li class="<%= phc_menu_active_controller("phcdevworks_members/modules/categories") %>"><%= link_to("Directory Index", phcdevworks_members.directory_categories_path) %></li>
160
+ <li class="<%= phc_menu_active_controller("phcdevworks_members/modules/categories#new") %>"><%= link_to("New Directory Listing", phcdevworks_members.new_directory_category_path) %></li>
132
161
  </ul>
133
162
  </li>
134
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
163
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
135
164
  <% end %>
136
165
 
137
166
  <% if defined?phcdevworks_scripts %>
@@ -203,44 +232,32 @@
203
232
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
204
233
  <% end %>
205
234
 
206
- <% if defined?phcdevworks_tutorials %>
207
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
208
- <li class="nav-header">Tutorial Posts</li>
209
- <li class="has-sub">
210
- <a href="javascript:;">
211
- <b class="caret"></b>
212
- <i class="fad fa-chalkboard-teacher"></i>
213
- <span>Tutorial Posts</span>
214
- </a>
215
- <ul class="sub-menu">
216
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts") %>"><%= link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %></li>
217
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts#new") %>"><%= link_to "New Tutorial", phcdevworks_tutorials.new_tutorial_post_path %></li>
218
- </ul>
219
- </li>
235
+ <% if defined?phcdevworks_core_modules %>
236
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
237
+ <li class="nav-header">Core Modules</li>
220
238
  <li class="has-sub">
221
239
  <a href="javascript:;">
222
240
  <b class="caret"></b>
223
241
  <i class="fad fa-sitemap"></i>
224
- <span>Tutorial Categories</span>
242
+ <span>Categories</span>
225
243
  </a>
226
244
  <ul class="sub-menu">
227
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/categories") %>"><%= link_to "Category Index", phcdevworks_tutorials.tutorial_categories_path %></li>
228
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/categories#new") %>"><%= link_to "New Category", phcdevworks_tutorials.new_tutorial_category_path %></li>
245
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories") %>"><%= link_to("Category Index", phcdevworks_core_modules.post_categories_path) %></li>
246
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_post_category_path) %></li>
229
247
  </ul>
230
248
  </li>
231
- <li class="nav-header">Command Lists & Items</li>
232
249
  <li class="has-sub">
233
250
  <a href="javascript:;">
234
251
  <b class="caret"></b>
235
- <i class="fad fa-terminal"></i>
236
- <span>Command Lists</span>
252
+ <i class="fad fa-analytics"></i>
253
+ <span>Marketing</span>
237
254
  </a>
238
255
  <ul class="sub-menu">
239
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts") %>"><%= link_to "List Index", phcdevworks_tutorials.command_posts_path %></li>
240
- <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts#new") %>"><%= link_to "New List", phcdevworks_tutorials.new_command_post_path %></li>
256
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations") %>"><%= link_to("SEO Data Index", phcdevworks_core_modules.marketing_optimizations_path) %></li>
257
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations#new") %>"><%= link_to("Add SEO Data", phcdevworks_core_modules.new_marketing_optimization_path) %></li>
241
258
  </ul>
242
259
  </li>
243
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
260
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
244
261
  <% end %>
245
262
 
246
263
  <% if current_user && current_user.admin? %>
@@ -7,47 +7,51 @@
7
7
 
8
8
  <!-- Form Input Fields -->
9
9
  <div class="form-group field_with_errors">
10
- <%= form.label :post_title, "Project Title" %>
11
- <%= form.text_field :post_title, placeholder: "Project Title", class: "form-control" %>
10
+ <%= form.label :project_post_title, "Project Title" %>
11
+ <%= form.text_field :project_post_title, placeholder: "Project Title", class: "form-control" %>
12
12
  </div>
13
13
 
14
14
  <div class="form-group field_with_errors">
15
- <%= form.label :post_description, "Project Description" %>
16
- <%= form.text_area :post_description, placeholder: "Project Description", class: "form-control editor" %>
15
+ <%= form.label :project_post_description, "Project Description" %>
16
+ <%= form.text_area :project_post_description, placeholder: "Project Description", class: "form-control editor" %>
17
17
  </div>
18
18
 
19
19
  <div class="form-group field_with_errors">
20
- <%= form.label :post_url, "Project URL" %>
21
- <%= form.text_field :post_url, placeholder: "Project URL", class: "form-control" %>
20
+ <%= form.label :project_post_url, "Project URL" %>
21
+ <%= form.text_field :project_post_url, placeholder: "Project URL", class: "form-control" %>
22
22
  </div>
23
23
 
24
24
  <div class="form-group field_with_errors">
25
- <%= form.label :post_status, "Project Status" %>
26
- <%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
25
+ <%= form.label :project_post_status, "Project Status" %>
26
+ <%= form.select( :project_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
27
27
  </div>
28
28
 
29
29
  <div class="form-group field_with_errors">
30
- <%= form.label :post_image, "Project Image" %>
31
- <%= form.file_field :post_image, class: "form-control" %>
30
+ <%= form.label :project_post_image, "Project Image" %>
31
+ <%= form.file_field :project_post_image, class: "form-control" %>
32
32
  </div>
33
- <% if form.object.post_image.attached? %>
34
- <%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
33
+ <% if form.object.project_post_image.attached? %>
34
+ <%= image_tag main_app.url_for(form.object.project_post_image), class: "img-responsive img-thumbnail" %>
35
35
  <% end %>
36
36
 
37
- <div class="form-group field_with_errors">
38
- <%= form.collection_check_boxes :category_ids, PhcdevworksPortfolio::Project::Category.all, :id, :category_name do |project_category| %>
39
- <%= project_category.check_box %>
40
- <%= project_category.label %><br>
37
+ <div class="form-check">
38
+ <%= form.collection_check_boxes :type_ids, PhcdevworksPortfolio::Project::Type.all, :id, :project_type_name do |project_type| %>
39
+ <%= project_type.check_box class: "form-check-input" %>
40
+ <%= project_type.label class: "form-check-label" %>
41
41
  <% end %>
42
42
  </div>
43
-
44
-
45
- <div class="form-group field_with_errors">
46
- <%= form.collection_check_boxes :type_ids, PhcdevworksPortfolio::Project::Type.all, :id, :type_name do |project_type| %>
47
- <%= project_type.check_box %>
48
- <%= project_type.label %><br>
43
+
44
+ <div class="form-check">
45
+ <%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
46
+ <%= post_category.check_box class: "form-check-input" %>
47
+ <%= post_category.label class: "form-check-label" %>
49
48
  <% end %>
50
49
  </div>
50
+
51
+ <div class="form-group">
52
+ <label>Attach SEO Data</label>
53
+ <%= collection_select(:project_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
54
+ </div>
51
55
  <!-- Form Input Fields -->
52
56
 
53
57
  <!-- Form Submition Button -->
@@ -48,9 +48,9 @@
48
48
  <tbody>
49
49
  <% @project_posts.each do |project_post| %>
50
50
  <tr>
51
- <td><%= project_post.post_title %></td>
52
- <td><%= project_post.post_description %></td>
53
- <td><%= project_post.post_status.capitalize %></td>
51
+ <td><%= project_post.project_post_title %></td>
52
+ <td><%= truncate(project_post.project_post_description, :length => 80, :escape => false) %></td>
53
+ <td><%= project_post.project_post_status.capitalize %></td>
54
54
  <td>
55
55
  <div class="btn-group d-flex" role="group">
56
56
  <%= link_to "Update Project", edit_project_post_path(project_post), class: "btn btn-purple btn-xs" %>
@@ -7,8 +7,8 @@
7
7
 
8
8
  <!-- Form Input Fields -->
9
9
  <div class="form-group field_with_errors">
10
- <%= form.label :type_name, "Project Type Name" %>
11
- <%= form.text_field :type_name, placeholder: "Project Type", class: "form-control" %>
10
+ <%= form.label :project_type_name, "Project Type Name" %>
11
+ <%= form.text_field :project_type_name, placeholder: "Project Type", class: "form-control" %>
12
12
  </div>
13
13
  <!-- Form Input Fields -->
14
14
 
@@ -46,7 +46,7 @@
46
46
  <tbody>
47
47
  <% @project_types.each do |project_type| %>
48
48
  <tr>
49
- <td><%= project_type.type_name %></td>
49
+ <td><%= project_type.project_type_name %></td>
50
50
  <td>
51
51
  <div class="btn-group d-flex" role="group">
52
52
  <%= link_to "Update Type Name", edit_project_type_path(project_type), class: "btn btn-purple btn-xs" %>
@@ -3,12 +3,12 @@ PhcdevworksPortfolio::Engine.routes.draw do
3
3
  # Project Routes
4
4
  namespace :project do
5
5
  resources :posts, class_name: "Project::Post"
6
- resources :categories, class_name: "Project::Category"
7
6
  resources :types, class_name: "Project::Type"
8
7
  resources :pages, only: [:index, :show]
9
8
  end
10
9
 
11
10
  # Mount Routes
12
11
  mount PhcdevworksAccounts::Engine, :at => '/'
12
+ mount PhcdevworksCoreModules::Engine, :at => '/'
13
13
 
14
14
  end
@@ -2,13 +2,13 @@ class CreatePhcdevworksPortfolioProjectPosts < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  create_table :phcdevworks_portfolio_project_posts do |t|
4
4
 
5
- t.string :post_title
6
- t.text :post_description
5
+ t.string :project_post_title
6
+ t.text :project_post_description
7
7
 
8
- t.string :post_url
9
- t.string :post_status
10
- t.string :post_image
11
- t.string :post_images
8
+ t.string :project_post_url
9
+ t.string :project_post_status
10
+
11
+ t.string :optimization_id
12
12
 
13
13
  t.string :slug
14
14
  t.string :user_id
@@ -2,7 +2,9 @@ class CreatePhcdevworksPortfolioProjectTypes < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  create_table :phcdevworks_portfolio_project_types do |t|
4
4
 
5
- t.string :type_name
5
+ t.string :project_type_name
6
+
7
+ t.string :optimization_id
6
8
 
7
9
  t.string :slug
8
10
  t.string :user_id
@@ -0,0 +1,10 @@
1
+ class CreatePhcdevworksPortfolioProjectCategoriesPosts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :phcdevworks_portfolio_project_categories_posts do |t|
4
+
5
+ t.integer :category_id
6
+ t.integer :post_id
7
+
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePhcdevworksPortfolioProjectPostsTypes < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :phcdevworks_portfolio_project_posts_types do |t|
4
+
5
+ t.integer :post_id
6
+ t.integer :type_id
7
+
8
+ end
9
+ end
10
+ end
@@ -1,7 +1,6 @@
1
1
  class CreatePhcdevworksPortfolioProjectPostVersions < ActiveRecord::Migration[6.0]
2
2
  TEXT_BYTES = 1_073_741_823
3
3
  def change
4
-
5
4
  create_table :phcdevworks_portfolio_project_post_versions do |t|
6
5
 
7
6
  t.string :item_type, {:null=>false}
@@ -13,7 +12,7 @@ class CreatePhcdevworksPortfolioProjectPostVersions < ActiveRecord::Migration[6.
13
12
 
14
13
  end
15
14
 
16
- add_index :phcdevworks_portfolio_project_post_versions, %i(item_type item_id), :name => 'project_type_versions'
15
+ add_index :phcdevworks_portfolio_project_post_versions, %i(item_type item_id), :name => 'project_post_versions'
17
16
 
18
17
  end
19
18
  end
@@ -1,7 +1,6 @@
1
1
  class CreatePhcdevworksPortfolioProjectTypeVersions < ActiveRecord::Migration[6.0]
2
2
  TEXT_BYTES = 1_073_741_823
3
3
  def change
4
-
5
4
  create_table :phcdevworks_portfolio_project_type_versions do |t|
6
5
 
7
6
  t.string :item_type, {:null=>false}
@@ -13,7 +12,7 @@ class CreatePhcdevworksPortfolioProjectTypeVersions < ActiveRecord::Migration[6.
13
12
 
14
13
  end
15
14
 
16
- add_index :phcdevworks_portfolio_project_post_versions, %i(item_type item_id), :name => 'project_post_versions'
15
+ add_index :phcdevworks_portfolio_project_type_versions, %i(item_type item_id), :name => 'project_type_versions'
17
16
 
18
17
  end
19
18
  end
@@ -28,6 +28,7 @@ module PhcdevworksPortfolio
28
28
 
29
29
  # Load User Accounts
30
30
  require "phcdevworks_accounts"
31
+ require "phcdevworks_core_modules"
31
32
 
32
33
  # Engine Namespace
33
34
  isolate_namespace PhcdevworksPortfolio
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksPortfolio
2
- VERSION = "4.7.0"
2
+ VERSION = "9.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_portfolio
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 9.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-06-27 00:00:00.000000000 Z
11
+ date: 2020-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -64,84 +64,98 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.10'
67
+ version: '2.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.10'
74
+ version: '2.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: phcthemes_web_theme_pack
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.10'
81
+ version: '2.0'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '1.10'
88
+ version: '2.0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: phcdevworks_active_menus
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.5'
95
+ version: '2.0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.5'
102
+ version: '2.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: phcdevworks_core
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '1.5'
109
+ version: '2.0'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.5'
116
+ version: '2.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: phcdevworks_notifications
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '1.5'
123
+ version: '2.0'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '1.5'
130
+ version: '2.0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: phcdevworks_titleseo
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '2.4'
137
+ version: '3.0'
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '2.4'
144
+ version: '3.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: phcdevworks_core_modules
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '6.0'
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '6.0'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: wicked
147
161
  requirement: !ruby/object:Gem::Requirement
@@ -190,14 +204,14 @@ dependencies:
190
204
  requirements:
191
205
  - - "~>"
192
206
  - !ruby/object:Gem::Version
193
- version: '1.67'
207
+ version: '1.74'
194
208
  type: :runtime
195
209
  prerelease: false
196
210
  version_requirements: !ruby/object:Gem::Requirement
197
211
  requirements:
198
212
  - - "~>"
199
213
  - !ruby/object:Gem::Version
200
- version: '1.67'
214
+ version: '1.74'
201
215
  - !ruby/object:Gem::Dependency
202
216
  name: google-cloud-storage
203
217
  requirement: !ruby/object:Gem::Requirement
@@ -232,14 +246,14 @@ dependencies:
232
246
  requirements:
233
247
  - - "~>"
234
248
  - !ruby/object:Gem::Version
235
- version: '1.11'
249
+ version: '2.0'
236
250
  type: :runtime
237
251
  prerelease: false
238
252
  version_requirements: !ruby/object:Gem::Requirement
239
253
  requirements:
240
254
  - - "~>"
241
255
  - !ruby/object:Gem::Version
242
- version: '1.11'
256
+ version: '2.0'
243
257
  - !ruby/object:Gem::Dependency
244
258
  name: sqlite3
245
259
  requirement: !ruby/object:Gem::Requirement
@@ -256,7 +270,7 @@ dependencies:
256
270
  version: '1.4'
257
271
  description: Ruby on Rails 6 Engine to Manage and Organize a Websites Work Portfolio.
258
272
  email:
259
- - info@phcdevworks.com
273
+ - developers@phcdevworks.com
260
274
  executables: []
261
275
  extensions: []
262
276
  extra_rdoc_files: []
@@ -266,23 +280,19 @@ files:
266
280
  - Rakefile
267
281
  - app/assets/config/phcdevworks_portfolio_manifest.js
268
282
  - app/assets/javascripts/phcdevworks_portfolio/application.js
269
- - app/assets/javascripts/phcdevworks_portfolio/project/categories.coffee
270
283
  - app/assets/javascripts/phcdevworks_portfolio/project/pages.coffee
271
284
  - app/assets/javascripts/phcdevworks_portfolio/project/posts.coffee
272
285
  - app/assets/javascripts/phcdevworks_portfolio/project/types.coffee
273
286
  - app/assets/stylesheets/phcdevworks_portfolio/application.scss
274
- - app/assets/stylesheets/phcdevworks_portfolio/project/categories.scss
275
287
  - app/assets/stylesheets/phcdevworks_portfolio/project/pages.scss
276
288
  - app/assets/stylesheets/phcdevworks_portfolio/project/posts.scss
277
289
  - app/assets/stylesheets/phcdevworks_portfolio/project/types.scss
278
290
  - app/assets/stylesheets/scaffolds.scss
279
291
  - app/controllers/phcdevworks_portfolio/application_controller.rb
280
- - app/controllers/phcdevworks_portfolio/project/categories_controller.rb
281
292
  - app/controllers/phcdevworks_portfolio/project/pages_controller.rb
282
293
  - app/controllers/phcdevworks_portfolio/project/posts_controller.rb
283
294
  - app/controllers/phcdevworks_portfolio/project/types_controller.rb
284
295
  - app/helpers/phcdevworks_portfolio/application_helper.rb
285
- - app/helpers/phcdevworks_portfolio/project/categories_helper.rb
286
296
  - app/helpers/phcdevworks_portfolio/project/pages_helper.rb
287
297
  - app/helpers/phcdevworks_portfolio/project/posts_helper.rb
288
298
  - app/helpers/phcdevworks_portfolio/project/types_helper.rb
@@ -290,10 +300,8 @@ files:
290
300
  - app/mailers/phcdevworks_portfolio/application_mailer.rb
291
301
  - app/models/phcdevworks_portfolio/application_record.rb
292
302
  - app/models/phcdevworks_portfolio/project.rb
293
- - app/models/phcdevworks_portfolio/project/category.rb
294
303
  - app/models/phcdevworks_portfolio/project/post.rb
295
304
  - app/models/phcdevworks_portfolio/project/type.rb
296
- - app/models/phcdevworks_portfolio/project_category_versions.rb
297
305
  - app/models/phcdevworks_portfolio/project_post_versions.rb
298
306
  - app/models/phcdevworks_portfolio/project_type_versions.rb
299
307
  - app/views/layouts/phcdevworks_portfolio/application.html.erb
@@ -301,10 +309,6 @@ files:
301
309
  - app/views/layouts/phcdevworks_portfolio/components/backend/navigation/_top_menu.html.erb
302
310
  - app/views/layouts/phcdevworks_portfolio/components/backend/sidebars/_side_menu.html.erb
303
311
  - app/views/layouts/phcdevworks_portfolio/frontend.html.erb
304
- - app/views/phcdevworks_portfolio/project/categories/_form.html.erb
305
- - app/views/phcdevworks_portfolio/project/categories/edit.html.erb
306
- - app/views/phcdevworks_portfolio/project/categories/index.html.erb
307
- - app/views/phcdevworks_portfolio/project/categories/new.html.erb
308
312
  - app/views/phcdevworks_portfolio/project/pages/index.html.erb
309
313
  - app/views/phcdevworks_portfolio/project/pages/show.html.erb
310
314
  - app/views/phcdevworks_portfolio/project/posts/_form.html.erb
@@ -317,12 +321,10 @@ files:
317
321
  - app/views/phcdevworks_portfolio/project/types/new.html.erb
318
322
  - config/routes.rb
319
323
  - db/migrate/20191014112330_create_phcdevworks_portfolio_project_posts.rb
320
- - db/migrate/20191021225231_create_phcdevworks_portfolio_project_categories.rb
321
324
  - db/migrate/20191021225316_create_phcdevworks_portfolio_project_types.rb
322
- - db/migrate/20191024232111_create_phcdevworks_portfolio_categories_posts.rb
323
- - db/migrate/20191024232406_create_phcdevworks_portfolio_posts_types.rb
325
+ - db/migrate/20191024232111_create_phcdevworks_portfolio_project_categories_posts.rb
326
+ - db/migrate/20191024232406_create_phcdevworks_portfolio_project_posts_types.rb
324
327
  - db/migrate/20191102091459_create_phcdevworks_portfolio_project_post_versions.rb
325
- - db/migrate/20191102091731_create_phcdevworks_portfolio_project_category_versions.rb
326
328
  - db/migrate/20191102091744_create_phcdevworks_portfolio_project_type_versions.rb
327
329
  - lib/phcdevworks_portfolio.rb
328
330
  - lib/phcdevworks_portfolio/engine.rb
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the project::categories controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,77 +0,0 @@
1
- require_dependency "phcdevworks_portfolio/application_controller"
2
-
3
- module PhcdevworksPortfolio
4
- class Project::CategoriesController < 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_category, only: [:edit, :update, :destroy]
11
-
12
- # GET /project/categories
13
- def index
14
- @project_categories = Project::Category.all
15
- end
16
-
17
- # GET /project/categories/new
18
- def new
19
- @project_category = Project::Category.new
20
- end
21
-
22
- # GET /project/categories/1/edit
23
- def edit
24
- end
25
-
26
- # POST /project/categories
27
- def create
28
- @project_category = Project::Category.new(project_category_params)
29
- @project_category.user_id = current_user.id
30
- @project_category.org_id = current_user.org_id
31
- respond_to do |format|
32
- if @project_category.save
33
- format.html { redirect_to project_categories_path, :flash => { :success => 'Project Category has been Added.' }}
34
- format.json { render :show, status: :created, location: @project_category }
35
- else
36
- format.html { render :new }
37
- format.json { render json: @project_category.errors, status: :unprocessable_entity }
38
- end
39
- end
40
- end
41
-
42
- # PATCH/PUT /project/categories/1
43
- def update
44
- respond_to do |format|
45
- if @project_category.update(project_category_params)
46
- format.html { redirect_to project_categories_path, :flash => { :notice => 'Project Category has been Updated.' }}
47
- format.json { render :show, status: :ok, location: @project_category }
48
- else
49
- format.html { render :edit }
50
- format.json { render json: @project_category.errors, status: :unprocessable_entity }
51
- end
52
- end
53
- end
54
-
55
- # DELETE /project/categories/1
56
- def destroy
57
- @project_category.destroy
58
- respond_to do |format|
59
- format.html { redirect_to project_categories_path, :flash => { :error => 'Project Category has been Removed.' }}
60
- format.json { head :no_content }
61
- end
62
- end
63
-
64
- private
65
-
66
- # Common Callbacks
67
- def set_project_category
68
- @project_category = Project::Category.find(params[:id])
69
- end
70
-
71
- # Whitelist
72
- def project_category_params
73
- params.require(:project_category).permit(:category_name, :slug, :user_id, :org_id)
74
- end
75
-
76
- end
77
- end
@@ -1,4 +0,0 @@
1
- module PhcdevworksPortfolio
2
- module Project::CategoriesHelper
3
- end
4
- end
@@ -1,22 +0,0 @@
1
- module PhcdevworksPortfolio
2
- class Project::Category < ApplicationRecord
3
-
4
- # Clean URL Initialize
5
- extend FriendlyId
6
-
7
- # Paper Trail Initialize
8
- has_paper_trail :class_name => 'PhcdevworksPortfolio::ProjectCategoryVersions'
9
-
10
- # Relationships
11
- has_and_belongs_to_many :posts, class_name: "Project::Post", :join_table => "phcdevworks_portfolio_categories_posts", :dependent => :destroy
12
- belongs_to :user, class_name: "PhcdevworksAccounts::User"
13
-
14
- # Clean URL Define
15
- friendly_id :phcdev_project_category_nice_urls, use: [:slugged, :finders]
16
-
17
- def phcdev_project_category_nice_urls
18
- [:category_name]
19
- end
20
-
21
- end
22
- end
@@ -1,5 +0,0 @@
1
- module PhcdevworksPortfolio
2
- class ProjectCategoryVersions < PaperTrail::Version
3
- self.table_name = :phcdevworks_portfolio_project_category_versions
4
- end
5
- end
@@ -1,22 +0,0 @@
1
- <!-- Form - Project - Categories -->
2
- <%= form_with(model: project_category, local: true) do |form| %>
3
-
4
- <!-- PHCNotifi Render Validation -->
5
- <%= render "phcdevworks_notifications/bootstrap/validations", :object => @project_category %>
6
- <!-- PHCNotifi Render Validation -->
7
-
8
- <!-- Form Input Fields -->
9
- <div class="form-group field_with_errors">
10
- <%= form.label :category_name, "Project Category" %>
11
- <%= form.text_field :category_name, placeholder: "Project Category", class: "form-control" %>
12
- </div>
13
- <!-- Form Input Fields -->
14
-
15
- <!-- Form Submition Button -->
16
- <div class="actions">
17
- <%= form.submit class: "btn btn-primary" %>
18
- </div>
19
- <!-- For Submition Button -->
20
-
21
- <% end %>
22
- <!-- Form - Project - Posts -->
@@ -1,47 +0,0 @@
1
- <!-- PHCTitleSEO Title Variables -->
2
- <% phc_title "Portfolio Manager" %>
3
- <% phc_title_tagline "Update Project Category" %>
4
- <% phc_breadcrumb_one link_to "Category List", phcdevworks_portfolio.project_types_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
- <!-- PHCTitleSEO Title Variables -->
7
-
8
- <!-- Page Bradcrumbs -->
9
- <ol class="breadcrumb pull-right">
10
- <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
- <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
- </ol>
13
- <!-- Page Bradcrumbs -->
14
-
15
- <!-- Page Header -->
16
- <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
- <!-- Page Header -->
18
-
19
- <!-- Page Content -->
20
- <div class="row">
21
- <div class="col-lg-12">
22
-
23
- <!-- Panel -->
24
- <div class="panel panel-inverse">
25
-
26
- <!-- Panel - Heading -->
27
- <div class="panel-heading">
28
- <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
- </div>
30
- <!-- Panel - Heading -->
31
-
32
- <!-- Panel - Body -->
33
- <div class="panel-body">
34
-
35
- <!-- Edit Form -->
36
- <%= render 'form', project_category: @project_category %>
37
- <!-- Edit Form -->
38
-
39
- </div>
40
- <!-- Panel - Body -->
41
-
42
- </div>
43
- <!-- Panel -->
44
-
45
- </div>
46
- </div>
47
- <!-- Page Content -->
@@ -1,79 +0,0 @@
1
- <!-- PHCTitleSEO Title Variables -->
2
- <% phc_title "Portfolio Manager" %>
3
- <% phc_title_tagline "Project Category Index" %>
4
- <% phc_breadcrumb_one link_to "Category List", phcdevworks_portfolio.project_categories_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
- <!-- PHCTitleSEO Title Variables -->
7
-
8
- <!-- Page Bradcrumbs -->
9
- <ol class="breadcrumb pull-right">
10
- <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
- <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
- </ol>
13
- <!-- Page Bradcrumbs -->
14
-
15
- <!-- Page Header -->
16
- <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
- <!-- Page Header -->
18
-
19
- <!-- Page Content -->
20
- <div class="row">
21
- <div class="col-lg-12">
22
-
23
- <!-- Panel -->
24
- <div class="panel panel-inverse">
25
-
26
- <!-- Panel - Heading -->
27
- <div class="panel-heading">
28
- <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
- </div>
30
- <!-- Panel - Heading -->
31
-
32
- <!-- Panel - Body -->
33
- <div class="panel-body">
34
-
35
- <!-- Index - Table -->
36
- <div class="table-responsive">
37
- <table class="table table-striped table-bordered">
38
-
39
- <thead>
40
- <tr>
41
- <th>Category Name</th>
42
- <th></th>
43
- </tr>
44
- </thead>
45
-
46
- <tbody>
47
- <% @project_categories.each do |project_category| %>
48
- <tr>
49
- <td><%= project_category.category_name %></td>
50
- <td>
51
- <div class="btn-group d-flex" role="group">
52
- <%= link_to "Update Category", edit_project_category_path(project_category), class: "btn btn-purple btn-xs" %>
53
- <%= link_to "Remove Category", project_category, method: :delete, data: { confirm: "Are you sure? This will also remove the Members addresses and listings. This action cannot be reversed." }, class: "btn btn-danger btn-xs" %>
54
- </div>
55
- </td>
56
- </tr>
57
- <% end %>
58
- </tbody>
59
-
60
- </table>
61
- </div>
62
- <!-- Index - Table -->
63
-
64
- <!-- New Button -->
65
- <%= link_to phcdevworks_portfolio.new_project_category_path, class: "btn btn-primary btn-sm" do %>
66
- <i class="fad fa-plus-circle"></i>
67
- Add a New Category
68
- <% end %>
69
- <!-- New Button -->
70
-
71
- </div>
72
- <!-- Panel - Body -->
73
-
74
- </div>
75
- <!-- Panel -->
76
-
77
- </div>
78
- </div>
79
- <!-- Page Content -->
@@ -1,47 +0,0 @@
1
- <!-- PHCTitleSEO Title Variables -->
2
- <% phc_title "Portfolio Manager" %>
3
- <% phc_title_tagline "Update Project Category" %>
4
- <% phc_breadcrumb_one link_to "Category List", phcdevworks_portfolio.project_categories_path %>
5
- <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
- <!-- PHCTitleSEO Title Variables -->
7
-
8
- <!-- Page Bradcrumbs -->
9
- <ol class="breadcrumb pull-right">
10
- <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
- <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
- </ol>
13
- <!-- Page Bradcrumbs -->
14
-
15
- <!-- Page Header -->
16
- <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
- <!-- Page Header -->
18
-
19
- <!-- Page Content -->
20
- <div class="row">
21
- <div class="col-lg-12">
22
-
23
- <!-- Panel -->
24
- <div class="panel panel-inverse">
25
-
26
- <!-- Panel - Heading -->
27
- <div class="panel-heading">
28
- <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
- </div>
30
- <!-- Panel - Heading -->
31
-
32
- <!-- Panel - Body -->
33
- <div class="panel-body">
34
-
35
- <!-- New Form -->
36
- <%= render 'form', project_category: @project_category %>
37
- <!-- New Form -->
38
-
39
- </div>
40
- <!-- Panel - Body -->
41
-
42
- </div>
43
- <!-- Panel -->
44
-
45
- </div>
46
- </div>
47
- <!-- Page Content -->
@@ -1,15 +0,0 @@
1
- class CreatePhcdevworksPortfolioProjectCategories < ActiveRecord::Migration[6.0]
2
- def change
3
- create_table :phcdevworks_portfolio_project_categories do |t|
4
-
5
- t.string :category_name
6
-
7
- t.string :slug
8
- t.string :user_id
9
- t.string :org_id
10
-
11
- t.timestamps
12
-
13
- end
14
- end
15
- end
@@ -1,10 +0,0 @@
1
- class CreatePhcdevworksPortfolioCategoriesPosts < ActiveRecord::Migration[6.0]
2
- def change
3
- create_table :phcdevworks_portfolio_categories_posts do |t|
4
-
5
- t.integer :category_id
6
- t.integer :post_id
7
-
8
- end
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- class CreatePhcdevworksPortfolioPostsTypes < ActiveRecord::Migration[6.0]
2
- def change
3
- create_table :phcdevworks_portfolio_posts_types do |t|
4
-
5
- t.integer :post_id
6
- t.integer :type_id
7
-
8
- end
9
- end
10
- end
@@ -1,19 +0,0 @@
1
- class CreatePhcdevworksPortfolioProjectCategoryVersions < ActiveRecord::Migration[6.0]
2
- TEXT_BYTES = 1_073_741_823
3
- def change
4
-
5
- create_table :phcdevworks_portfolio_project_category_versions do |t|
6
-
7
- t.string :item_type, {:null=>false}
8
- t.integer :item_id, null: false
9
- t.string :event, null: false
10
- t.string :whodunnit
11
- t.text :object, limit: TEXT_BYTES
12
- t.datetime :created_at
13
-
14
- end
15
-
16
- add_index :phcdevworks_portfolio_project_category_versions, %i(item_type item_id), :name => 'project_category_versions'
17
-
18
- end
19
- end