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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/phcdevworks_tutorials/command/items.coffee +3 -0
- data/app/assets/javascripts/phcdevworks_tutorials/command/posts.coffee +3 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/command/items.scss +3 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/command/posts.scss +3 -0
- data/app/assets/stylesheets/scaffolds.scss +65 -0
- data/app/controllers/phcdevworks_tutorials/command/items_controller.rb +95 -0
- data/app/controllers/phcdevworks_tutorials/command/posts_controller.rb +70 -0
- data/app/helpers/phcdevworks_tutorials/command/items_helper.rb +4 -0
- data/app/helpers/phcdevworks_tutorials/command/posts_helper.rb +4 -0
- data/app/models/phcdevworks_tutorials/application_record.rb +3 -3
- data/app/models/phcdevworks_tutorials/command/item.rb +16 -0
- data/app/models/phcdevworks_tutorials/command/post.rb +33 -0
- data/app/models/phcdevworks_tutorials/command.rb +7 -0
- data/app/models/phcdevworks_tutorials/command_item_versions.rb +5 -0
- data/app/models/phcdevworks_tutorials/command_post_versions.rb +5 -0
- data/app/models/phcdevworks_tutorials/tutorial.rb +4 -4
- data/app/models/phcdevworks_tutorials/tutorial_category_versions.rb +3 -3
- data/app/models/phcdevworks_tutorials/tutorial_post_versions.rb +3 -3
- data/app/models/phcdevworks_tutorials/tutorial_step_versions.rb +3 -3
- data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb +10 -7
- data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +36 -24
- data/app/views/phcdevworks_tutorials/command/items/_form.html.erb +41 -0
- data/app/views/phcdevworks_tutorials/command/items/edit.html.erb +47 -0
- data/app/views/phcdevworks_tutorials/command/items/index.html.erb +84 -0
- data/app/views/phcdevworks_tutorials/command/items/new.html.erb +47 -0
- data/app/views/phcdevworks_tutorials/command/items/show.html.erb +19 -0
- data/app/views/phcdevworks_tutorials/command/posts/_form.html.erb +41 -0
- data/app/views/phcdevworks_tutorials/command/posts/edit.html.erb +47 -0
- data/app/views/phcdevworks_tutorials/command/posts/index.html.erb +81 -0
- data/app/views/phcdevworks_tutorials/command/posts/new.html.erb +49 -0
- data/app/views/phcdevworks_tutorials/command/posts/show.html.erb +14 -0
- data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +5 -5
- data/app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/new.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/show.html.erb +2 -2
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +5 -5
- data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +1 -1
- data/config/routes.rb +25 -18
- data/db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb +11 -11
- data/db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb +12 -12
- data/db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb +8 -8
- data/db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb +5 -5
- data/db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb +11 -14
- data/db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb +11 -14
- data/db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb +11 -13
- data/db/migrate/20191110232654_add_copy_instructions_to_steps.rb +3 -5
- data/db/migrate/20200320110115_create_phcdevworks_tutorials_command_posts.rb +18 -0
- data/db/migrate/20200320110553_create_phcdevworks_tutorials_command_items.rb +20 -0
- data/db/migrate/20200321122525_create_phcdevworks_tutorials_command_items_versions.rb +16 -0
- data/db/migrate/20200321122606_create_phcdevworks_tutorials_command_posts_versions.rb +16 -0
- data/lib/phcdevworks_tutorials/engine.rb +26 -26
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +50 -22
@@ -0,0 +1,47 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Item Manager" %>
|
3
|
+
<% phc_title_tagline "Update Command Item" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Command Items Index", phcdevworks_tutorials.command_post_items_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', { form_url: command_post_item_path } %>
|
37
|
+
<!-- Edit Form -->
|
38
|
+
|
39
|
+
</div>
|
40
|
+
<!-- Panel - Body -->
|
41
|
+
|
42
|
+
</div>
|
43
|
+
<!-- Panel -->
|
44
|
+
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<!-- Page Content -->
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Item Manager" %>
|
3
|
+
<% phc_title_tagline "Command Item Index" %>
|
4
|
+
<% phc_breadcrumb_one link_to "Command List Index", phcdevworks_tutorials.command_posts_path %>
|
5
|
+
<% phc_breadcrumb_two "Command Items" %>
|
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>Item Name</th>
|
42
|
+
<th>Description</th>
|
43
|
+
<th>Command</th>
|
44
|
+
<th></th>
|
45
|
+
</tr>
|
46
|
+
</thead>
|
47
|
+
|
48
|
+
<tbody>
|
49
|
+
<% @command_items.each do |command_item| %>
|
50
|
+
<tr>
|
51
|
+
<td><%= command_item.item_name %></td>
|
52
|
+
<td><%= command_item.item_description %></td>
|
53
|
+
<td><%= command_item.item_copy_command %></td>
|
54
|
+
<td>
|
55
|
+
<div class="btn-group d-flex" role="group">
|
56
|
+
<%= link_to "Update Item", edit_command_post_item_path(command_item.post, command_item), class: "btn btn-primary btn-xs" %>
|
57
|
+
<%= link_to "Remove Item", command_post_item_path(command_item.post, command_item), method: :delete, data: { confirm: "Are you sure? This Action Cannot be Reversed." }, class: "btn btn-danger btn-xs" %>
|
58
|
+
</div>
|
59
|
+
</td>
|
60
|
+
</tr>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
</tbody>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- Index - Table -->
|
68
|
+
|
69
|
+
<!-- New Button -->
|
70
|
+
<%= link_to phcdevworks_tutorials.new_command_post_item_path, class: "btn btn-primary btn-sm" do %>
|
71
|
+
<i class="fad fa-plus-circle"></i>
|
72
|
+
Add a New Item to Command List
|
73
|
+
<% end %>
|
74
|
+
<!-- New Button -->
|
75
|
+
|
76
|
+
</div>
|
77
|
+
<!-- Panel - Body -->
|
78
|
+
|
79
|
+
</div>
|
80
|
+
<!-- Panel -->
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
<!-- Page Content -->
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Item Manager" %>
|
3
|
+
<% phc_title_tagline "Add a Command Item" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Command Items Index", phcdevworks_tutorials.command_post_items_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', { form_url: command_post_items_path } %>
|
37
|
+
<!-- Edit Form -->
|
38
|
+
|
39
|
+
</div>
|
40
|
+
<!-- Panel - Body -->
|
41
|
+
|
42
|
+
</div>
|
43
|
+
<!-- Panel -->
|
44
|
+
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<!-- Page Content -->
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Item name:</strong>
|
5
|
+
<%= @command_item.item_name %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>Item description:</strong>
|
10
|
+
<%= @command_item.item_description %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong>Item copy command:</strong>
|
15
|
+
<%= @command_item.item_copy_command %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<%= link_to 'Edit', edit_command_item_path(@command_item) %> |
|
19
|
+
<%= link_to 'Back', command_items_path %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<!-- Form - Command - Post -->
|
2
|
+
<%= form_with(model: command_post, local: true) do |form| %>
|
3
|
+
|
4
|
+
<!-- PHCNotifi Render Validation -->
|
5
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @command_post %>
|
6
|
+
<!-- PHCNotifi Render Validation -->
|
7
|
+
|
8
|
+
<!-- Form Input Fields -->
|
9
|
+
<div class="form-group">
|
10
|
+
<%= form.label :post_title, "Command List Title" %>
|
11
|
+
<%= form.text_field :post_title, class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group">
|
15
|
+
<%= form.label :post_description, "Command List Description" %>
|
16
|
+
<%= form.text_area :post_description, class: "form-control" %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="form-group">
|
20
|
+
<%= form.label :post_status, "Command List Status" %>
|
21
|
+
<%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="form-group">
|
25
|
+
<%= form.label :post_image, "Featured Image" %>
|
26
|
+
<%= form.file_field :post_image, class: "form-control" %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<% if form.object.post_image.attached? %>
|
30
|
+
<%= image_tag main_app.url_for(form.object.post_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 -->
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Lists Manager" %>
|
3
|
+
<% phc_title_tagline "Update Command List" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Command List Index", phcdevworks_tutorials.command_posts_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', command_post: @command_post %>
|
37
|
+
<!-- Edit Form -->
|
38
|
+
|
39
|
+
</div>
|
40
|
+
<!-- Panel - Body -->
|
41
|
+
|
42
|
+
</div>
|
43
|
+
<!-- Panel -->
|
44
|
+
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<!-- Page Content -->
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Lists Manager" %>
|
3
|
+
<% phc_title_tagline "Command List Index" %>
|
4
|
+
<% phc_breadcrumb_one "Home" %>
|
5
|
+
<% phc_breadcrumb_two link_to "Command List Index", phcdevworks_tutorials.command_posts_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>Post title</th>
|
42
|
+
<th>Post description</th>
|
43
|
+
<th colspan="3"></th>
|
44
|
+
</tr>
|
45
|
+
</thead>
|
46
|
+
|
47
|
+
<tbody>
|
48
|
+
<% @command_posts.each do |command_post| %>
|
49
|
+
<tr>
|
50
|
+
<td><%= command_post.post_title %></td>
|
51
|
+
<td><%= command_post.post_description %></td>
|
52
|
+
<td>
|
53
|
+
<div class="btn-group d-flex" role="group">
|
54
|
+
<%= link_to "List Details", command_post, class: "btn btn-purple btn-xs" %>
|
55
|
+
<%= link_to "Update List", edit_command_post_path(command_post), class: "btn btn-primary btn-xs" %>
|
56
|
+
<%= link_to "Remove List", command_post, method: :delete, data: { confirm: "Are you sure? This action cannot be reversed." }, class: "btn btn-danger btn-xs" %>
|
57
|
+
</div>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
<% end %>
|
61
|
+
</tbody>
|
62
|
+
</table>
|
63
|
+
</div>
|
64
|
+
<!-- Index - Table -->
|
65
|
+
|
66
|
+
<!-- New Button -->
|
67
|
+
<%= link_to phcdevworks_tutorials.new_command_post_path, class: "btn btn-primary btn-sm" do %>
|
68
|
+
<i class="fad fa-plus-circle"></i>
|
69
|
+
Add a New Command List
|
70
|
+
<% end %>
|
71
|
+
<!-- New Button -->
|
72
|
+
|
73
|
+
</div>
|
74
|
+
<!-- Panel - Body -->
|
75
|
+
|
76
|
+
</div>
|
77
|
+
<!-- Panel -->
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
<!-- Page Content -->
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Command Lists Manager" %>
|
3
|
+
<% phc_title_tagline "Update Command List" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Command List Index", phcdevworks_tutorials.command_posts_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', command_post: @command_post %>
|
37
|
+
<!-- Edit Form -->
|
38
|
+
|
39
|
+
</div>
|
40
|
+
<!-- Panel - Body -->
|
41
|
+
|
42
|
+
</div>
|
43
|
+
<!-- Panel -->
|
44
|
+
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<!-- Page Content -->
|
48
|
+
|
49
|
+
<%= link_to 'Back', command_posts_path %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Post title:</strong>
|
5
|
+
<%= @command_post.post_title %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>Post description:</strong>
|
10
|
+
<%= @command_post.post_description %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<%= link_to 'Edit', edit_command_post_path(@command_post) %> |
|
14
|
+
<%= link_to 'Back', command_posts_path %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
|
-
<div class="form-group
|
9
|
+
<div class="form-group">
|
10
10
|
<%= form.label :category_name, "Tutorial Category" %>
|
11
11
|
<%= form.text_field :category_name, placeholder: "Category Name", class: "form-control" %>
|
12
12
|
</div>
|
@@ -6,23 +6,23 @@
|
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
|
-
<div class="form-group
|
9
|
+
<div class="form-group">
|
10
10
|
<%= form.label :post_title, "Tutorial Title" %>
|
11
11
|
<%= form.text_field :post_title, placeholder: "Tutorial Title", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
|
-
<div class="form-group
|
14
|
+
<div class="form-group">
|
15
15
|
<%= form.label :post_description, "Tutorial Description" %>
|
16
16
|
<%= form.text_area :post_description, class: "form-control", class: "editor", rows: "10" %>
|
17
17
|
<div id="word-count" class="mt-3"></div>
|
18
18
|
</div>
|
19
19
|
|
20
|
-
<div class="form-group
|
20
|
+
<div class="form-group">
|
21
21
|
<%= form.label :post_status, "Tutorial Status" %>
|
22
22
|
<%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<div class="form-group
|
25
|
+
<div class="form-group">
|
26
26
|
<%= form.label :post_image, "Featured Image" %>
|
27
27
|
<%= form.file_field :post_image, class: "form-control" %>
|
28
28
|
</div>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
<%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
|
31
31
|
<% end %>
|
32
32
|
|
33
|
-
<div class="form-group
|
33
|
+
<div class="form-group">
|
34
34
|
<label>Select a Category</label>
|
35
35
|
<div class="panel-body">
|
36
36
|
<%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:category_name), :id, :category_name do |post_category| %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% phc_title "Tutorial Post Manager" %>
|
3
3
|
<% phc_title_tagline "Update Tutorial Information" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "
|
5
|
+
<% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %>
|
6
6
|
<!-- PHCTitleSEO Title Variables -->
|
7
7
|
|
8
8
|
<!-- Page Bradcrumbs -->
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% phc_title "Tutorial Post Manager" %>
|
3
3
|
<% phc_title_tagline "Add a New Tutorial" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "
|
5
|
+
<% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %>
|
6
6
|
<!-- PHCTitleSEO Title Variables -->
|
7
7
|
|
8
8
|
<!-- Page Bradcrumbs -->
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<!-- PHCTitleSEO Title Variables -->
|
2
2
|
<% phc_title "Tutorial Post Manager" %>
|
3
|
-
<% phc_title_tagline "Detailed Tutorial Information" %>
|
3
|
+
<% phc_title_tagline "Detailed Tutorial Information & Steps" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "
|
5
|
+
<% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %>
|
6
6
|
<!-- PHCTitleSEO Title Variables -->
|
7
7
|
|
8
8
|
<!-- Page Bradcrumbs -->
|
@@ -6,28 +6,28 @@
|
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
|
-
<div class="form-group
|
9
|
+
<div class="form-group">
|
10
10
|
<%= form.label :step_number, "Tutorial Step" %>
|
11
11
|
<%= form.select( :step_number, [["01","01"],["02","02"],["03","03"],["04","04"],["05","05"],["06","06"],["07","07"],["08","08"],["09","09"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"]], {}, {class: "form-control"}) %>
|
12
12
|
</div>
|
13
13
|
|
14
|
-
<div class="form-group
|
14
|
+
<div class="form-group">
|
15
15
|
<%= form.label :step_title, placeholder: "Step Title" %>
|
16
16
|
<%= form.text_field :step_title, class: "form-control" %>
|
17
17
|
</div>
|
18
18
|
|
19
|
-
<div class="form-group
|
19
|
+
<div class="form-group">
|
20
20
|
<%= form.label :step_description, "Step Text" %>
|
21
21
|
<%= form.text_area :step_description, class: "form-control", class: "editor", rows: "10" %>
|
22
22
|
<div id="word-count" class="mt-3"></div>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<div class="form-group
|
25
|
+
<div class="form-group">
|
26
26
|
<%= form.label :step_copy_instruction, "Step Instructions (to Copy)" %>
|
27
27
|
<%= form.text_area :step_copy_instruction, class: "form-control" %>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
<div class="form-group
|
30
|
+
<div class="form-group">
|
31
31
|
<%= form.label :step_image, "Step Image" %>
|
32
32
|
<%= form.file_field :step_image, class: "form-control" %>
|
33
33
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% phc_title "Tutorial Post Manager" %>
|
3
3
|
<% phc_title_tagline "Update Tutorial Step" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "Step Index", phcdevworks_tutorials.
|
5
|
+
<% phc_breadcrumb_two link_to "Tutorial Step Index", phcdevworks_tutorials.tutorial_post_steps_path %>
|
6
6
|
<!-- PHCTitleSEO Title Variables -->
|
7
7
|
|
8
8
|
<!-- Page Bradcrumbs -->
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% phc_title "Tutorial Post Manager" %>
|
3
3
|
<% phc_title_tagline "Tutorial Index" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title_tagline) %>
|
5
|
-
<% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.
|
5
|
+
<% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_posts_path %>
|
6
6
|
<!-- PHCTitleSEO Title Variables -->
|
7
7
|
|
8
8
|
<!-- Page Bradcrumbs -->
|
data/config/routes.rb
CHANGED
@@ -1,27 +1,34 @@
|
|
1
1
|
PhcdevworksTutorials::Engine.routes.draw do
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
# Tutorial Routes
|
4
|
+
namespace :tutorial do
|
5
|
+
resources :posts, class_name: "Tutorial::Post" do
|
6
|
+
resources :steps, class_name: "Tutorial::Step"
|
7
|
+
end
|
8
|
+
resources :categories, class_name: "Tutorial::Category"
|
7
9
|
end
|
8
|
-
resources :categories, class_name: "Tutorial::Category"
|
9
|
-
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
# Command Routes
|
12
|
+
namespace :command do
|
13
|
+
resources :posts, class_name: "Command::Post" do
|
14
|
+
resources :items, class_name: "Command::Item"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Frontend Routes
|
19
|
+
namespace :blog do
|
20
|
+
resources :tutorials, only: [:index, :show]
|
21
|
+
end
|
15
22
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
# API Routes
|
24
|
+
namespace :api, :path => "", :constraints => {:subdomain => "tutorial_api"} do
|
25
|
+
namespace :v1 do
|
26
|
+
resources :posts, defaults: {format: "json"}
|
27
|
+
resources :categories, defaults: {format: "json"}
|
28
|
+
end
|
21
29
|
end
|
22
|
-
end
|
23
30
|
|
24
|
-
|
25
|
-
|
31
|
+
# Mount Routes
|
32
|
+
mount PhcdevworksAccounts::Engine, :at => "/"
|
26
33
|
|
27
34
|
end
|
@@ -1,18 +1,18 @@
|
|
1
1
|
class CreatePhcdevworksTutorialsTutorialPosts < ActiveRecord::Migration[6.0]
|
2
|
-
|
3
|
-
|
2
|
+
def change
|
3
|
+
create_table :phcdevworks_tutorials_tutorial_posts do |t|
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
t.string :post_title
|
6
|
+
t.text :post_description
|
7
|
+
t.string :post_status
|
8
|
+
t.string :post_image
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
t.string :slug
|
11
|
+
t.string :user_id
|
12
|
+
t.string :org_id
|
13
13
|
|
14
|
-
|
14
|
+
t.timestamps
|
15
15
|
|
16
|
+
end
|
16
17
|
end
|
17
|
-
end
|
18
18
|
end
|