phcdevworks_tutorials 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/layouts/phcdevworks_tutorials/application.html.erb +62 -77
  3. data/app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb +7 -7
  4. data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb +37 -37
  5. data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +257 -239
  6. data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +16 -14
  7. data/app/views/phcdevworks_tutorials/tutorial/categories/edit.html.erb +31 -23
  8. data/app/views/phcdevworks_tutorials/tutorial/categories/index.html.erb +63 -52
  9. data/app/views/phcdevworks_tutorials/tutorial/categories/new.html.erb +31 -23
  10. data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +46 -46
  11. data/app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb +31 -23
  12. data/app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb +68 -56
  13. data/app/views/phcdevworks_tutorials/tutorial/posts/new.html.erb +31 -23
  14. data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +36 -46
  15. data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +31 -23
  16. data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +57 -52
  17. data/app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb +31 -23
  18. data/config/routes.rb +26 -17
  19. data/lib/phcdevworks_tutorials/engine.rb +6 -8
  20. data/lib/phcdevworks_tutorials/version.rb +1 -1
  21. metadata +22 -11
  22. data/app/assets/stylesheets/scaffolds.scss +0 -65
  23. data/app/views/layouts/phcdevworks_tutorials/frontend.html.erb +0 -5
  24. data/config/initializers/friendly_id.rb +0 -107
@@ -1,39 +1,47 @@
1
- <!-- Title System -->
1
+ <!-- PHCTitleSEO Title Variables -->
2
2
  <% phc_title "Tutorial Post Manager" %>
3
3
  <% phc_title_tagline "Add a New Step" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
5
  <% phc_breadcrumb_two link_to "Tutorial Step Index", phcdevworks_tutorials.tutorial_post_steps_path %>
6
- <!-- Title System -->
6
+ <!-- PHCTitleSEO Title Variables -->
7
7
 
8
8
  <!-- Page Bradcrumbs -->
9
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>
10
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
12
  </ol>
13
13
  <!-- Page Bradcrumbs -->
14
14
 
15
15
  <!-- Page Header -->
16
- <h1 class="page-header"><%= yield(:phc_title) %></h1>
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
17
  <!-- Page Header -->
18
18
 
19
- <!-- Page & Panel Content -->
20
- <div class="panel panel-inverse">
21
- <!-- Panel Heading -->
22
- <div class="panel-heading">
23
- <div class="panel-heading-btn">
24
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
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
+ <!-- New Form -->
36
+ <%= render "form", { form_url: tutorial_post_steps_path } %>
37
+ <!-- New Form -->
38
+
39
+ </div>
40
+ <!-- Panel - Body -->
41
+
27
42
  </div>
28
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
- </div>
30
- <!-- Panel Heading -->
31
- <!-- Panel Body -->
32
- <div class="panel-body">
33
- <!-- Form to Edit Member Address -->
34
- <%= render "form", { form_url: tutorial_post_steps_path } %>
35
- <!-- Form to Edit Member Address -->
43
+ <!-- Panel -->
44
+
36
45
  </div>
37
- <!-- Panel Body -->
38
46
  </div>
39
- <!-- Page & Panel Content -->
47
+ <!-- Page Content -->
data/config/routes.rb CHANGED
@@ -1,27 +1,36 @@
1
1
  PhcdevworksTutorials::Engine.routes.draw do
2
2
 
3
- # Tutorial Routs
4
3
  namespace :tutorial do
5
- resources :posts, class_name: "PhcdevworksTutorials::Tutorial::Post" do
6
- resources :steps, class_name: "PhcdevworksTutorials::Tutorial::Step"
7
- end
8
- resources :categories, class_name: "PhcdevworksTutorials::Tutorial::Category"
4
+ resources :steps
9
5
  end
10
-
11
- # Frontend Routes
12
- namespace :blog do
13
- resources :tutorials, only: [:index, :show]
6
+ namespace :tutorial do
7
+ resources :posts
8
+ end
9
+ namespace :tutorial do
10
+ resources :categories
14
11
  end
12
+ # Tutorial Routs
13
+ namespace :tutorial do
14
+ resources :posts, class_name: "PhcdevworksTutorials::Tutorial::Post" do
15
+ resources :steps, class_name: "PhcdevworksTutorials::Tutorial::Step"
16
+ end
17
+ resources :categories, class_name: "PhcdevworksTutorials::Tutorial::Category"
18
+ end
15
19
 
16
- # API Routes
17
- namespace :api, :path => "", :constraints => {:subdomain => "tutorial_api"} do
18
- namespace :v1 do
19
- resources :posts, defaults: {format: "json"}
20
- resources :categories, defaults: {format: "json"}
20
+ # Frontend Routes
21
+ namespace :blog do
22
+ resources :tutorials, only: [:index, :show]
23
+ end
24
+
25
+ # API Routes
26
+ namespace :api, :path => "", :constraints => {:subdomain => "tutorial_api"} do
27
+ namespace :v1 do
28
+ resources :posts, defaults: {format: "json"}
29
+ resources :categories, defaults: {format: "json"}
30
+ end
21
31
  end
22
- end
23
32
 
24
- # Mount Routes
25
- mount PhcdevworksAccounts::Engine, :at => "/"
33
+ # Mount Routes
34
+ mount PhcdevworksAccounts::Engine, :at => "/"
26
35
 
27
36
  end
@@ -11,23 +11,21 @@ module PhcdevworksTutorials
11
11
  require "phcthemes_web_theme_pack"
12
12
 
13
13
  # Load Helper Dependencies
14
- # require "phcdevworks_core"
14
+ require "phcdevworks_core"
15
15
  require "phcdevworks_active_menus"
16
16
  require "phcdevworks_notifications"
17
17
  require "phcdevworks_titleseo"
18
18
 
19
+ # Load Upload Dependencies
20
+ require "aws-sdk-s3"
21
+ require "google-cloud-storage"
22
+ require "mini_magick"
23
+
19
24
  # Load User Accounts
20
25
  require "phcdevworks_accounts"
21
26
 
22
27
  # Engine Namespace
23
28
  isolate_namespace PhcdevworksTutorials
24
29
 
25
- # Load Requried Helper Files
26
- config.to_prepare do
27
- PhcdevworksActiveMenus::ApplicationController.helper(ApplicationHelper)
28
- PhcdevworksNotifications::ApplicationController.helper(ApplicationHelper)
29
- PhcdevworksTitleseo::ApplicationController.helper(ApplicationHelper)
30
- end
31
-
32
30
  end
33
31
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksTutorials
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
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: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-06 00:00:00.000000000 Z
11
+ date: 2019-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.1.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: phcdevworks_core
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.0.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.1
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: phcdevworks_active_menus
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +212,14 @@ dependencies:
198
212
  requirements:
199
213
  - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: 1.2.0
215
+ version: 1.3.0
202
216
  type: :runtime
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - "~>"
207
221
  - !ruby/object:Gem::Version
208
- version: 1.2.0
222
+ version: 1.3.0
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: sqlite3
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -220,9 +234,9 @@ dependencies:
220
234
  - - "~>"
221
235
  - !ruby/object:Gem::Version
222
236
  version: '1.4'
223
- description: Ruby on Rails 6 Tutorial engine to manage and post tutorials.
237
+ description: Ruby on Rails 6 Engine to Manage Online Tutorials.
224
238
  email:
225
- - developers@phcdevworks.com
239
+ - info@phcdevworks.com
226
240
  executables: []
227
241
  extensions: []
228
242
  extra_rdoc_files: []
@@ -241,7 +255,6 @@ files:
241
255
  - app/assets/stylesheets/phcdevworks_tutorials/tutorial/categories.scss
242
256
  - app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.scss
243
257
  - app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.scss
244
- - app/assets/stylesheets/scaffolds.scss
245
258
  - app/controllers/phcdevworks_tutorials/application_controller.rb
246
259
  - app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb
247
260
  - app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb
@@ -263,7 +276,6 @@ files:
263
276
  - app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb
264
277
  - app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb
265
278
  - app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb
266
- - app/views/layouts/phcdevworks_tutorials/frontend.html.erb
267
279
  - app/views/phcdevworks_tutorials/blog/tutorials/index.html.erb
268
280
  - app/views/phcdevworks_tutorials/blog/tutorials/show.html.erb
269
281
  - app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb
@@ -281,7 +293,6 @@ files:
281
293
  - app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb
282
294
  - app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb
283
295
  - app/views/phcdevworks_tutorials/tutorial/steps/show.html.erb
284
- - config/initializers/friendly_id.rb
285
296
  - config/routes.rb
286
297
  - db/migrate/20190911225813_create_phcdevworks_tutorials_tutorial_posts.rb
287
298
  - db/migrate/20190911225925_create_phcdevworks_tutorials_tutorial_categories.rb
@@ -310,8 +321,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
321
  - !ruby/object:Gem::Version
311
322
  version: '0'
312
323
  requirements: []
313
- rubygems_version: 3.0.4
324
+ rubygems_version: 3.0.6
314
325
  signing_key:
315
326
  specification_version: 4
316
- summary: Rails 6 Tut Engine
327
+ summary: Rails 6 - Engine - Tutorials
317
328
  test_files: []
@@ -1,65 +0,0 @@
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; }
@@ -1,5 +0,0 @@
1
- <!-- Page Content -->
2
- <div id="content" class="content">
3
- <%= yield %>
4
- </div>
5
- <!-- Page Content -->
@@ -1,107 +0,0 @@
1
- # FriendlyId Global Configuration
2
- #
3
- # Use this to set up shared configuration options for your entire application.
4
- # Any of the configuration options shown here can also be applied to single
5
- # models by passing arguments to the `friendly_id` class method or defining
6
- # methods in your model.
7
- #
8
- # To learn more, check out the guide:
9
- #
10
- # http://norman.github.io/friendly_id/file.Guide.html
11
-
12
- FriendlyId.defaults do |config|
13
- # ## Reserved Words
14
- #
15
- # Some words could conflict with Rails's routes when used as slugs, or are
16
- # undesirable to allow as slugs. Edit this list as needed for your app.
17
- config.use :reserved
18
-
19
- config.reserved_words = %w(new edit index session login logout users admin
20
- stylesheets assets javascripts images)
21
-
22
- # This adds an option to treat reserved words as conflicts rather than exceptions.
23
- # When there is no good candidate, a UUID will be appended, matching the existing
24
- # conflict behavior.
25
-
26
- # config.treat_reserved_as_conflict = true
27
-
28
- # ## Friendly Finders
29
- #
30
- # Uncomment this to use friendly finders in all models. By default, if
31
- # you wish to find a record by its friendly id, you must do:
32
- #
33
- # MyModel.friendly.find('foo')
34
- #
35
- # If you uncomment this, you can do:
36
- #
37
- # MyModel.find('foo')
38
- #
39
- # This is significantly more convenient but may not be appropriate for
40
- # all applications, so you must explicity opt-in to this behavior. You can
41
- # always also configure it on a per-model basis if you prefer.
42
- #
43
- # Something else to consider is that using the :finders addon boosts
44
- # performance because it will avoid Rails-internal code that makes runtime
45
- # calls to `Module.extend`.
46
- #
47
- # config.use :finders
48
- #
49
- # ## Slugs
50
- #
51
- # Most applications will use the :slugged module everywhere. If you wish
52
- # to do so, uncomment the following line.
53
- #
54
- # config.use :slugged
55
- #
56
- # By default, FriendlyId's :slugged addon expects the slug column to be named
57
- # 'slug', but you can change it if you wish.
58
- #
59
- # config.slug_column = 'slug'
60
- #
61
- # By default, slug has no size limit, but you can change it if you wish.
62
- #
63
- # config.slug_limit = 255
64
- #
65
- # When FriendlyId can not generate a unique ID from your base method, it appends
66
- # a UUID, separated by a single dash. You can configure the character used as the
67
- # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
68
- # with two dashes.
69
- #
70
- # config.sequence_separator = '-'
71
- #
72
- # Note that you must use the :slugged addon **prior** to the line which
73
- # configures the sequence separator, or else FriendlyId will raise an undefined
74
- # method error.
75
- #
76
- # ## Tips and Tricks
77
- #
78
- # ### Controlling when slugs are generated
79
- #
80
- # As of FriendlyId 5.0, new slugs are generated only when the slug field is
81
- # nil, but if you're using a column as your base method can change this
82
- # behavior by overriding the `should_generate_new_friendly_id?` method that
83
- # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
84
- # more like 4.0.
85
- # Note: Use(include) Slugged module in the config if using the anonymous module.
86
- # If you have `friendly_id :name, use: slugged` in the model, Slugged module
87
- # is included after the anonymous module defined in the initializer, so it
88
- # overrides the `should_generate_new_friendly_id?` method from the anonymous module.
89
- #
90
- # config.use :slugged
91
- # config.use Module.new {
92
- # def should_generate_new_friendly_id?
93
- # slug.blank? || <your_column_name_here>_changed?
94
- # end
95
- # }
96
- #
97
- # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
98
- # languages that don't use the Roman alphabet, that's not usually sufficient.
99
- # Here we use the Babosa library to transliterate Russian Cyrillic slugs to
100
- # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
101
- #
102
- # config.use Module.new {
103
- # def normalize_friendly_id(text)
104
- # text.to_slug.normalize! :transliterations => [:russian, :latin]
105
- # end
106
- # }
107
- end