phcdevworks_notifications 2.2.2 → 3.0.0

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: 7e339ec6c80531d005a625709e2d3cc8e19dfd3659670c69b92fe562dcb2f895
4
- data.tar.gz: 385964cff8f1ad9a6878b2594f03c33472488ba57da8932dfee7e2d6f320ca69
3
+ metadata.gz: 050534af49240652196e7c79021fb8b392b31899da3d1fa657299e049147a518
4
+ data.tar.gz: 79b1d967212c484518ec9634921af0fc9017c61af3cd7a6caa920148eee12398
5
5
  SHA512:
6
- metadata.gz: 10ee463ac8586ef3d2f2cce4aa6200e3a27a2b2467165c59e7f5ddd84f5d8e0d6666084c9d0f9dc544950de1abc1aeb8c2874a91504ebe4bf755690ed34aae75
7
- data.tar.gz: 0ccd5d389e8589da605ac9c389791a38a27697b19dee907fb30482c8857827464f56f2ed4a6c67db966cb38419af7a3ba64fdcd49be3670e37b3fae75cb79935
6
+ metadata.gz: d6d3ea87e3f0000abb8d87cecc60c4731d52d2c89ec14e612845e8560e7e0877e576f39ea26ea2762a9f812c96b84e10f33b110bf5974c9355076b792b8f5716
7
+ data.tar.gz: 68b28d192237056611ab108cda3b82e17054c1186f5dda76b0ec207703617852050ffeb10c3a59c8c2511df7f0ebfb3807c21a9f505c410cd567bef291f4fba9
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2021 BradPotts
1
+ Copyright 2022 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
data/README.md CHANGED
@@ -1,26 +1,31 @@
1
- ### PHCDevworks Notifications for Rails 6 (Form Validation & Notification Engine)
2
- PHCDevworks Notifications Rails 6 engine with helpers for alerts and form validation notifications.
3
-
4
- * Add alert and form validation helpers ruby on rails.
5
- * Setup in seconds with only one line of code in the application_helper file.
6
- * Save time and keep your rails projects manageable, tidy and secure.
7
-
8
- #### Step 1 - Add PHCDevworks Notifications to your gemfile
9
-
10
- gem 'phcdevworks_notifications'
11
- bundle install
12
-
13
- #### Step 2 - Load Helpers in the Application's Controller
14
- Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
15
-
16
- helper PhcdevworksNotifications::Engine.helpers
17
-
18
- #### How to Add Bootstrap 4 Notifications to Layouts
19
- Add the line of code below to your app/views/layouts/application.rb
20
-
21
- <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
22
-
23
- #### How to Add Bootstrap 4 Validations to your Form
24
- Add the line of code below to your _form.rb file. Change @example_object to the same one on your form.
25
-
26
- <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @example_object %>
1
+ ### PHCDevworks Notifications for Rails 7 (Form Validation & Notification Engine)
2
+
3
+ PHCDevworks Notifications Rails 7 engine with helpers for alerts and form validation notifications.
4
+
5
+ * Add alert and form validation helpers ruby on rails.
6
+ * Setup in seconds with only one line of code in the application_helper file.
7
+ * Save time and keep your rails projects manageable, tidy and secure.
8
+
9
+ #### Step 1 - Add PHCDevworks Notifications to your gemfile
10
+
11
+ gem 'phcdevworks_notifications'
12
+ bundle install
13
+
14
+ #### Step 2 - Load Helpers in the Application's Controller
15
+ Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
16
+
17
+ helper PhcdevworksNotifications::Engine.helpers
18
+
19
+ #### How to Add Bootstrap 4 Notifications to Layouts
20
+ Add the line of code below to your app/views/layouts/application.rb
21
+
22
+ <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
23
+
24
+ #### How to Add Bootstrap 4 Validations to your Form
25
+ Add the line of code below to your _form.rb file. Change @example_object to the same one on your form.
26
+
27
+ <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @example_object %>
28
+
29
+ ### Status
30
+
31
+ [![Gem Version](https://badge.fury.io/rb/phcdevworks_notifications.svg)](https://badge.fury.io/rb/phcdevworks_notifications) [![Publish to Github.com](https://github.com/phcdevworks/phcdevworks_notifications/actions/workflows/publish_gem_github_com.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_notifications/actions/workflows/publish_gem_github_com.yml) [![Publish to Rubygems.org](https://github.com/phcdevworks/phcdevworks_notifications/actions/workflows/publish_gem_rubygems_org.yml/badge.svg)](https://github.com/phcdevworks/phcdevworks_notifications/actions/workflows/publish_gem_rubygems_org.yml)
@@ -1,21 +1,21 @@
1
- module PhcdevworksNotifications
2
- module ApplicationHelper
3
-
4
- # PHCNotifi - Bootstrap Notification Helpers for Rails
5
- def phc_notification(flash_type)
6
- case flash_type
7
- when 'success'
8
- 'alert-success'
9
- when 'error'
10
- 'alert-danger'
11
- when 'alert'
12
- 'alert-warning'
13
- when 'notice'
14
- 'alert-info'
15
- else
16
- flash_type.to_s
17
- end
18
- end
19
-
20
- end
21
- end
1
+ module PhcdevworksNotifications
2
+ module ApplicationHelper
3
+
4
+ # PHCNotifi - Bootstrap Notification Helpers for Rails
5
+ def phc_notification(flash_type)
6
+ case flash_type
7
+ when 'success'
8
+ 'alert-success'
9
+ when 'error'
10
+ 'alert-danger'
11
+ when 'alert'
12
+ 'alert-warning'
13
+ when 'notice'
14
+ 'alert-info'
15
+ else
16
+ flash_type.to_s
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -1,12 +1,12 @@
1
- <% flash.each do |flash_type, phc_notification_msg| %>
2
- <div class="row">
3
- <div class="col-md-12">
4
- <div class="alert <%= phc_notification(flash_type) %> alert-dismissable fade show" role="alert">
5
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
6
- <span aria-hidden="true">&times;</span>
7
- </button>
8
- <h4 class="text-center"><%= phc_notification_msg %></h4>
9
- </div>
10
- </div>
11
- </div>
12
- <% end %>
1
+ <% flash.each do |flash_type, phc_notification_msg| %>
2
+ <div class="row">
3
+ <div class="col-md-12">
4
+ <div class="alert <%= phc_notification(flash_type) %> alert-dismissable fade show" role="alert" id="phcdevworks_notifi_alert">
5
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
6
+ <span aria-hidden="true">&times;</span>
7
+ </button>
8
+ <h4 class="text-center"><%= phc_notification_msg %></h4>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ <% end %>
@@ -1,14 +1,14 @@
1
- <% if object.errors.any? %>
2
- <div class="alert alert-danger alert-dismissable fade show" role="alert">
3
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
4
- <span aria-hidden="true">&times;</span>
5
- </button>
6
- <h4 class="text-center">The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
7
- <ul class="list-group">
8
- <% object.errors.full_messages.each do |phc_notification_msg| %>
9
- <li class="list-group-item list-group-item-danger borderless"><%= phc_notification_msg %></li>
10
- <li class="list-group-item list-group-item-danger "></li>
11
- <% end %>
12
- </ul>
13
- </div>
14
- <% end %>
1
+ <% if object.errors.any? %>
2
+ <div class="alert alert-danger alert-dismissable fade show" role="alert">
3
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
4
+ <span aria-hidden="true">&times;</span>
5
+ </button>
6
+ <h4 class="text-center">The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
7
+ <ul class="list-group">
8
+ <% object.errors.full_messages.each do |phc_notification_msg| %>
9
+ <li class="list-group-item list-group-item-danger borderless"><%= phc_notification_msg %></li>
10
+ <li class="list-group-item list-group-item-danger "></li>
11
+ <% end %>
12
+ </ul>
13
+ </div>
14
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% flash.each do |flash_type, phc_notification_msg| %>
2
+ <div class="alert <%= phc_notification(flash_type) %> alert-dismissable fade show" role="alert" id="phcdevworks_notifi_alert">
3
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
4
+ <span aria-hidden="true">&times;</span>
5
+ </button>
6
+ <h4 class="text-center"><%= phc_notification_msg %></h4>
7
+ </div>
8
+ <% end %>
@@ -1,15 +1,15 @@
1
- <% flash.each do |flash_type, phc_notification_msg| %>
2
- <div class="row">
3
- <div class="col-md-12">
4
- <div class="alert <%= phc_notification(flash_type) %> fade show" role="alert">
5
- <!-- <div class="alert-icon"><i class="flaticon-<%= phc_notification(flash_type) %>"></i></div> -->
6
- <div class="alert-text"><%= phc_notification_msg %></div>
7
- <div class="alert-close">
8
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
9
- <span aria-hidden="true"><i class="la la-close"></i></span>
10
- </button>
11
- </div>
12
- </div>
13
- </div>
14
- </div>
15
- <% end %>
1
+ <% flash.each do |flash_type, phc_notification_msg| %>
2
+ <div class="row">
3
+ <div class="col-md-12">
4
+ <div class="alert <%= phc_notification(flash_type) %> fade show" role="alert">
5
+ <!-- <div class="alert-icon"><i class="flaticon-<%= phc_notification(flash_type) %>"></i></div> -->
6
+ <div class="alert-text"><%= phc_notification_msg %></div>
7
+ <div class="alert-close">
8
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
9
+ <span aria-hidden="true"><i class="la la-close"></i></span>
10
+ </button>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ <% end %>
@@ -1,18 +1,18 @@
1
- <% if object.errors.any? %>
2
- <div class="alert alert-outline-danger fade show" role="alert">
3
- <div class="alert-text">
4
- <h4 class="alert-heading text-center">The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
5
- <br>
6
- <ul class="list-group">
7
- <% object.errors.full_messages.each do |phc_notification_msg| %>
8
- <li class="list-group-item"><%= phc_notification_msg %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <div class="alert-close">
13
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
14
- <span aria-hidden="true"><i class="la la-close"></i></span>
15
- </button>
16
- </div>
17
- </div>
18
- <% end %>
1
+ <% if object.errors.any? %>
2
+ <div class="alert alert-outline-danger fade show" role="alert">
3
+ <div class="alert-text">
4
+ <h4 class="alert-heading text-center">The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
5
+ <br>
6
+ <ul class="list-group">
7
+ <% object.errors.full_messages.each do |phc_notification_msg| %>
8
+ <li class="list-group-item"><%= phc_notification_msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <div class="alert-close">
13
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
14
+ <span aria-hidden="true"><i class="la la-close"></i></span>
15
+ </button>
16
+ </div>
17
+ </div>
18
+ <% end %>
@@ -1,12 +1,4 @@
1
1
  module PhcdevworksNotifications
2
2
  class Engine < ::Rails::Engine
3
-
4
- # Theme Dependencies
5
- require "phcthemes_admin_panel_pack"
6
- require "phcthemes_web_theme_pack"
7
-
8
- # Plugin Namespace
9
- isolate_namespace PhcdevworksNotifications
10
-
11
3
  end
12
4
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksNotifications
2
- VERSION = '2.2.2'
2
+ VERSION = "3.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-03 00:00:00.000000000 Z
11
+ date: 2022-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '7.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: phcthemes_admin_panel_pack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '5.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: '5.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: phcthemes_web_theme_pack
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
47
+ version: '5.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '4.0'
54
+ version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -79,6 +79,7 @@ files:
79
79
  - app/helpers/phcdevworks_notifications/application_helper.rb
80
80
  - app/views/phcdevworks_notifications/bootstrap/_notifications.html.erb
81
81
  - app/views/phcdevworks_notifications/bootstrap/_validations.html.erb
82
+ - app/views/phcdevworks_notifications/custom/_notifications.html.erb
82
83
  - app/views/phcdevworks_notifications/metronic/_notifications.html.erb
83
84
  - app/views/phcdevworks_notifications/metronic/_validations.html.erb
84
85
  - lib/phcdevworks_notifications.rb
@@ -89,7 +90,6 @@ homepage: https://phcdevworks.com/
89
90
  licenses:
90
91
  - MIT
91
92
  metadata:
92
- allowed_push_host: https://rubygems.org/
93
93
  homepage_uri: https://phcdevworks.com/
94
94
  source_code_uri: https://github.com/phcdevworks/phcdevworks_notifications
95
95
  changelog_uri: https://github.com/phcdevworks/phcdevworks_notifications/releases
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.0.3
111
+ rubygems_version: 3.0.3.1
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: PHCDevworks - Helpers - Notifications