phcdevworks_tutorials 6.1.0 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb +2 -1
- data/app/views/layouts/phcdevworks_tutorials/application.html.erb +16 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +2 -1
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +4 -3
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e44610ff850e5ee12394dbc031c792c1e6d2f6783ecb33e25cd76c8fa26ea93
|
4
|
+
data.tar.gz: 287e5bbe34757bd5aca3878fb6d98eef4cc97c34cf46492615dcd0864a166690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5510d78bcabad7342535b4641a25c986c9c47a99daecf274d5a1b65047bc26eb0607dcd076f38123347026a42c02efbeb11351ea7b8d572234b1ac40e637ddc4
|
7
|
+
data.tar.gz: b96c10f7738ffd30f2c02c2dbdd18aeb3e05b878fd1ca36cdd91c340f9c81aa1c46cf7d4f3adfc98d1de42c427f8f76e909327fe28c1941575f378b81deb80ba
|
@@ -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,23 @@
|
|
64
64
|
<!-- Page Container -->
|
65
65
|
|
66
66
|
<!-- JavaScript -->
|
67
|
-
<%= javascript_include_tag "
|
67
|
+
<%= javascript_include_tag "phcdevworks_press/application", "data-turbolinks-track": "reload" %>
|
68
68
|
<!-- JavaScript -->
|
69
69
|
|
70
|
+
<!-- JavaScript CKEditor -->
|
71
|
+
<script>
|
72
|
+
ClassicEditor.create( document.querySelector( '#editor' ) )
|
73
|
+
.then( editor => {
|
74
|
+
window.editor = editor;
|
75
|
+
const wordCountPlugin = editor.plugins.get( 'WordCount' );
|
76
|
+
const wordCountWrapper = document.getElementById( 'word-count' );
|
77
|
+
wordCountWrapper.appendChild( wordCountPlugin.wordCountContainer );
|
78
|
+
} )
|
79
|
+
.catch( err => {
|
80
|
+
console.error( err.stack );
|
81
|
+
} );
|
82
|
+
</script>
|
83
|
+
<!-- JavaScript CKEditor -->
|
84
|
+
|
70
85
|
</body>
|
71
86
|
</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", id: "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"
|
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", id: "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"
|
27
|
+
<%= form.text_area :step_copy_instruction, class: "form-control" %>
|
27
28
|
</div>
|
28
29
|
|
29
30
|
<div class="form-group field_with_errors">
|
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: 6.
|
4
|
+
version: 6.2.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-02-
|
11
|
+
date: 2020-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|