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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95b7c7ffca29aed314c1d58456122ea452868c1f
4
- data.tar.gz: 2bf37e634f6efaad0ada3339524da4faaf329c89
3
+ metadata.gz: 8124dca53528643f7dbdf6e5ae11d4968571f542
4
+ data.tar.gz: 266fbc854e1988c32c51c2801189107f409fae60
5
5
  SHA512:
6
- metadata.gz: d66f633e82d573a0c67f85405f6ba5472f0cfad1641f486ae1c5b603da18156d454e7f0ef32362af89161d998521355f0b7627529174d93f10d62e6a668d336d
7
- data.tar.gz: ee1250b150e5bc39cef7f49487c85001b7a42d20ebe64046c55aaee088ea6b07613af4cd87b326aa48318eed0884bb093b499f294ee659a1d53f4387030012c1
6
+ metadata.gz: 34ebd50d53ec6c03c4ad9e015fefdb430db82707e1f3c899d7a3ab948bab2141aad3528d844f80b07ea18b1932ad9deac8c2e28f18dba8811f314ae9d79d236a
7
+ data.tar.gz: df66829fc772a5623efb58886ee47a027c2b9983a155f8d12cd4323ce53d812751b28a9c7d3a02c92a038bf0905781b6588109b235549787e0e12c61aaa4598d
@@ -17,6 +17,7 @@ module UserNotif
17
17
  private
18
18
 
19
19
  def send_email(opts)
20
+ attachments = opts.delete(:attachments)
20
21
  mail(opts)
21
22
  end
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module UserNotif
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.11.1'
3
3
  end
@@ -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-10 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler