user_notif 0.1.11 → 0.1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/user_notif/notif_mailer.rb +1 -0
- data/lib/user_notif/version.rb +1 -1
- data/lib/user_notif/view_helpers.rb +5 -0
- data/vendor/assets/stylesheets/user_notif.scss +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8124dca53528643f7dbdf6e5ae11d4968571f542
|
4
|
+
data.tar.gz: 266fbc854e1988c32c51c2801189107f409fae60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34ebd50d53ec6c03c4ad9e015fefdb430db82707e1f3c899d7a3ab948bab2141aad3528d844f80b07ea18b1932ad9deac8c2e28f18dba8811f314ae9d79d236a
|
7
|
+
data.tar.gz: df66829fc772a5623efb58886ee47a027c2b9983a155f8d12cd4323ce53d812751b28a9c7d3a02c92a038bf0905781b6588109b235549787e0e12c61aaa4598d
|
data/lib/user_notif/version.rb
CHANGED
@@ -17,6 +17,11 @@ module UserNotif
|
|
17
17
|
render("notifs/#{small ? 'small' : 'full'}/#{notif.template_name}")
|
18
18
|
end
|
19
19
|
|
20
|
+
def notif_badge(notifs = nil)
|
21
|
+
nb = notifs.count
|
22
|
+
nb == 0 ? '' : "<span class=\"notif-badge\">#{nb}</span>".html_safe
|
23
|
+
end
|
24
|
+
|
20
25
|
private
|
21
26
|
|
22
27
|
def wrap(elem)
|
@@ -36,3 +36,19 @@
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
}
|
39
|
+
|
40
|
+
.notif-badge {
|
41
|
+
display: inline-block;
|
42
|
+
min-width: 10px;
|
43
|
+
padding: 3px 7px;
|
44
|
+
font-size: 12px;
|
45
|
+
font-weight: bold;
|
46
|
+
color: #fff;
|
47
|
+
line-height: 1;
|
48
|
+
vertical-align: middle;
|
49
|
+
white-space: nowrap;
|
50
|
+
text-align: center;
|
51
|
+
border-radius: 10px;
|
52
|
+
background-color: #e74c3c;
|
53
|
+
z-index: 10;
|
54
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_notif
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.11
|
4
|
+
version: 0.1.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terry Raimondo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|