phcdevworks_tutorials 6.5.0 → 6.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/phcdevworks_tutorials/command/items.coffee +3 -0
  3. data/app/assets/javascripts/phcdevworks_tutorials/command/posts.coffee +3 -0
  4. data/app/assets/stylesheets/phcdevworks_tutorials/command/items.scss +3 -0
  5. data/app/assets/stylesheets/phcdevworks_tutorials/command/posts.scss +3 -0
  6. data/app/assets/stylesheets/scaffolds.scss +65 -0
  7. data/app/controllers/phcdevworks_tutorials/command/items_controller.rb +95 -0
  8. data/app/controllers/phcdevworks_tutorials/command/posts_controller.rb +70 -0
  9. data/app/helpers/phcdevworks_tutorials/command/items_helper.rb +4 -0
  10. data/app/helpers/phcdevworks_tutorials/command/posts_helper.rb +4 -0
  11. data/app/models/phcdevworks_tutorials/application_record.rb +3 -3
  12. data/app/models/phcdevworks_tutorials/command/item.rb +16 -0
  13. data/app/models/phcdevworks_tutorials/command/post.rb +33 -0
  14. data/app/models/phcdevworks_tutorials/command.rb +7 -0
  15. data/app/models/phcdevworks_tutorials/command_item_versions.rb +5 -0
  16. data/app/models/phcdevworks_tutorials/command_post_versions.rb +5 -0
  17. data/app/models/phcdevworks_tutorials/tutorial.rb +4 -4
  18. data/app/models/phcdevworks_tutorials/tutorial_category_versions.rb +3 -3
  19. data/app/models/phcdevworks_tutorials/tutorial_post_versions.rb +3 -3
  20. data/app/models/phcdevworks_tutorials/tutorial_step_versions.rb +3 -3
  21. data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb +10 -7
  22. data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +36 -24
  23. data/app/views/phcdevworks_tutorials/command/items/_form.html.erb +41 -0
  24. data/app/views/phcdevworks_tutorials/command/items/edit.html.erb +47 -0
  25. data/app/views/phcdevworks_tutorials/command/items/index.html.erb +84 -0
  26. data/app/views/phcdevworks_tutorials/command/items/new.html.erb +47 -0
  27. data/app/views/phcdevworks_tutorials/command/items/show.html.erb +19 -0
  28. data/app/views/phcdevworks_tutorials/command/posts/_form.html.erb +41 -0
  29. data/app/views/phcdevworks_tutorials/command/posts/edit.html.erb +47 -0
  30. data/app/views/phcdevworks_tutorials/command/posts/index.html.erb +81 -0
  31. data/app/views/phcdevworks_tutorials/command/posts/new.html.erb +49 -0
  32. data/app/views/phcdevworks_tutorials/command/posts/show.html.erb +14 -0
  33. data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +1 -1
  34. data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +5 -5
  35. data/app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb +1 -1
  36. data/app/views/phcdevworks_tutorials/tutorial/posts/new.html.erb +1 -1
  37. data/app/views/phcdevworks_tutorials/tutorial/posts/show.html.erb +2 -2
  38. data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +5 -5
  39. data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +1 -1
  40. data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +1 -1
  41. data/config/routes.rb +25 -18
  42. data/db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb +11 -11
  43. data/db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb +12 -12
  44. data/db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb +8 -8
  45. data/db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb +5 -5
  46. data/db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb +11 -14
  47. data/db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb +11 -14
  48. data/db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb +11 -13
  49. data/db/migrate/20191110232654_add_copy_instructions_to_steps.rb +3 -5
  50. data/db/migrate/20200320110115_create_phcdevworks_tutorials_command_posts.rb +18 -0
  51. data/db/migrate/20200320110553_create_phcdevworks_tutorials_command_items.rb +20 -0
  52. data/db/migrate/20200321122525_create_phcdevworks_tutorials_command_items_versions.rb +16 -0
  53. data/db/migrate/20200321122606_create_phcdevworks_tutorials_command_posts_versions.rb +16 -0
  54. data/lib/phcdevworks_tutorials/engine.rb +26 -26
  55. data/lib/phcdevworks_tutorials/version.rb +1 -1
  56. metadata +50 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40957a13a96eefe80f25e327ce91cc56b14dced64d05bd6f8376275c5d6740f1
4
- data.tar.gz: d885c8ca4fd11078a5319aa1efb56229f4d4cb6efb2e1fa71755b29d3338c5dd
3
+ metadata.gz: 0f1a86d03b35ad318aec0f081fdd46c337c01efcb37a635f10545068a1a9cd1c
4
+ data.tar.gz: 3cd6fc518c06ac86daaa7305ac381d4ba8fd311700fd3bea33093dd32c38b099
5
5
  SHA512:
6
- metadata.gz: 26d72cd3efc359817e2f2f99424b86a460f20648f1707d006c14a3031c84408794ffc423fd8cc208323711be78611a8f8b415c34b845902016056a35d1628fbd
7
- data.tar.gz: 5754da293d55184769f64d89bf2554500e9610851e243a86571d5833b149ada09470ba6bb559f2818e7c920ed21fdd2d50d8832323d8b6ea6811a17e2bfe40c5
6
+ metadata.gz: 988d8b80d1f608c1a1fa165a4a52518a2ff0c18c3ffcff4605c7194ffd0934bd9193d616aa8318b86efda7b014611a50814c2b07078e1dec7a0fde350f8229d9
7
+ data.tar.gz: 859c7a5ba1eff8a14dc1b63f8f47c8af1175d35cf359c5b495b0c4102c086aecd2753ed3119ae59c214d9fec531926596e47f1fb268e1120dc0e09f96470418c
@@ -0,0 +1,3 @@
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/
@@ -0,0 +1,3 @@
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/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the command::items controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the command::posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -0,0 +1,65 @@
1
+ body {
2
+ background-color: #fff;
3
+ color: #333;
4
+ margin: 33px; }
5
+
6
+ body, p, ol, ul, td {
7
+ font-family: verdana, arial, helvetica, sans-serif;
8
+ font-size: 13px;
9
+ line-height: 18px; }
10
+
11
+ pre {
12
+ background-color: #eee;
13
+ padding: 10px;
14
+ font-size: 11px; }
15
+
16
+ a {
17
+ color: #000; }
18
+
19
+ a:visited {
20
+ color: #666; }
21
+
22
+ a:hover {
23
+ color: #fff;
24
+ background-color: #000; }
25
+
26
+ th {
27
+ padding-bottom: 5px; }
28
+
29
+ td {
30
+ padding: 0 5px 7px; }
31
+
32
+ div.field,
33
+ div.actions {
34
+ margin-bottom: 10px; }
35
+
36
+ #notice {
37
+ color: green; }
38
+
39
+ .field_with_errors {
40
+ padding: 2px;
41
+ background-color: red;
42
+ display: table; }
43
+
44
+ #error_explanation {
45
+ width: 450px;
46
+ border: 2px solid red;
47
+ padding: 7px 7px 0;
48
+ margin-bottom: 20px;
49
+ background-color: #f0f0f0; }
50
+
51
+ #error_explanation h2 {
52
+ text-align: left;
53
+ font-weight: bold;
54
+ padding: 5px 5px 5px 15px;
55
+ font-size: 12px;
56
+ margin: -7px -7px 0;
57
+ background-color: #c00;
58
+ color: #fff; }
59
+
60
+ #error_explanation ul li {
61
+ font-size: 12px;
62
+ list-style: square; }
63
+
64
+ label {
65
+ display: block; }
@@ -0,0 +1,95 @@
1
+ require_dependency "phcdevworks_tutorials/application_controller"
2
+
3
+ module PhcdevworksTutorials
4
+ class Command::ItemsController < 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_command_item, only: [:show, :edit, :update, :destroy]
11
+
12
+ # GET /post/items
13
+ # GET /post/items.json
14
+ def index
15
+ @command_items = command_post.items.all
16
+ end
17
+
18
+ # GET /post/items/1
19
+ # GET /post/items/1.json
20
+ def show
21
+ @command_item = command_post.items.find(params[:id])
22
+ @member_address_versions = PhcdevworksTutorials::CommandItemVersions.where(item_id: @command_item, item_type: 'PhcdevworksTutorials::Command::Item')
23
+ end
24
+
25
+ # GET /post/items/new
26
+ def new
27
+ @command_item = command_post.items.build
28
+ end
29
+
30
+ # GET /post/items/1/edit
31
+ def edit
32
+ @command_post = Command::Post.friendly.find(params[:post_id])
33
+ end
34
+
35
+ # POST /post/items
36
+ # POST /post/items.json
37
+ def create
38
+ @command_item = command_post.items.create(command_item_params)
39
+ @command_item.user_id = current_user.id
40
+ @command_item.org_id = current_user.org_id
41
+ respond_to do |format|
42
+ if @command_item.save
43
+ format.html { redirect_to command_post_items_path, :flash => { :success => 'Command Item has been Added' }}
44
+ format.json { render :show, status: :created, location: @command_item }
45
+ else
46
+ format.html { render :new }
47
+ format.json { render json: @command_item.errors, status: :unprocessable_entity }
48
+ end
49
+ end
50
+ end
51
+
52
+ # PATCH/PUT /post/items/1
53
+ # PATCH/PUT /post/items/1.json
54
+ def update
55
+ @command_post = Command::Post.friendly.find(params[:post_id])
56
+ respond_to do |format|
57
+ if @command_item.update(command_item_params)
58
+ format.html { redirect_to command_post_items_path, :flash => { :notice => 'Command Item has been Updated.' }}
59
+ format.json { render :show, status: :ok, location: @command_item }
60
+ else
61
+ format.html { render :edit }
62
+ format.json { render json: @command_item.errors, status: :unprocessable_entity }
63
+ end
64
+ end
65
+ end
66
+
67
+ # DELETE /post/items/1
68
+ # DELETE /post/items/1.json
69
+ def destroy
70
+ @command_item = command_post.items.find(params[:id])
71
+ @command_item.destroy
72
+ respond_to do |format|
73
+ format.html { redirect_to command_post_items_path, :flash => { :error => 'Command Item has been Removed' }}
74
+ format.json { head :no_content }
75
+ end
76
+ end
77
+
78
+ private
79
+
80
+ # Common Callbacks
81
+ def set_command_item
82
+ @command_item = Command::Item.find(params[:id])
83
+ end
84
+
85
+ def command_post
86
+ @command_post = Command::Post.friendly.find(params[:post_id])
87
+ end
88
+
89
+ # Whitelist
90
+ def command_item_params
91
+ params.require(:command_item).permit(:item_name, :item_description, :item_copy_command, :item_image, :slug, :user_id, :org_id)
92
+ end
93
+
94
+ end
95
+ end
@@ -0,0 +1,70 @@
1
+ require_dependency "phcdevworks_tutorials/application_controller"
2
+
3
+ module PhcdevworksTutorials
4
+ class Command::PostsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ #include PhcdevworksCore::PhcpluginsHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_paper_trail_whodunnit
10
+ before_action :set_command_post, only: [:show, :edit, :update, :destroy]
11
+
12
+ # GET /command/posts
13
+ def index
14
+ @command_posts = Command::Post.all
15
+ end
16
+
17
+ # GET /command/posts/1
18
+ def show
19
+ end
20
+
21
+ # GET /command/posts/new
22
+ def new
23
+ @command_post = Command::Post.new
24
+ end
25
+
26
+ # GET /command/posts/1/edit
27
+ def edit
28
+ end
29
+
30
+ # POST /command/posts
31
+ def create
32
+ @command_post = Command::Post.new(command_post_params)
33
+ @command_post.user_id = current_user.id
34
+ @command_post.org_id = current_user.org_id
35
+ if @command_post.save
36
+ redirect_to @command_post, notice: 'Post was successfully created.'
37
+ else
38
+ render :new
39
+ end
40
+ end
41
+
42
+ # PATCH/PUT /command/posts/1
43
+ def update
44
+ if @command_post.update(command_post_params)
45
+ redirect_to @command_post, notice: 'Post was successfully updated.'
46
+ else
47
+ render :edit
48
+ end
49
+ end
50
+
51
+ # DELETE /command/posts/1
52
+ def destroy
53
+ @command_post.destroy
54
+ redirect_to command_posts_url, notice: 'Post was successfully destroyed.'
55
+ end
56
+
57
+ private
58
+
59
+ # Common Callbacks
60
+ def set_command_post
61
+ @command_post = Command::Post.find(params[:id])
62
+ end
63
+
64
+ # Whitelist
65
+ def command_post_params
66
+ params.require(:command_post).permit(:post_title, :post_description, :post_status, :post_image, :slug, :user_id, :org_id)
67
+ end
68
+
69
+ end
70
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksTutorials
2
+ module Command::ItemsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksTutorials
2
+ module Command::PostsHelper
3
+ end
4
+ end
@@ -1,5 +1,5 @@
1
1
  module PhcdevworksTutorials
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
4
- end
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
5
  end
@@ -0,0 +1,16 @@
1
+ module PhcdevworksTutorials
2
+ class Command::Item < ApplicationRecord
3
+
4
+ # Paper Trail Initialize
5
+ has_paper_trail :class_name => 'PhcdevworksTutorials::CommandItemVersions'
6
+
7
+ # Image Upload
8
+ has_one_attached :item_image
9
+
10
+ # Relationships
11
+ belongs_to :post, class_name: "Command::Post"
12
+ has_many :categories, class_name: "Tutorial::Category", :through => :post
13
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
14
+
15
+ end
16
+ end
@@ -0,0 +1,33 @@
1
+ module PhcdevworksTutorials
2
+ class Command::Post < ApplicationRecord
3
+
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
7
+ # Paper Trail Initialize
8
+ has_paper_trail :class_name => 'PhcdevworksTutorials::CommandPostVersions'
9
+
10
+ # Image Upload
11
+ has_one_attached :post_image
12
+
13
+ # Relationships
14
+ has_and_belongs_to_many :categories, class_name: "Command::Category", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
15
+ has_many :items, class_name: "Command::Item"
16
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
17
+
18
+ # Form Fields Validation
19
+ validates :post_title,
20
+ presence: true
21
+
22
+ validates :post_description,
23
+ presence: true
24
+
25
+ # Clean URL Define
26
+ friendly_id :phcdev_command_post_nice_urls, use: [:slugged, :finders]
27
+
28
+ def phcdev_command_post_nice_urls
29
+ [:post_title]
30
+ end
31
+
32
+ end
33
+ end
@@ -0,0 +1,7 @@
1
+ module PhcdevworksTutorials
2
+ module Command
3
+ def self.table_name_prefix
4
+ 'phcdevworks_tutorials_command_'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksTutorials
2
+ class CommandItemVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_tutorials_command_items_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksTutorials
2
+ class CommandPostVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_tutorials_command_posts_versions
4
+ end
5
+ end
@@ -1,7 +1,7 @@
1
1
  module PhcdevworksTutorials
2
- module Tutorial
3
- def self.table_name_prefix
4
- 'phcdevworks_tutorials_tutorial_'
2
+ module Tutorial
3
+ def self.table_name_prefix
4
+ 'phcdevworks_tutorials_tutorial_'
5
+ end
5
6
  end
6
- end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  module PhcdevworksTutorials
2
- class TutorialCategoryVersions < PaperTrail::Version
3
- self.table_name = :phcdevworks_tutorials_tutorial_category_versions
4
- end
2
+ class TutorialCategoryVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_tutorials_tutorial_category_versions
4
+ end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module PhcdevworksTutorials
2
- class TutorialPostVersions < PaperTrail::Version
3
- self.table_name = :phcdevworks_tutorials_tutorial_post_versions
4
- end
2
+ class TutorialPostVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_tutorials_tutorial_post_versions
4
+ end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module PhcdevworksTutorials
2
- class TutorialStepVersions < PaperTrail::Version
3
- self.table_name = :phcdevworks_tutorials_tutorial_step_versions
4
- end
2
+ class TutorialStepVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_tutorials_tutorial_step_versions
4
+ end
5
5
  end
@@ -1,21 +1,24 @@
1
- <!-- Topbar - Navigation Header -->
1
+ <!-- -PHC- Topbar - Navigation Header -->
2
2
  <div class="navbar-header">
3
+
3
4
  <%= link_to phcdevworks_tutorials.tutorial_posts_path, class: "navbar-brand" do %>
4
5
  <strong>PHCDevworks</strong>Tutorial
5
6
  <% end %>
7
+
6
8
  <button type="button" class="navbar-toggle" data-click="sidebar-toggled">
7
9
  <span class="icon-bar"></span>
8
10
  <span class="icon-bar"></span>
9
11
  <span class="icon-bar"></span>
10
12
  </button>
11
- </div>
12
- <!-- Topbar - Navigation Header -->
13
13
 
14
- <!-- Topbar - Navigation Main -->
14
+ </div>
15
+ <!-- -PHC- Topbar - Navigation Header -->
16
+
17
+ <!-- -PHC- Topbar - Navigation Main -->
15
18
  <% if current_user %>
16
19
  <ul class="navbar-nav navbar-right">
17
20
 
18
- <!-- Topbar - Navigation Main - User Menu -->
21
+ <!-- -PHC- Topbar - Navigation Main - User Menu -->
19
22
  <li class="dropdown navbar-user">
20
23
  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
21
24
  <%= image_tag current_user.gravatar_url %>
@@ -30,8 +33,8 @@
30
33
  <% end %>
31
34
  </div>
32
35
  </li>
33
- <!-- Topbar - Navigation Main - User Menu -->
36
+ <!-- -PHC- Topbar - Navigation Main - User Menu -->
34
37
 
35
38
  </ul>
36
39
  <% end %>
37
- <!-- Topbar - Navigation Main -->
40
+ <!-- -PHC- Topbar - Navigation Main -->
@@ -1,7 +1,7 @@
1
- <!-- Sidebar for PHCDevworks Engines -->
1
+ <!-- -PHC- Sidebar for PHCDevworks Engines -->
2
2
  <div data-scrollbar="true" data-height="100%">
3
3
 
4
- <!-- Sidebar - User Profile Menu -->
4
+ <!-- -PHC- Sidebar - User Profile Menu -->
5
5
  <ul class="nav">
6
6
  <% if current_user %>
7
7
  <li class="nav-profile">
@@ -33,13 +33,13 @@
33
33
  </li>
34
34
  <% end %>
35
35
  </ul>
36
- <!-- Sidebar - User Profile Menu -->
36
+ <!-- -PHC- Sidebar - User Profile Menu -->
37
37
 
38
- <!-- Sidebar - Sidebar Navigation -->
38
+ <!-- -PHC- Sidebar - Sidebar Navigation -->
39
39
  <ul class="nav">
40
40
 
41
41
  <% if defined?phcdevworks_members %>
42
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Members -->
42
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
43
43
  <li class="nav-header">Membership Manager</li>
44
44
  <li class="has-sub">
45
45
  <a href="javascript:;">
@@ -64,11 +64,11 @@
64
64
  <li class="<%= phc_menu_active_controller("phcdevworks_members/directory/categories#new") %>"><%= link_to("New Directory Listing", phcdevworks_members.new_directory_category_path) %></li>
65
65
  </ul>
66
66
  </li>
67
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Members -->
67
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
68
68
  <% end %>
69
69
 
70
70
  <% if defined?phcdevworks_portfolio %>
71
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Press -->
71
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
72
72
  <li class="nav-header">Portfolio</li>
73
73
  <li class="has-sub">
74
74
  <a href="javascript:;">
@@ -103,11 +103,11 @@
103
103
  <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
104
104
  </ul>
105
105
  </li>
106
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Press -->
106
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
107
107
  <% end %>
108
108
 
109
109
  <% if defined?phcdevworks_press %>
110
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Press -->
110
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
111
111
  <li class="nav-header">Articles & Blogging</li>
112
112
  <li class="has-sub">
113
113
  <a href="javascript:;">
@@ -131,11 +131,11 @@
131
131
  <li class="<%= phc_menu_active_controller("phcdevworks_press/article/categories#new") %>"><%= link_to("New Category", phcdevworks_press.new_article_category_path) %></li>
132
132
  </ul>
133
133
  </li>
134
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Press -->
134
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
135
135
  <% end %>
136
136
 
137
137
  <% if defined?phcdevworks_scripts %>
138
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Scripts -->
138
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Scripts -->
139
139
  <li class="nav-header">Script CDN Listings</li>
140
140
  <li class="has-sub">
141
141
  <a href="javascript:;">
@@ -172,11 +172,11 @@
172
172
  <li class="<%= phc_menu_active_controller("phcdevworks_scripts/script/posts#new") %>"><%= link_to "New Snippet", phcdevworks_scripts.new_snippet_post_path %></li>
173
173
  </ul>
174
174
  </li>
175
- <!-- Sidebar - Sidebar Navigation - PHCDevworks Scripts -->
175
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Scripts -->
176
176
  <% end %>
177
177
 
178
178
  <% if defined?phcdevworks_real_estate %>
179
- <!-- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
179
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
180
180
  <li class="nav-header">Property Listings</li>
181
181
  <li class="has-sub">
182
182
  <a href="javascript:;">
@@ -200,11 +200,11 @@
200
200
  <li class="<%= phc_menu_active_controller("phcdevworks_real_estate/property/listings#new") %>"><%= link_to "New Features", phcdevworks_real_estate.new_property_feature_path %></li>
201
201
  </ul>
202
202
  </li>
203
- <!-- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
203
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
204
204
  <% end %>
205
205
 
206
206
  <% if defined?phcdevworks_tutorials %>
207
- <!-- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
207
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
208
208
  <li class="nav-header">Tutorial Posts</li>
209
209
  <li class="has-sub">
210
210
  <a href="javascript:;">
@@ -228,11 +228,23 @@
228
228
  <li class="<%= phc_menu_active_controller("phcdevworks_tutorials/tutorials/categories#new") %>"><%= link_to "New Category", phcdevworks_tutorials.new_tutorial_category_path %></li>
229
229
  </ul>
230
230
  </li>
231
- <!-- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
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 -->
232
244
  <% end %>
233
245
 
234
246
  <% if current_user && current_user.admin? %>
235
- <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
247
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
236
248
  <li class="nav-header">User Administration</li>
237
249
  <li class="has-sub">
238
250
  <a href="javascript:;">
@@ -244,11 +256,11 @@
244
256
  <li class="<%= phc_menu_active_controller("phcdevworks_accounts/admin/users") %>"><%= link_to "User List", phcdevworks_accounts.admin_users_index_path %></li>
245
257
  </ul>
246
258
  </li>
247
- <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
259
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
248
260
  <% end %>
249
261
 
250
262
  <% if current_user %>
251
- <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
263
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
252
264
  <li class="nav-header">Your Account</li>
253
265
  <li class="has-sub">
254
266
  <a href="javascript:;">
@@ -261,19 +273,19 @@
261
273
  <li class="<%= phc_menu_active_controller("phcdevworks_accounts/user/new") %>"><%= link_to "Logout", phcdevworks_accounts.destroy_user_session_path, method: :delete %></li>
262
274
  </ul>
263
275
  </li>
264
- <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
276
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
265
277
  <% end %>
266
278
 
267
- <!-- Sidebar - Sidebar Minifier -->
279
+ <!-- -PHC- Sidebar - Sidebar Minifier -->
268
280
  <li>
269
281
  <a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
270
282
  <i class="fa fa-angle-double-left"></i>
271
283
  </a>
272
284
  </li>
273
- <!-- Sidebar - Sidebar Minifier -->
285
+ <!-- -PHC- Sidebar - Sidebar Minifier -->
274
286
 
275
287
  </ul>
276
- <!-- Sidebar - Sidebar Navigation -->
288
+ <!-- -PHC- Sidebar - Sidebar Navigation -->
277
289
 
278
290
  </div>
279
- <!-- Sidebar for PHCDevworks Engines -->
291
+ <!-- -PHC- Sidebar for PHCDevworks Engines -->
@@ -0,0 +1,41 @@
1
+ <!-- Form - Command - Item -->
2
+ <%= form_with(model: [@command_post, @command_item], url: form_url, local: true) do |form| %>
3
+
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @command_item %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group">
10
+ <%= form.label :item_name, "Command Name" %>
11
+ <%= form.text_field :item_name, class: "form-control" %>
12
+ </div>
13
+
14
+ <div class="form-group">
15
+ <%= form.label :item_description, "Command Description" %>
16
+ <%= form.text_area :item_description, class: "form-control" %>
17
+ </div>
18
+
19
+ <div class="form-group">
20
+ <%= form.label :item_copy_command, "Copy Command" %>
21
+ <%= form.text_field :item_copy_command, class: "form-control" %>
22
+ </div>
23
+
24
+ <div class="form-group field_with_errors">
25
+ <%= form.label :item_image, "Featured Image" %>
26
+ <%= form.file_field :item_image, class: "form-control" %>
27
+ </div>
28
+
29
+ <% if form.object.item_image.attached? %>
30
+ <%= image_tag main_app.url_for(form.object.item_image), class: "img-responsive img-thumbnail" %>
31
+ <% end %>
32
+ <!-- Form Input Fields -->
33
+
34
+ <!-- Form Submition Button -->
35
+ <div class="actions">
36
+ <%= form.submit class: "btn btn-primary" %>
37
+ </div>
38
+ <!-- For Submition Button -->
39
+
40
+ <% end %>
41
+ <!-- Form - Command - Item -->