phcdevworks_notifications 2.2.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +31 -26
- data/app/helpers/phcdevworks_notifications/application_helper.rb +21 -21
- data/app/views/phcdevworks_notifications/bootstrap/_notifications.html.erb +6 -12
- data/app/views/phcdevworks_notifications/bootstrap/_validations.html.erb +12 -14
- data/app/views/phcdevworks_notifications/custom/_notifications.html.erb +8 -8
- data/app/views/phcdevworks_notifications/metronic/_notifications.html.erb +15 -15
- data/app/views/phcdevworks_notifications/metronic/_validations.html.erb +18 -18
- data/lib/phcdevworks_notifications/engine.rb +0 -8
- data/lib/phcdevworks_notifications/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 804dba05f3a9fcbaffb5d482882107eeeeaa71725f9a1a68af37cad59632c1f1
|
4
|
+
data.tar.gz: 5b2f54af2c92e58e48fe84910ffb9eb421b14e0667388fca713fdd4b87dfd870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d38d724ba6a82383d361e1da86cb515a119dca8cd4a20cefec3569da550255bf0d8505aa4ff7b503fac04e8a355e8ea3f83498c9446f172fc6b8c7d981f775ee
|
7
|
+
data.tar.gz: 324ed845da1bca5323590aaf3a88bee2b288e38668c2b9ea110ef49336c70de259bf7fd48a7f42c8d29fd1378f870aefd9b4ae23324b3b38f51810bcbd6cdc17
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,26 +1,31 @@
|
|
1
|
-
### PHCDevworks Notifications for Rails
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
*
|
6
|
-
*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
+
[](https://badge.fury.io/rb/phcdevworks_notifications) [](https://github.com/phcdevworks/phcdevworks_notifications/actions/workflows/publish_gem_github_com.yml) [](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,6 @@
|
|
1
|
-
<% flash.each do |flash_type, phc_notification_msg| %>
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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="alert <%= phc_notification(flash_type) %> alert-dismissible fade show" role="alert" id="phcdevworks_notifi_alert">
|
3
|
+
<h5 class="text-center"><%= phc_notification_msg %></h5>
|
4
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
@@ -1,14 +1,12 @@
|
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
4
|
+
<h5 class="text-center">The form contains <%= pluralize(object.errors.count, "error") %>.</h5>
|
5
|
+
<ul class="list-group">
|
6
|
+
<% object.errors.full_messages.each do |phc_notification_msg| %>
|
7
|
+
<li class="list-group-item list-group-item-danger"><%= phc_notification_msg %></li>
|
8
|
+
<li class="list-group-item list-group-item-danger"></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -1,8 +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
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
</div>
|
8
|
-
<% end %>
|
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">×</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 %>
|
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:
|
4
|
+
version: 3.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:
|
11
|
+
date: 2022-03-13 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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,6 @@ homepage: https://phcdevworks.com/
|
|
90
90
|
licenses:
|
91
91
|
- MIT
|
92
92
|
metadata:
|
93
|
-
allowed_push_host: https://rubygems.org/
|
94
93
|
homepage_uri: https://phcdevworks.com/
|
95
94
|
source_code_uri: https://github.com/phcdevworks/phcdevworks_notifications
|
96
95
|
changelog_uri: https://github.com/phcdevworks/phcdevworks_notifications/releases
|
@@ -109,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
108
|
- !ruby/object:Gem::Version
|
110
109
|
version: '0'
|
111
110
|
requirements: []
|
112
|
-
rubygems_version: 3.0.3
|
111
|
+
rubygems_version: 3.0.3.1
|
113
112
|
signing_key:
|
114
113
|
specification_version: 4
|
115
114
|
summary: PHCDevworks - Helpers - Notifications
|