phcdevworks_press 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/javascripts/phcdevworks_press/article/categories.coffee +0 -0
  4. data/app/assets/javascripts/phcdevworks_press/article/posts.coffee +0 -0
  5. data/app/assets/javascripts/phcdevworks_press/blog/articles.coffee +0 -0
  6. data/app/assets/stylesheets/phcdevworks_press/article/categories.scss +0 -0
  7. data/app/assets/stylesheets/phcdevworks_press/article/posts.scss +0 -0
  8. data/app/assets/stylesheets/phcdevworks_press/blog/articles.scss +0 -0
  9. data/app/views/layouts/phcdevworks_press/application.html.erb +79 -79
  10. data/app/views/layouts/phcdevworks_press/components/backend/footer/_footer.html.erb +7 -7
  11. data/app/views/layouts/phcdevworks_press/components/backend/navigation/_top_menu.html.erb +37 -37
  12. data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +257 -239
  13. data/app/views/phcdevworks_press/article/categories/_form.html.erb +14 -14
  14. data/app/views/phcdevworks_press/article/categories/edit.html.erb +27 -15
  15. data/app/views/phcdevworks_press/article/categories/index.html.erb +63 -47
  16. data/app/views/phcdevworks_press/article/categories/new.html.erb +28 -15
  17. data/app/views/phcdevworks_press/article/posts/_form.html.erb +71 -71
  18. data/app/views/phcdevworks_press/article/posts/edit.html.erb +6 -6
  19. data/app/views/phcdevworks_press/article/posts/index.html.erb +66 -51
  20. data/app/views/phcdevworks_press/article/posts/new.html.erb +5 -5
  21. data/app/views/phcdevworks_press/blog/articles/index.html.erb +56 -56
  22. data/lib/phcdevworks_press/engine.rb +8 -12
  23. data/lib/phcdevworks_press/version.rb +1 -1
  24. metadata +29 -13
  25. data/app/assets/stylesheets/phcdevworks_press/article/categories.css +0 -4
  26. data/app/assets/stylesheets/phcdevworks_press/article/posts.css +0 -4
  27. data/app/assets/stylesheets/phcdevworks_press/blog/articles.css +0 -4
  28. data/config/initializers/friendly_id.rb +0 -107
@@ -1,69 +1,69 @@
1
1
  <% @phcdevworks_cms_press_index.each do |blog_post_index| %>
2
- <div class="row blog-post">
3
- <div class="col-md-2 date-md">
4
- <div class="date-wrapper">
5
- <span class="date-m bg-primary"><%= blog_post_index.created_at.strftime("%B") %></span>
6
- <span class="date-d"><%= blog_post_index.created_at.strftime("%d") %></span>
7
- </div>
8
- <p class="text-muted text-sm">
9
- <i class="fas fa-user-tie text-xs"></i>
10
- <%= blog_post_index.user_id %>
11
- </p>
12
- </div>
13
- <div class="col-md-10">
14
- <div class="text-xs">
15
- <a href="#" class="text-primary text-uppercase">Blog</a> /
16
- <a href="#" class="text-dark text-uppercase">Post</a>
17
- </div>
18
- <h4 class="title media-heading">
19
- <%= blog_post_index.post_title %>
20
- </h4>
21
- <ul class="list-inline meta text-muted">
22
- <li class="list-inline-item">
23
- <i class="fas fa-calendar-alt text-xs"></i>
24
- <%= blog_post_index.created_at.strftime("%a %B %d %Y") %>
25
- </li>
26
- <li class="list-inline-item">
2
+ <div class="row blog-post">
3
+ <div class="col-md-2 date-md">
4
+ <div class="date-wrapper">
5
+ <span class="date-m bg-primary"><%= blog_post_index.created_at.strftime("%B") %></span>
6
+ <span class="date-d"><%= blog_post_index.created_at.strftime("%d") %></span>
7
+ </div>
8
+ <p class="text-muted text-sm">
27
9
  <i class="fas fa-user-tie text-xs"></i>
28
10
  <%= blog_post_index.user_id %>
29
- </li>
30
- </ul>
31
- <div class="row">
32
- <div class="col-md-12">
33
- <% if blog_post_index.pstimage.attached? %>
34
- <div class="blog-media">
35
- <img src="<%= url_for(blog_post_index.post_image) %>" alt="Picture for Blog Post - <%= blog_post_index.post_title %>" class="img-fluid" />
36
- </div>
37
- <% end %>
38
- </div>
11
+ </p>
39
12
  </div>
40
- <div class="row">
41
- <div class="col-md-12">
42
- <%= truncate(blog_post_index.post_text, :length => 120, :escape => false) %>
43
- <ul class="list-inline links">
44
- <li class="list-inline-item">
45
- <%= link_to blog_article_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
46
- <i class="fas fa-arrow-alt-circle-right"></i> Read More
47
- <% end %>
48
- </li>
49
- <li class="list-inline-item">
50
- <a href="blog-post.html#comments" class="btn btn-secondary btn-sm"><i class="fa fa-comment"></i> 64 Comments</a>
51
- </li>
52
- <% if current_user.admin! %>
13
+ <div class="col-md-10">
14
+ <div class="text-xs">
15
+ <a href="#" class="text-primary text-uppercase">Blog</a> /
16
+ <a href="#" class="text-dark text-uppercase">Post</a>
17
+ </div>
18
+ <h4 class="title media-heading">
19
+ <%= blog_post_index.post_title %>
20
+ </h4>
21
+ <ul class="list-inline meta text-muted">
22
+ <li class="list-inline-item">
23
+ <i class="fas fa-calendar-alt text-xs"></i>
24
+ <%= blog_post_index.created_at.strftime("%a %B %d %Y") %>
25
+ </li>
26
+ <li class="list-inline-item">
27
+ <i class="fas fa-user-tie text-xs"></i>
28
+ <%= blog_post_index.user_id %>
29
+ </li>
30
+ </ul>
31
+ <div class="row">
32
+ <div class="col-md-12">
33
+ <% if blog_post_index.pstimage.attached? %>
34
+ <div class="blog-media">
35
+ <img src="<%= url_for(blog_post_index.post_image) %>" alt="Picture for Blog Post - <%= blog_post_index.post_title %>" class="img-fluid" />
36
+ </div>
37
+ <% end %>
38
+ </div>
39
+ </div>
40
+ <div class="row">
41
+ <div class="col-md-12">
42
+ <%= truncate(blog_post_index.post_text, :length => 120, :escape => false) %>
43
+ <ul class="list-inline links">
53
44
  <li class="list-inline-item">
54
- <%= link_to edit_article_post_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
55
- <i class="fas fa-edit"></i> Edit Post
45
+ <%= link_to blog_article_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
46
+ <i class="fas fa-arrow-alt-circle-right"></i> Read More
56
47
  <% end %>
57
48
  </li>
58
49
  <li class="list-inline-item">
59
- <%= link_to blog_post_index, class: "btn btn-danger btn-sm", method: :delete, data: { confirm: 'Are you sure?' } do %>
60
- <i class="fas fa-dumpster"></i> Delete Post
61
- <% end %>
50
+ <a href="blog-post.html#comments" class="btn btn-secondary btn-sm"><i class="fa fa-comment"></i> 64 Comments</a>
62
51
  </li>
63
- <% end %>
64
- </ul>
52
+ <% if current_user.admin! %>
53
+ <li class="list-inline-item">
54
+ <%= link_to edit_article_post_path(blog_post_index), class: "btn btn-secondary btn-sm" do %>
55
+ <i class="fas fa-edit"></i> Edit Post
56
+ <% end %>
57
+ </li>
58
+ <li class="list-inline-item">
59
+ <%= link_to blog_post_index, class: "btn btn-danger btn-sm", method: :delete, data: { confirm: "Are you sure?" } do %>
60
+ <i class="fas fa-dumpster"></i> Delete Post
61
+ <% end %>
62
+ </li>
63
+ <% end %>
64
+ </ul>
65
+ </div>
65
66
  </div>
66
67
  </div>
67
68
  </div>
68
- </div>
69
69
  <% end %>
@@ -10,16 +10,19 @@ module PhcdevworksPress
10
10
  require "phcthemes_admin_panel_pack"
11
11
  require "phcthemes_web_theme_pack"
12
12
 
13
+ # Load Helper Dependencies
14
+ require "phcdevworks_core"
15
+ require "phcdevworks_active_menus"
16
+ require "phcdevworks_notifications"
17
+ require "phcdevworks_titleseo"
18
+
13
19
  # Load Upload Dependencies
14
20
  require "aws-sdk-s3"
15
21
  require "google-cloud-storage"
16
22
  require "mini_magick"
17
23
 
18
- # Load Helper Dependencies
19
- # require "phcdevworks_core"
20
- require "phcdevworks_active_menus"
21
- require "phcdevworks_notifications"
22
- require "phcdevworks_titleseo"
24
+ # Load User Accounts
25
+ require "phcdevworks_accounts"
23
26
 
24
27
  # Load User Accounts
25
28
  require "phcdevworks_accounts"
@@ -27,12 +30,5 @@ module PhcdevworksPress
27
30
  # Engine Namespace
28
31
  isolate_namespace PhcdevworksPress
29
32
 
30
- # Load Requried Helper Files
31
- config.to_prepare do
32
- PhcdevworksActiveMenus::ApplicationController.helper(ApplicationHelper)
33
- PhcdevworksNotifications::ApplicationController.helper(ApplicationHelper)
34
- PhcdevworksTitleseo::ApplicationController.helper(ApplicationHelper)
35
- end
36
-
37
33
  end
38
34
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksPress
2
- VERSION = '1.2.1'
2
+ VERSION = '1.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_press
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.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-02 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,10 +234,10 @@ dependencies:
220
234
  - - "~>"
221
235
  - !ruby/object:Gem::Version
222
236
  version: '1.4'
223
- description: Ruby on Rails 6 CMS engine to manage your Rails site's articles, categories
224
- and media.
237
+ description: Ruby on Rails 6 CMS Engine to Manage your Rails Site's Articles, Categories
238
+ and Medias.
225
239
  email:
226
- - developers@phcdevworks.com
240
+ - info@phcdevworks.com
227
241
  executables: []
228
242
  extensions: []
229
243
  extra_rdoc_files: []
@@ -233,10 +247,13 @@ files:
233
247
  - Rakefile
234
248
  - app/assets/config/phcdevworks_press_manifest.js
235
249
  - app/assets/javascripts/phcdevworks_press/application.js
250
+ - app/assets/javascripts/phcdevworks_press/article/categories.coffee
251
+ - app/assets/javascripts/phcdevworks_press/article/posts.coffee
252
+ - app/assets/javascripts/phcdevworks_press/blog/articles.coffee
236
253
  - app/assets/stylesheets/phcdevworks_press/application.scss
237
- - app/assets/stylesheets/phcdevworks_press/article/categories.css
238
- - app/assets/stylesheets/phcdevworks_press/article/posts.css
239
- - app/assets/stylesheets/phcdevworks_press/blog/articles.css
254
+ - app/assets/stylesheets/phcdevworks_press/article/categories.scss
255
+ - app/assets/stylesheets/phcdevworks_press/article/posts.scss
256
+ - app/assets/stylesheets/phcdevworks_press/blog/articles.scss
240
257
  - app/controllers/phcdevworks_press/application_controller.rb
241
258
  - app/controllers/phcdevworks_press/article/categories_controller.rb
242
259
  - app/controllers/phcdevworks_press/article/posts_controller.rb
@@ -268,7 +285,6 @@ files:
268
285
  - app/views/phcdevworks_press/article/posts/new.html.erb
269
286
  - app/views/phcdevworks_press/blog/articles/index.html.erb
270
287
  - app/views/phcdevworks_press/blog/articles/show.html.erb
271
- - config/initializers/friendly_id.rb
272
288
  - config/routes.rb
273
289
  - db/migrate/20170517064030_create_phcdevworks_press_post_versions.rb
274
290
  - db/migrate/20170517064427_create_phcdevworks_press_category_versions.rb
@@ -298,8 +314,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
314
  - !ruby/object:Gem::Version
299
315
  version: '0'
300
316
  requirements: []
301
- rubygems_version: 3.0.4
317
+ rubygems_version: 3.0.6
302
318
  signing_key:
303
319
  specification_version: 4
304
- summary: Rails 6 CMS Engine
320
+ summary: Rails 6 - Engine - CMS Press
305
321
  test_files: []
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -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