phcdevworks_tutorials 5.2.2 → 6.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf3ca8259dad7c576de8d197db3a981dfd8f8b5556fd1abf6686b68b1d5308f1
4
- data.tar.gz: e9aaaceeacd4d3e74fd33e1a63fa9fbe4a30ce140d723a420898681c5476c485
3
+ metadata.gz: 9b9bfff248b43f4a4da6be3d702999b70ef3a77d377ac32ad5e6042ae1cfd46a
4
+ data.tar.gz: d7d53769c47b922b44d85fc57253731f972874e8710a6922c18a5e48af8c7e79
5
5
  SHA512:
6
- metadata.gz: 9d7e7390704573f12cbf9fc920bff5541b1d5b4d87ba74cc5f9f6015d219d5d64a8cc67d4dfaf74cbab9b5103845b81b0f4893a6a248e2c5815fc509cafa095a
7
- data.tar.gz: 865422e278f89e83096a1c4c3b660bce6b9624ab16d644a37b09df631d57cafc350909c92f937d50a368dc4ba03498ad6dc66890406751315a4df3fb9cac194d
6
+ metadata.gz: f1e2a50e4406475d9bd918414ce11e6bb0106ea610ccadec3f615dadefa3385978c6100f51ba1975f25ef8e2bb529d2ebe4a66b5b920249aca0a5c3167e7f767
7
+ data.tar.gz: 0561fd595d0f95ca99805d51888f408088b25eda52c4256d3d75f44d1aa029113d47abf29a6870023f98f3d730df68a70e4450fccb0b8d5927cf5d77a0043fe5
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2019 BradPotts
1
+ Copyright 2010-2020 BradPotts - PHCDevworks
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -8,7 +8,8 @@ module PhcdevworksTutorials
8
8
 
9
9
  # INDEX
10
10
  def index
11
- @phcdevworks_tutorials_index = Tutorial::Post.where(post_status: "published")
11
+ @phcdevworks_tutorials_index = Tutorial::Post.where(post_status: "published").order("created_at DESC")
12
+ @phcdevworks_tutorials_photo_randomizer = Tutorial::Post.order('RANDOM()').limit(1)
12
13
  end
13
14
 
14
15
  # SHOW
@@ -64,8 +64,77 @@
64
64
  <!-- Page Container -->
65
65
 
66
66
  <!-- JavaScript -->
67
- <%= javascript_include_tag "phcdevworks_tutorials/application", "data-turbolinks-track": "reload" %>
67
+ <%= javascript_include_tag "phcdevworks_press/application", "data-turbolinks-track": "reload" %>
68
68
  <!-- JavaScript -->
69
69
 
70
+ <!-- JavaScript CKEditor -->
71
+ <script>ClassicEditor
72
+ .create( document.querySelector( '.editor' ), {
73
+ toolbar: {
74
+ items: [
75
+ 'heading',
76
+ '|',
77
+ 'fontBackgroundColor',
78
+ 'fontColor',
79
+ 'fontSize',
80
+ 'fontFamily',
81
+ '|',
82
+ 'removeFormat',
83
+ 'subscript',
84
+ 'superscript',
85
+ 'bold',
86
+ 'italic',
87
+ 'link',
88
+ '|',
89
+ 'todoList',
90
+ 'bulletedList',
91
+ 'numberedList',
92
+ '|',
93
+ 'alignment',
94
+ 'indent',
95
+ 'outdent',
96
+ '|',
97
+ 'blockQuote',
98
+ 'insertTable',
99
+ 'mediaEmbed',
100
+ 'undo',
101
+ 'redo',
102
+ '|',
103
+ 'codeBlock',
104
+ 'code',
105
+ 'MathType',
106
+ 'ChemType',
107
+ 'comment'
108
+ ]
109
+ },
110
+ language: 'en',
111
+ image: {
112
+ toolbar: [
113
+ 'imageTextAlternative',
114
+ 'imageStyle:full',
115
+ 'imageStyle:side'
116
+ ]
117
+ },
118
+ table: {
119
+ contentToolbar: [
120
+ 'tableColumn',
121
+ 'tableRow',
122
+ 'mergeTableCells'
123
+ ]
124
+ },
125
+ licenseKey: '',
126
+ sidebar: {
127
+ container: document.querySelector( '.sidebar' )
128
+ },
129
+ } )
130
+ .then( editor => {
131
+ window.editor = editor;
132
+ } )
133
+ .catch( error => {
134
+ console.error( error );
135
+ } );
136
+ </script>
137
+ <!-- JavaScript CKEditor -->
138
+
70
139
  </body>
71
140
  </html>
@@ -13,7 +13,8 @@
13
13
 
14
14
  <div class="form-group field_with_errors">
15
15
  <%= form.label :post_description, "Tutorial Description" %>
16
- <%= form.text_area :post_description, class: "form-control", rows: "10" %>
16
+ <%= form.text_area :post_description, class: "form-control", class: "editor", rows: "10" %>
17
+ <div id="word-count" class="mt-3"></div>
17
18
  </div>
18
19
 
19
20
  <div class="form-group field_with_errors">
@@ -13,17 +13,18 @@
13
13
 
14
14
  <div class="form-group field_with_errors">
15
15
  <%= form.label :step_title, placeholder: "Step Title" %>
16
- <%= form.text_field :step_title, class: "form-control", rows: "10" %>
16
+ <%= form.text_field :step_title, class: "form-control" %>
17
17
  </div>
18
18
 
19
19
  <div class="form-group field_with_errors">
20
20
  <%= form.label :step_description, "Step Text" %>
21
- <%= form.text_area :step_description, class: "form-control", rows: "10" %>
21
+ <%= form.text_area :step_description, class: "form-control", class: "editor", rows: "10" %>
22
+ <div id="word-count" class="mt-3"></div>
22
23
  </div>
23
24
 
24
25
  <div class="form-group field_with_errors">
25
26
  <%= form.label :step_copy_instruction, "Step Instructions (to Copy)" %>
26
- <%= form.text_area :step_copy_instruction, class: "form-control", rows: "10" %>
27
+ <%= form.text_area :step_copy_instruction, class: "form-control" %>
27
28
  </div>
28
29
 
29
30
  <div class="form-group field_with_errors">
@@ -3,7 +3,7 @@ class CreatePhcdevworksTutorialsTutorialPosts < ActiveRecord::Migration[6.0]
3
3
  create_table :phcdevworks_tutorials_tutorial_posts do |t|
4
4
 
5
5
  t.string :post_title
6
- t.string :post_description
6
+ t.text :post_description
7
7
  t.string :post_status
8
8
  t.string :post_image
9
9
 
@@ -4,7 +4,7 @@ class CreatePhcdevworksTutorialsTutorialSteps < ActiveRecord::Migration[6.0]
4
4
 
5
5
  t.string :step_number
6
6
  t.string :step_title
7
- t.string :step_description
7
+ t.text :step_description
8
8
  t.string :step_image
9
9
 
10
10
  t.string :slug
@@ -1,8 +1,10 @@
1
1
  class CreatePhcdevworksTutorialsCategoriesPosts < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  create_table :phcdevworks_tutorials_categories_posts do |t|
4
+
4
5
  t.integer :category_id
5
6
  t.integer :post_id
7
+
6
8
  end
7
9
  end
8
10
  end
@@ -1,7 +1,7 @@
1
1
  class AddCopyInstructionsToSteps < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
 
4
- add_column :phcdevworks_tutorials_tutorial_steps, :step_copy_instruction, :string
4
+ add_column :phcdevworks_tutorials_tutorial_steps, :step_copy_instruction, :text
5
5
 
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksTutorials
2
- VERSION = "5.2.2"
2
+ VERSION = "6.3.1"
3
3
  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: 5.2.2
4
+ version: 6.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-04 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '1.4'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 1.4.2
70
+ version: 1.4.7
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '1.4'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 1.4.2
80
+ version: 1.4.7
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: phcthemes_web_theme_pack
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '1.2'
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 1.2.9
90
+ version: 1.2.10
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
@@ -97,7 +97,7 @@ dependencies:
97
97
  version: '1.2'
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- version: 1.2.9
100
+ version: 1.2.10
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: phcdevworks_core
103
103
  requirement: !ruby/object:Gem::Requirement
@@ -351,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
351
  - !ruby/object:Gem::Version
352
352
  version: '0'
353
353
  requirements: []
354
- rubygems_version: 3.0.6
354
+ rubygems_version: 3.0.3
355
355
  signing_key:
356
356
  specification_version: 4
357
357
  summary: Rails 6 - Engine - Tutorials