phcdevworks_tutorials 6.11.0 → 7.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/models/phcdevworks_tutorials/command/post.rb +2 -2
- data/app/models/phcdevworks_tutorials/tutorial/post.rb +2 -2
- data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +64 -80
- data/app/views/phcdevworks_tutorials/command/posts/_form.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb +1 -1
- data/config/routes.rb +3 -3
- data/lib/phcdevworks_tutorials/engine.rb +27 -26
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +18 -18
- data/app/assets/javascripts/phcdevworks_tutorials/tutorial/categories.coffee +0 -3
- data/app/assets/stylesheets/phcdevworks_tutorials/category/posts.css +0 -4
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/categories.scss +0 -3
- data/app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb +0 -81
- data/app/helpers/phcdevworks_tutorials/tutorial/categories_helper.rb +0 -4
- data/app/models/phcdevworks_tutorials/tutorial/category.rb +0 -27
- data/app/models/phcdevworks_tutorials/tutorial_category_versions.rb +0 -5
- data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +0 -22
- data/app/views/phcdevworks_tutorials/tutorial/categories/edit.html.erb +0 -47
- data/app/views/phcdevworks_tutorials/tutorial/categories/index.html.erb +0 -80
- data/app/views/phcdevworks_tutorials/tutorial/categories/new.html.erb +0 -47
- data/app/views/phcdevworks_tutorials/tutorial/categories/show.html.erb +0 -9
- data/db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb +0 -15
- data/db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21c674e628b385a018fce63296af1826532834c0632cb1057642c3a1b34ddda
|
4
|
+
data.tar.gz: 768b4439f963ce9fcd9c8107c3d7163a54aff52b9d12a2a5f5051dbd9213ab80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94108b0fd5cd215ff88b0dcb2ec5f488f4e2d4b7777df2a9571f831eacf861bde7a6e36ee0bf81bd6c2111f9fa40d0dd75413ece7ef8b16dafa96ba65b199ee7
|
7
|
+
data.tar.gz: 11ce722da6483fb21169c553b564e0f5380be150090b4e9dfdc93e37fdc7ebb5a2125b011e22ae2d6aca8b0f6b0f19c644e18ba17cb447df78b55c43c33fb814
|
@@ -11,9 +11,9 @@ module PhcdevworksTutorials
|
|
11
11
|
has_one_attached :post_image
|
12
12
|
|
13
13
|
# Relationships
|
14
|
-
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_commands", :dependent => :destroy
|
15
|
-
has_many :items, class_name: "Command::Item"
|
16
14
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
15
|
+
has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Modules::Category", :join_table => "phcdevworks_tutorials_categories_commands"
|
16
|
+
has_many :items, class_name: "Command::Item"
|
17
17
|
|
18
18
|
# Form Fields Validation
|
19
19
|
validates :post_title,
|
@@ -11,9 +11,9 @@ module PhcdevworksTutorials
|
|
11
11
|
has_one_attached :post_image
|
12
12
|
|
13
13
|
# Relationships
|
14
|
-
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
15
|
-
has_many :steps, class_name: "Tutorial::Step"
|
16
14
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
15
|
+
has_many :steps, class_name: "Tutorial::Step"
|
16
|
+
has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Modules::Category", :join_table => "phcdevworks_tutorials_categories_posts"
|
17
17
|
|
18
18
|
# Form Fields Validation
|
19
19
|
validates :post_title,
|
data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb
CHANGED
@@ -38,33 +38,21 @@
|
|
38
38
|
<!-- -PHC- Sidebar - Sidebar Navigation -->
|
39
39
|
<ul class="nav">
|
40
40
|
|
41
|
-
<% if defined?
|
42
|
-
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks
|
43
|
-
<li class="nav-header">
|
44
|
-
<li class="has-sub">
|
45
|
-
<a href="javascript:;">
|
46
|
-
<b class="caret"></b>
|
47
|
-
<i class="fad fa-users"></i>
|
48
|
-
<span>Member"s Data</span>
|
49
|
-
</a>
|
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>
|
53
|
-
</ul>
|
54
|
-
</li>
|
55
|
-
<li class="nav-header">Member"s Directory</li>
|
41
|
+
<% if defined?phcdevworks_press %>
|
42
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
43
|
+
<li class="nav-header">Articles & Blogging</li>
|
56
44
|
<li class="has-sub">
|
57
45
|
<a href="javascript:;">
|
58
46
|
<b class="caret"></b>
|
59
|
-
<i class="fad fa-
|
60
|
-
<span>
|
47
|
+
<i class="fad fa-newspaper"></i>
|
48
|
+
<span>Article Posts</span>
|
61
49
|
</a>
|
62
50
|
<ul class="sub-menu">
|
63
|
-
<li class="<%= phc_menu_active_controller("
|
64
|
-
<li class="<%= phc_menu_active_controller("
|
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("New Aritcle", phcdevworks_press.new_article_post_path) %></li>
|
65
53
|
</ul>
|
66
54
|
</li>
|
67
|
-
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks
|
55
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
68
56
|
<% end %>
|
69
57
|
|
70
58
|
<% if defined?phcdevworks_portfolio %>
|
@@ -84,54 +72,90 @@
|
|
84
72
|
<li class="has-sub">
|
85
73
|
<a href="javascript:;">
|
86
74
|
<b class="caret"></b>
|
87
|
-
<i class="fad fa-
|
88
|
-
<span>Project
|
75
|
+
<i class="fad fa-folders"></i>
|
76
|
+
<span>Project Types</span>
|
89
77
|
</a>
|
90
78
|
<ul class="sub-menu">
|
91
|
-
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project
|
92
|
-
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New
|
79
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Type", phcdevworks_portfolio.project_types_path) %></li>
|
80
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
|
93
81
|
</ul>
|
94
82
|
</li>
|
83
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
84
|
+
<% end %>
|
85
|
+
|
86
|
+
<% if defined?phcdevworks_tutorials %>
|
87
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
|
88
|
+
<li class="nav-header">Tutorial Posts</li>
|
95
89
|
<li class="has-sub">
|
96
90
|
<a href="javascript:;">
|
97
91
|
<b class="caret"></b>
|
98
|
-
<i class="fad fa-
|
99
|
-
<span>
|
92
|
+
<i class="fad fa-chalkboard-teacher"></i>
|
93
|
+
<span>Tutorial Posts</span>
|
100
94
|
</a>
|
101
95
|
<ul class="sub-menu">
|
102
|
-
<li class="<%= phc_menu_active_controller("
|
103
|
-
<li class="<%= phc_menu_active_controller("
|
96
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts") %>"><%= link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %></li>
|
97
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/posts#new") %>"><%= link_to "New Tutorial", phcdevworks_tutorials.new_tutorial_post_path %></li>
|
104
98
|
</ul>
|
105
99
|
</li>
|
106
|
-
|
100
|
+
<li class="nav-header">Command Lists & Items</li>
|
101
|
+
<li class="has-sub">
|
102
|
+
<a href="javascript:;">
|
103
|
+
<b class="caret"></b>
|
104
|
+
<i class="fad fa-terminal"></i>
|
105
|
+
<span>Command Lists</span>
|
106
|
+
</a>
|
107
|
+
<ul class="sub-menu">
|
108
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts") %>"><%= link_to "List Index", phcdevworks_tutorials.command_posts_path %></li>
|
109
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_tutorials/command/posts#new") %>"><%= link_to "New List", phcdevworks_tutorials.new_command_post_path %></li>
|
110
|
+
</ul>
|
111
|
+
</li>
|
112
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
|
107
113
|
<% end %>
|
108
114
|
|
109
|
-
<% if defined?
|
115
|
+
<% if defined?phcdevworks_core_modules %>
|
110
116
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
111
|
-
<li class="nav-header">
|
117
|
+
<li class="nav-header">Core Modules</li>
|
112
118
|
<li class="has-sub">
|
113
119
|
<a href="javascript:;">
|
114
120
|
<b class="caret"></b>
|
115
|
-
<i class="fad fa-
|
116
|
-
<span>
|
121
|
+
<i class="fad fa-sitemap"></i>
|
122
|
+
<span>Categories</span>
|
117
123
|
</a>
|
118
124
|
<ul class="sub-menu">
|
119
|
-
<li class="<%= phc_menu_active_controller("
|
120
|
-
<li class="<%= phc_menu_active_controller("
|
125
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_core_modules/modules/categories") %>"><%= link_to("Category Index", phcdevworks_core_modules.modules_categories_path) %></li>
|
126
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_core_modules/modules/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_modules_category_path) %></li>
|
121
127
|
</ul>
|
122
128
|
</li>
|
129
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
130
|
+
<% end %>
|
131
|
+
|
132
|
+
<% if defined?phcdevworks_members %>
|
133
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
|
134
|
+
<li class="nav-header">Membership Manager</li>
|
123
135
|
<li class="has-sub">
|
124
136
|
<a href="javascript:;">
|
125
137
|
<b class="caret"></b>
|
126
|
-
<i class="fad fa-
|
127
|
-
<span>
|
138
|
+
<i class="fad fa-users"></i>
|
139
|
+
<span>Member"s Data</span>
|
128
140
|
</a>
|
129
141
|
<ul class="sub-menu">
|
130
|
-
<li class="<%= phc_menu_active_controller("
|
131
|
-
<li class="<%= phc_menu_active_controller("
|
142
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles") %>"><%= link_to("Profile Index", phcdevworks_members.member_profiles_path) %></li>
|
143
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_members/member/profiles#new") %>"><%= link_to("New Member Profile", phcdevworks_members.new_member_profile_path) %></li>
|
132
144
|
</ul>
|
133
145
|
</li>
|
134
|
-
|
146
|
+
<li class="nav-header">Member"s Directory</li>
|
147
|
+
<li class="has-sub">
|
148
|
+
<a href="javascript:;">
|
149
|
+
<b class="caret"></b>
|
150
|
+
<i class="fad fa-list-alt"></i>
|
151
|
+
<span>Member"s Directory</span>
|
152
|
+
</a>
|
153
|
+
<ul class="sub-menu">
|
154
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_members/modules/categories") %>"><%= link_to("Directory Index", phcdevworks_members.directory_categories_path) %></li>
|
155
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_members/modules/categories#new") %>"><%= link_to("New Directory Listing", phcdevworks_members.new_directory_category_path) %></li>
|
156
|
+
</ul>
|
157
|
+
</li>
|
158
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
|
135
159
|
<% end %>
|
136
160
|
|
137
161
|
<% if defined?phcdevworks_scripts %>
|
@@ -203,46 +227,6 @@
|
|
203
227
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
|
204
228
|
<% end %>
|
205
229
|
|
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>
|
220
|
-
<li class="has-sub">
|
221
|
-
<a href="javascript:;">
|
222
|
-
<b class="caret"></b>
|
223
|
-
<i class="fad fa-sitemap"></i>
|
224
|
-
<span>Tutorial Categories</span>
|
225
|
-
</a>
|
226
|
-
<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>
|
229
|
-
</ul>
|
230
|
-
</li>
|
231
|
-
<li class="nav-header">Command Lists & Items</li>
|
232
|
-
<li class="has-sub">
|
233
|
-
<a href="javascript:;">
|
234
|
-
<b class="caret"></b>
|
235
|
-
<i class="fad fa-terminal"></i>
|
236
|
-
<span>Command Lists</span>
|
237
|
-
</a>
|
238
|
-
<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>
|
241
|
-
</ul>
|
242
|
-
</li>
|
243
|
-
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
|
244
|
-
<% end %>
|
245
|
-
|
246
230
|
<% if current_user && current_user.admin? %>
|
247
231
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
|
248
232
|
<li class="nav-header">User Administration</li>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<div class="form-group">
|
34
34
|
<label>Select a Category</label>
|
35
35
|
<div class="panel-body">
|
36
|
-
<%= form.collection_check_boxes :category_ids,
|
36
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Modules::Category.all, :id, :category_name do |post_category| %>
|
37
37
|
<%= post_category.check_box %>
|
38
38
|
<%= post_category.label %><br>
|
39
39
|
<% end %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<div class="form-group">
|
34
34
|
<label>Select a Category</label>
|
35
35
|
<div class="panel-body">
|
36
|
-
<%= form.collection_check_boxes :category_ids,
|
36
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Modules::Category.all, :id, :category_name do |post_category| %>
|
37
37
|
<%= post_category.check_box %>
|
38
38
|
<%= post_category.label %><br>
|
39
39
|
<% end %>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
<% @tutorial_posts.each do |tutorial_post| %>
|
50
50
|
<tr>
|
51
51
|
<td><%= tutorial_post.post_title %></td>
|
52
|
-
|
52
|
+
<td><%= truncate(tutorial_post.post_description, :length => 80, :escape => false) %></td>
|
53
53
|
<td><%= tutorial_post.post_status.capitalize %></td>
|
54
54
|
<td>
|
55
55
|
<div class="btn-group d-flex" role="group">
|
data/config/routes.rb
CHANGED
@@ -5,7 +5,6 @@ PhcdevworksTutorials::Engine.routes.draw do
|
|
5
5
|
resources :posts, class_name: "Tutorial::Post" do
|
6
6
|
resources :steps, class_name: "Tutorial::Step"
|
7
7
|
end
|
8
|
-
resources :categories, class_name: "Tutorial::Category"
|
9
8
|
end
|
10
9
|
|
11
10
|
# Command Routes
|
@@ -29,7 +28,8 @@ PhcdevworksTutorials::Engine.routes.draw do
|
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
32
|
-
|
33
|
-
|
31
|
+
# Mount Routes
|
32
|
+
mount PhcdevworksAccounts::Engine, :at => '/'
|
33
|
+
mount PhcdevworksCoreModules::Engine, :at => '/'
|
34
34
|
|
35
35
|
end
|
@@ -1,36 +1,37 @@
|
|
1
1
|
module PhcdevworksTutorials
|
2
|
-
|
2
|
+
class Engine < ::Rails::Engine
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
# Load Main Dependencies
|
5
|
+
require "jbuilder"
|
6
|
+
require "paper_trail"
|
7
|
+
require "friendly_id"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
# Load Theme Dependencies
|
10
|
+
require "phcthemes_admin_panel_pack"
|
11
|
+
require "phcthemes_web_theme_pack"
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
# Load Helper Dependencies
|
14
|
+
require "phcdevworks_core"
|
15
|
+
require "phcdevworks_active_menus"
|
16
|
+
require "phcdevworks_notifications"
|
17
|
+
require "phcdevworks_titleseo"
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
# Load Upload Dependencies
|
20
|
+
require "aws-sdk-s3"
|
21
|
+
require "google-cloud-storage"
|
22
|
+
require "mini_magick"
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
# Frontend Dependencies
|
25
|
+
require "wicked"
|
26
|
+
require "gravtastic"
|
27
|
+
require "friendly_id"
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
# Load User Accounts
|
30
|
+
require "phcdevworks_accounts"
|
31
|
+
require "phcdevworks_core_modules"
|
31
32
|
|
32
|
-
|
33
|
-
|
33
|
+
# Engine Namespace
|
34
|
+
isolate_namespace PhcdevworksTutorials
|
34
35
|
|
35
|
-
|
36
|
+
end
|
36
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_tutorials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.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-
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -114,6 +114,20 @@ dependencies:
|
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '1.5'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: phcdevworks_core_modules
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '1.0'
|
124
|
+
type: :runtime
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '1.0'
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: phcdevworks_notifications
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,14 +246,14 @@ dependencies:
|
|
232
246
|
requirements:
|
233
247
|
- - "~>"
|
234
248
|
- !ruby/object:Gem::Version
|
235
|
-
version: '1.
|
249
|
+
version: '1.12'
|
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.
|
256
|
+
version: '1.12'
|
243
257
|
- !ruby/object:Gem::Dependency
|
244
258
|
name: sqlite3
|
245
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,14 +284,11 @@ files:
|
|
270
284
|
- app/assets/javascripts/phcdevworks_tutorials/blog/tutorials.coffee
|
271
285
|
- app/assets/javascripts/phcdevworks_tutorials/command/items.coffee
|
272
286
|
- app/assets/javascripts/phcdevworks_tutorials/command/posts.coffee
|
273
|
-
- app/assets/javascripts/phcdevworks_tutorials/tutorial/categories.coffee
|
274
287
|
- app/assets/stylesheets/phcdevworks_tutorials/application.scss
|
275
288
|
- app/assets/stylesheets/phcdevworks_tutorials/blog/commands.scss
|
276
289
|
- app/assets/stylesheets/phcdevworks_tutorials/blog/tutorials.scss
|
277
|
-
- app/assets/stylesheets/phcdevworks_tutorials/category/posts.css
|
278
290
|
- app/assets/stylesheets/phcdevworks_tutorials/command/items.scss
|
279
291
|
- app/assets/stylesheets/phcdevworks_tutorials/command/posts.scss
|
280
|
-
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/categories.scss
|
281
292
|
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.css
|
282
293
|
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.css
|
283
294
|
- app/assets/stylesheets/scaffolds.scss
|
@@ -286,7 +297,6 @@ files:
|
|
286
297
|
- app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb
|
287
298
|
- app/controllers/phcdevworks_tutorials/command/items_controller.rb
|
288
299
|
- app/controllers/phcdevworks_tutorials/command/posts_controller.rb
|
289
|
-
- app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb
|
290
300
|
- app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb
|
291
301
|
- app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb
|
292
302
|
- app/helpers/phcdevworks_tutorials/application_helper.rb
|
@@ -294,7 +304,6 @@ files:
|
|
294
304
|
- app/helpers/phcdevworks_tutorials/blog/tutorials_helper.rb
|
295
305
|
- app/helpers/phcdevworks_tutorials/command/items_helper.rb
|
296
306
|
- app/helpers/phcdevworks_tutorials/command/posts_helper.rb
|
297
|
-
- app/helpers/phcdevworks_tutorials/tutorial/categories_helper.rb
|
298
307
|
- app/helpers/phcdevworks_tutorials/tutorial/posts_helper.rb
|
299
308
|
- app/helpers/phcdevworks_tutorials/tutorial/steps_helper.rb
|
300
309
|
- app/jobs/phcdevworks_tutorials/application_job.rb
|
@@ -306,10 +315,8 @@ files:
|
|
306
315
|
- app/models/phcdevworks_tutorials/command_item_versions.rb
|
307
316
|
- app/models/phcdevworks_tutorials/command_post_versions.rb
|
308
317
|
- app/models/phcdevworks_tutorials/tutorial.rb
|
309
|
-
- app/models/phcdevworks_tutorials/tutorial/category.rb
|
310
318
|
- app/models/phcdevworks_tutorials/tutorial/post.rb
|
311
319
|
- app/models/phcdevworks_tutorials/tutorial/step.rb
|
312
|
-
- app/models/phcdevworks_tutorials/tutorial_category_versions.rb
|
313
320
|
- app/models/phcdevworks_tutorials/tutorial_post_versions.rb
|
314
321
|
- app/models/phcdevworks_tutorials/tutorial_step_versions.rb
|
315
322
|
- app/views/layouts/phcdevworks_tutorials/application.html.erb
|
@@ -331,11 +338,6 @@ files:
|
|
331
338
|
- app/views/phcdevworks_tutorials/command/posts/index.html.erb
|
332
339
|
- app/views/phcdevworks_tutorials/command/posts/new.html.erb
|
333
340
|
- app/views/phcdevworks_tutorials/command/posts/show.html.erb
|
334
|
-
- app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb
|
335
|
-
- app/views/phcdevworks_tutorials/tutorial/categories/edit.html.erb
|
336
|
-
- app/views/phcdevworks_tutorials/tutorial/categories/index.html.erb
|
337
|
-
- app/views/phcdevworks_tutorials/tutorial/categories/new.html.erb
|
338
|
-
- app/views/phcdevworks_tutorials/tutorial/categories/show.html.erb
|
339
341
|
- app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
|
340
342
|
- app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb
|
341
343
|
- app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb
|
@@ -348,11 +350,9 @@ files:
|
|
348
350
|
- config/routes.rb
|
349
351
|
- db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb
|
350
352
|
- db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb
|
351
|
-
- db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb
|
352
353
|
- db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb
|
353
354
|
- db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb
|
354
355
|
- db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb
|
355
|
-
- db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb
|
356
356
|
- db/migrate/20191110232654_add_copy_instructions_to_steps.rb
|
357
357
|
- db/migrate/20200320110115_create_phcdevworks_tutorials_command_posts.rb
|
358
358
|
- db/migrate/20200320110553_create_phcdevworks_tutorials_command_items.rb
|
@@ -1,81 +0,0 @@
|
|
1
|
-
require_dependency "phcdevworks_tutorials/application_controller"
|
2
|
-
|
3
|
-
module PhcdevworksTutorials
|
4
|
-
class Tutorial::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_tutorial_category, only: [:show, :edit, :update, :destroy]
|
11
|
-
|
12
|
-
# GET /tutorial/categories
|
13
|
-
def index
|
14
|
-
@tutorial_categories = Tutorial::Category.all
|
15
|
-
end
|
16
|
-
|
17
|
-
# GET /tutorial/categories/1
|
18
|
-
def show
|
19
|
-
end
|
20
|
-
|
21
|
-
# GET /tutorial/categories/new
|
22
|
-
def new
|
23
|
-
@tutorial_category = Tutorial::Category.new
|
24
|
-
end
|
25
|
-
|
26
|
-
# GET /tutorial/categories/1/edit
|
27
|
-
def edit
|
28
|
-
end
|
29
|
-
|
30
|
-
# POST /tutorial/categories
|
31
|
-
def create
|
32
|
-
@tutorial_category = Tutorial::Category.new(tutorial_category_params)
|
33
|
-
@tutorial_category.user_id = current_user.id
|
34
|
-
@tutorial_category.org_id = current_user.org_id
|
35
|
-
respond_to do |format|
|
36
|
-
if @tutorial_category.save
|
37
|
-
format.html { redirect_to tutorial_categories_path, :flash => { :success => 'Tutorial has been Added.' }}
|
38
|
-
format.json { render :show, status: :created, location: @tutorial_category }
|
39
|
-
else
|
40
|
-
format.html { render :new }
|
41
|
-
format.json { render json: @tutorial_category.errors, status: :unprocessable_entity }
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# PATCH/PUT /tutorial/categories/1
|
47
|
-
def update
|
48
|
-
respond_to do |format|
|
49
|
-
if @tutorial_category.update(tutorial_category_params)
|
50
|
-
format.html { redirect_to tutorial_categories_path, :flash => { :notice => 'Tutorial has been Updated.' }}
|
51
|
-
format.json { render :show, status: :ok, location: @tutorial_category }
|
52
|
-
else
|
53
|
-
format.html { render :edit }
|
54
|
-
format.json { render json: @tutorial_category.errors, status: :unprocessable_entity }
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# DELETE /tutorial/categories/1
|
60
|
-
def destroy
|
61
|
-
@tutorial_category.destroy
|
62
|
-
respond_to do |format|
|
63
|
-
format.html { redirect_to tutorial_categories_path, :flash => { :error => 'Categories and Connections have all been Removed.' }}
|
64
|
-
format.json { head :no_content }
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
private
|
69
|
-
|
70
|
-
# Common Callbacks
|
71
|
-
def set_tutorial_category
|
72
|
-
@tutorial_category = Tutorial::Category.find(params[:id])
|
73
|
-
end
|
74
|
-
|
75
|
-
# Whitelist
|
76
|
-
def tutorial_category_params
|
77
|
-
params.require(:tutorial_category).permit(:category_name, :slug, :user_id, :org_id)
|
78
|
-
end
|
79
|
-
|
80
|
-
end
|
81
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module PhcdevworksTutorials
|
2
|
-
class Tutorial::Category < ApplicationRecord
|
3
|
-
|
4
|
-
# Clean URL Initialize
|
5
|
-
extend FriendlyId
|
6
|
-
|
7
|
-
# Paper Trail Initialize
|
8
|
-
has_paper_trail :class_name => 'PhcdevworksTutorials::TutorialCategoryVersions'
|
9
|
-
|
10
|
-
#Relationships
|
11
|
-
has_and_belongs_to_many :posts, class_name: "Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
12
|
-
has_and_belongs_to_many :posts, class_name: "Command::Post", :join_table => "phcdevworks_tutorials_categories_commands", :dependent => :destroy
|
13
|
-
|
14
|
-
# Form Fields Validation
|
15
|
-
validates :category_name,
|
16
|
-
presence: true,
|
17
|
-
uniqueness: true
|
18
|
-
|
19
|
-
# Clean URL Define
|
20
|
-
friendly_id :phcdev_tutorials_category_nice_urls, use: [:slugged, :finders]
|
21
|
-
|
22
|
-
def phcdev_tutorials_category_nice_urls
|
23
|
-
[:category_name]
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<!-- Form - Tutorial - Category -->
|
2
|
-
<%= form_with(model: tutorial_category, local: true) do |form| %>
|
3
|
-
|
4
|
-
<!-- PHCNotifi Render Validation -->
|
5
|
-
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_category %>
|
6
|
-
<!-- PHCNotifi Render Validation -->
|
7
|
-
|
8
|
-
<!-- Form Input Fields -->
|
9
|
-
<div class="form-group">
|
10
|
-
<%= form.label :category_name, "Tutorial Category" %>
|
11
|
-
<%= form.text_field :category_name, placeholder: "Category Name", 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 - Tutorial - Category -->
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "Tutorial Post Manager" %>
|
3
|
-
<% phc_title_tagline "Update Tutorial Category" %>
|
4
|
-
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_tutorials.tutorial_categories_path %>
|
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", tutorial_category: @tutorial_category %>
|
37
|
-
<!-- Edit Form -->
|
38
|
-
|
39
|
-
</div>
|
40
|
-
<!-- Panel - Body -->
|
41
|
-
|
42
|
-
</div>
|
43
|
-
<!-- Panel -->
|
44
|
-
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<!-- Page Content -->
|
@@ -1,80 +0,0 @@
|
|
1
|
-
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "Tutorial Post Manager" %>
|
3
|
-
<% phc_title_tagline "Category Index" %>
|
4
|
-
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_tutorials.tutorial_categories_path %>
|
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</th>
|
42
|
-
<th></th>
|
43
|
-
</tr>
|
44
|
-
</thead>
|
45
|
-
|
46
|
-
<tbody>
|
47
|
-
<% @tutorial_categories.each do |tutorial_category| %>
|
48
|
-
<tr>
|
49
|
-
<td><%= tutorial_category.category_name %></td>
|
50
|
-
<td>
|
51
|
-
<div class="btn-group d-flex" role="group">
|
52
|
-
<%= link_to "Category Details", tutorial_category, class: "btn btn-purple btn-xs" %>
|
53
|
-
<%= link_to "Update Category", edit_tutorial_category_path(tutorial_category), class: "btn btn-primary btn-xs" %>
|
54
|
-
<%= link_to "Remove Category", tutorial_category, method: :delete, data: { confirm: "Are you sure? This action cannot be reversed." }, class: "btn btn-danger btn-xs" %>
|
55
|
-
</div>
|
56
|
-
</td>
|
57
|
-
</tr>
|
58
|
-
<% end %>
|
59
|
-
</tbody>
|
60
|
-
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- Index - Table -->
|
64
|
-
|
65
|
-
<!-- New Button -->
|
66
|
-
<%= link_to phcdevworks_tutorials.new_tutorial_category_path, class: "btn btn-primary btn-sm" do %>
|
67
|
-
<i class="fad fa-plus-circle"></i>
|
68
|
-
Add a New Category
|
69
|
-
<% end %>
|
70
|
-
<!-- New Button -->
|
71
|
-
|
72
|
-
</div>
|
73
|
-
<!-- Panel - Body -->
|
74
|
-
|
75
|
-
</div>
|
76
|
-
<!-- Panel -->
|
77
|
-
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
<!-- Page Content -->
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "Tutorial Post Manager" %>
|
3
|
-
<% phc_title_tagline "Add a New Tutorial Category" %>
|
4
|
-
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_tutorials.tutorial_categories_path %>
|
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", tutorial_category: @tutorial_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 CreatePhcdevworksTutorialsTutorialCategories < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :phcdevworks_tutorials_tutorial_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,16 +0,0 @@
|
|
1
|
-
class CreatePhcdevworksTutorialsTutorialCategoryVersions < ActiveRecord::Migration[6.0]
|
2
|
-
TEXT_BYTES = 1_073_741_823
|
3
|
-
def change
|
4
|
-
create_table :phcdevworks_tutorials_tutorial_category_versions do |t|
|
5
|
-
|
6
|
-
t.string :item_type, {:null=>false}
|
7
|
-
t.integer :item_id, null: false
|
8
|
-
t.string :event, null: false
|
9
|
-
t.string :whodunnit
|
10
|
-
t.text :object, limit: TEXT_BYTES
|
11
|
-
t.datetime :created_at
|
12
|
-
|
13
|
-
end
|
14
|
-
add_index :phcdevworks_tutorials_tutorial_category_versions, %i(item_type item_id), :name => 'tutorial_category_versions'
|
15
|
-
end
|
16
|
-
end
|