phcdevworks_tutorials 12.1.1 → 12.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +1 -0
  4. data/Rakefile +8 -8
  5. data/app/assets/config/phcdevworks_tutorials_manifest.js +3 -3
  6. data/app/assets/stylesheets/phcdevworks_tutorials/application.scss +0 -0
  7. data/app/assets/stylesheets/phcdevworks_tutorials/blog/commands.scss +3 -3
  8. data/app/assets/stylesheets/phcdevworks_tutorials/blog/tutorials.scss +3 -3
  9. data/app/assets/stylesheets/phcdevworks_tutorials/command/items.scss +3 -3
  10. data/app/assets/stylesheets/phcdevworks_tutorials/command/posts.scss +3 -3
  11. data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.css +4 -4
  12. data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.css +4 -4
  13. data/app/controllers/phcdevworks_tutorials/application_controller.rb +13 -13
  14. data/app/controllers/phcdevworks_tutorials/blog/commands_controller.rb +21 -21
  15. data/app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb +21 -21
  16. data/app/controllers/phcdevworks_tutorials/command/items_controller.rb +95 -95
  17. data/app/controllers/phcdevworks_tutorials/command/posts_controller.rb +81 -81
  18. data/app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb +81 -81
  19. data/app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb +89 -89
  20. data/app/helpers/phcdevworks_tutorials/application_helper.rb +4 -4
  21. data/app/helpers/phcdevworks_tutorials/blog/commands_helper.rb +4 -4
  22. data/app/helpers/phcdevworks_tutorials/blog/tutorials_helper.rb +4 -4
  23. data/app/helpers/phcdevworks_tutorials/command/items_helper.rb +4 -4
  24. data/app/helpers/phcdevworks_tutorials/command/posts_helper.rb +4 -4
  25. data/app/helpers/phcdevworks_tutorials/tutorial/posts_helper.rb +4 -4
  26. data/app/helpers/phcdevworks_tutorials/tutorial/steps_helper.rb +4 -4
  27. data/app/jobs/phcdevworks_tutorials/application_job.rb +4 -4
  28. data/app/mailers/phcdevworks_tutorials/application_mailer.rb +6 -6
  29. data/app/models/phcdevworks_tutorials/application_record.rb +5 -5
  30. data/app/models/phcdevworks_tutorials/command/item.rb +17 -17
  31. data/app/models/phcdevworks_tutorials/command/post.rb +34 -34
  32. data/app/models/phcdevworks_tutorials/command.rb +7 -7
  33. data/app/models/phcdevworks_tutorials/command_item_versions.rb +5 -5
  34. data/app/models/phcdevworks_tutorials/command_post_versions.rb +5 -5
  35. data/app/models/phcdevworks_tutorials/tutorial/post.rb +34 -34
  36. data/app/models/phcdevworks_tutorials/tutorial/step.rb +17 -17
  37. data/app/models/phcdevworks_tutorials/tutorial.rb +7 -7
  38. data/app/models/phcdevworks_tutorials/tutorial_post_versions.rb +5 -5
  39. data/app/models/phcdevworks_tutorials/tutorial_step_versions.rb +5 -5
  40. data/app/views/layouts/phcdevworks_tutorials/application.html.erb +131 -131
  41. data/app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb +0 -0
  42. data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb +0 -0
  43. data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +0 -0
  44. data/app/views/layouts/phcdevworks_tutorials/frontend.html.erb +0 -0
  45. data/app/views/phcdevworks_tutorials/blog/commands/index.html.erb +0 -0
  46. data/app/views/phcdevworks_tutorials/blog/commands/show.html.erb +0 -0
  47. data/app/views/phcdevworks_tutorials/blog/tutorials/index.html.erb +0 -0
  48. data/app/views/phcdevworks_tutorials/blog/tutorials/show.html.erb +0 -0
  49. data/app/views/phcdevworks_tutorials/command/items/_form.html.erb +42 -42
  50. data/app/views/phcdevworks_tutorials/command/items/edit.html.erb +47 -47
  51. data/app/views/phcdevworks_tutorials/command/items/index.html.erb +82 -82
  52. data/app/views/phcdevworks_tutorials/command/items/new.html.erb +47 -47
  53. data/app/views/phcdevworks_tutorials/command/items/show.html.erb +19 -19
  54. data/app/views/phcdevworks_tutorials/command/posts/_form.html.erb +56 -56
  55. data/app/views/phcdevworks_tutorials/command/posts/edit.html.erb +47 -47
  56. data/app/views/phcdevworks_tutorials/command/posts/index.html.erb +81 -81
  57. data/app/views/phcdevworks_tutorials/command/posts/new.html.erb +49 -49
  58. data/app/views/phcdevworks_tutorials/command/posts/show.html.erb +74 -74
  59. data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +56 -56
  60. data/app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb +47 -47
  61. data/app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb +85 -85
  62. data/app/views/phcdevworks_tutorials/tutorial/posts/new.html.erb +47 -47
  63. data/app/views/phcdevworks_tutorials/tutorial/posts/show.html.erb +76 -76
  64. data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +48 -48
  65. data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +47 -47
  66. data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +82 -82
  67. data/app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb +47 -47
  68. data/config/routes.rb +35 -35
  69. data/config/spring.rb +1 -1
  70. data/db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb +19 -19
  71. data/db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb +22 -22
  72. data/db/migrate/20191024232406_create_phcdevworks_tutorials_tutorial_categories_posts.rb +10 -10
  73. data/db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb +17 -17
  74. data/db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb +18 -18
  75. data/db/migrate/20200320110115_create_phcdevworks_tutorials_command_posts.rb +19 -19
  76. data/db/migrate/20200320110553_create_phcdevworks_tutorials_command_items.rb +19 -19
  77. data/db/migrate/20200321122525_create_phcdevworks_tutorials_command_item_versions.rb +18 -18
  78. data/db/migrate/20200321122606_create_phcdevworks_tutorials_command_post_versions.rb +18 -18
  79. data/db/migrate/20200328012248_create_phcdevworks_tutorials_command_categories_posts.rb +10 -10
  80. data/lib/phcdevworks_tutorials/engine.rb +47 -47
  81. data/lib/phcdevworks_tutorials/version.rb +3 -3
  82. data/lib/phcdevworks_tutorials.rb +6 -6
  83. data/lib/tasks/phcdevworks_tutorials_tasks.rake +4 -4
  84. metadata +33 -33
@@ -1,81 +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.command_post_title %></td>
51
- <td><%= truncate(command_post.command_post_text, :length => 80, :escape => false) %></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 -->
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.command_post_title %></td>
51
+ <td><%= truncate(command_post.command_post_text, :length => 80, :escape => false) %></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 -->
@@ -1,49 +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 %>
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 %>
@@ -1,74 +1,74 @@
1
- <!-- PHCTitleSEO Title Variables -->
2
- <% phc_title "Command Lists Manager" %>
3
- <% phc_title_tagline "Command List Details" %>
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>Command Item Title</th>
42
- <th>Command Item Description</th>
43
- </tr>
44
- </thead>
45
-
46
- <tbody>
47
- <% @command_post.items.order('command_item_title ASC').each do |command_item| %>
48
- <tr>
49
- <td><%= command_item.command_item_title %></td>
50
- <td><%= command_item.command_item_text %></td>
51
- </tr>
52
- <% end %>
53
- </tbody>
54
-
55
- </table>
56
- </div>
57
- <!-- Index - Table -->
58
-
59
- <!-- New Button -->
60
- <%= link_to phcdevworks_tutorials.command_post_items_path(@command_post), class: "btn btn-primary btn-sm" do %>
61
- <i class="fad fa-plus-circle"></i>
62
- Add or Update Command Items
63
- <% end %>
64
- <!-- New Button -->
65
-
66
- </div>
67
- <!-- Panel - Body -->
68
-
69
- </div>
70
- <!-- Panel -->
71
-
72
- </div>
73
- </div>
74
- <!-- Page Content -->
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "Command Lists Manager" %>
3
+ <% phc_title_tagline "Command List Details" %>
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>Command Item Title</th>
42
+ <th>Command Item Description</th>
43
+ </tr>
44
+ </thead>
45
+
46
+ <tbody>
47
+ <% @command_post.items.order('command_item_title ASC').each do |command_item| %>
48
+ <tr>
49
+ <td><%= command_item.command_item_title %></td>
50
+ <td><%= command_item.command_item_text %></td>
51
+ </tr>
52
+ <% end %>
53
+ </tbody>
54
+
55
+ </table>
56
+ </div>
57
+ <!-- Index - Table -->
58
+
59
+ <!-- New Button -->
60
+ <%= link_to phcdevworks_tutorials.command_post_items_path(@command_post), class: "btn btn-primary btn-sm" do %>
61
+ <i class="fad fa-plus-circle"></i>
62
+ Add or Update Command Items
63
+ <% end %>
64
+ <!-- New Button -->
65
+
66
+ </div>
67
+ <!-- Panel - Body -->
68
+
69
+ </div>
70
+ <!-- Panel -->
71
+
72
+ </div>
73
+ </div>
74
+ <!-- Page Content -->
@@ -1,56 +1,56 @@
1
- <!-- Form - Tutorial - Posts -->
2
- <%= form_with(model: tutorial_post, local: true) do |form| %>
3
-
4
- <!-- PHCNotifi Render Validation -->
5
- <%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_post %>
6
- <!-- PHCNotifi Render Validation -->
7
-
8
- <!-- Form Input Fields -->
9
- <div class="form-group">
10
- <%= form.label :tutorial_post_title, "Tutorial Title" %>
11
- <%= form.text_field :tutorial_post_title, placeholder: "Tutorial Title", class: "form-control" %>
12
- </div>
13
-
14
- <div class="form-group">
15
- <%= form.label :tutorial_post_text, "Tutorial Description" %>
16
- <%= form.text_area :tutorial_post_text, class: "form-control editor" %>
17
- <div id="word-count" class="mt-3"></div>
18
- </div>
19
-
20
- <div class="form-group">
21
- <%= form.label :tutorial_post_status, "Tutorial Status" %>
22
- <%= form.select( :tutorial_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
23
- </div>
24
-
25
- <div class="form-group">
26
- <%= form.label :tutorial_post_image, "Featured Image" %>
27
- <%= form.file_field :tutorial_post_image, class: "form-control" %>
28
- </div>
29
- <% if form.object.tutorial_post_image.attached? %>
30
- <%= image_tag main_app.url_for(form.object.tutorial_post_image), class: "img-responsive img-thumbnail" %>
31
- <% end %>
32
-
33
- <div class="form-group">
34
- <label>Select a Category</label>
35
- <div class="panel-body">
36
- <%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
37
- <%= post_category.check_box %>
38
- <%= post_category.label %><br>
39
- <% end %>
40
- </div>
41
- </div>
42
-
43
- <div class="form-group">
44
- <label>Attach SEO Data</label>
45
- <%= collection_select(:tutorial_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
46
- </div>
47
- <!-- Form Input Fields -->
48
-
49
- <!-- Form Submition Button -->
50
- <div class="actions">
51
- <%= form.submit class: "btn btn-primary" %>
52
- </div>
53
- <!-- For Submition Button -->
54
-
55
- <% end %>
56
- <!-- Form - Tutorial - Posts -->
1
+ <!-- Form - Tutorial - Posts -->
2
+ <%= form_with(model: tutorial_post, local: true) do |form| %>
3
+
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_post %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group">
10
+ <%= form.label :tutorial_post_title, "Tutorial Title" %>
11
+ <%= form.text_field :tutorial_post_title, placeholder: "Tutorial Title", class: "form-control" %>
12
+ </div>
13
+
14
+ <div class="form-group">
15
+ <%= form.label :tutorial_post_text, "Tutorial Description" %>
16
+ <%= form.text_area :tutorial_post_text, class: "form-control editor" %>
17
+ <div id="word-count" class="mt-3"></div>
18
+ </div>
19
+
20
+ <div class="form-group">
21
+ <%= form.label :tutorial_post_status, "Tutorial Status" %>
22
+ <%= form.select( :tutorial_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
23
+ </div>
24
+
25
+ <div class="form-group">
26
+ <%= form.label :tutorial_post_image, "Featured Image" %>
27
+ <%= form.file_field :tutorial_post_image, class: "form-control" %>
28
+ </div>
29
+ <% if form.object.tutorial_post_image.attached? %>
30
+ <%= image_tag main_app.url_for(form.object.tutorial_post_image), class: "img-responsive img-thumbnail" %>
31
+ <% end %>
32
+
33
+ <div class="form-group">
34
+ <label>Select a Category</label>
35
+ <div class="panel-body">
36
+ <%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
37
+ <%= post_category.check_box %>
38
+ <%= post_category.label %><br>
39
+ <% end %>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="form-group">
44
+ <label>Attach SEO Data</label>
45
+ <%= collection_select(:tutorial_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
46
+ </div>
47
+ <!-- Form Input Fields -->
48
+
49
+ <!-- Form Submition Button -->
50
+ <div class="actions">
51
+ <%= form.submit class: "btn btn-primary" %>
52
+ </div>
53
+ <!-- For Submition Button -->
54
+
55
+ <% end %>
56
+ <!-- Form - Tutorial - Posts -->
@@ -1,47 +1,47 @@
1
- <!-- PHCTitleSEO Title Variables -->
2
- <% phc_title "Tutorial Post Manager" %>
3
- <% phc_title_tagline "Update Tutorial Information" %>
4
- <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
- <% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_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", tutorial_post: @tutorial_post %>
37
- <!-- Edit Form -->
38
-
39
- </div>
40
- <!-- Panel - Body -->
41
-
42
- </div>
43
- <!-- Panel -->
44
-
45
- </div>
46
- </div>
47
- <!-- Page Content -->
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "Tutorial Post Manager" %>
3
+ <% phc_title_tagline "Update Tutorial Information" %>
4
+ <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
+ <% phc_breadcrumb_two link_to "Tutorial Index", phcdevworks_tutorials.tutorial_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", tutorial_post: @tutorial_post %>
37
+ <!-- Edit Form -->
38
+
39
+ </div>
40
+ <!-- Panel - Body -->
41
+
42
+ </div>
43
+ <!-- Panel -->
44
+
45
+ </div>
46
+ </div>
47
+ <!-- Page Content -->