ama_layout 8.0.0 → 8.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e719b1f4c15f4797330387b87499a87ee792912
4
- data.tar.gz: 79c3e62574dffa1f18688ba0f9fb3f3b0dc2ec04
3
+ metadata.gz: e79c9015f7a449f6c55e302d676195a789b2ad48
4
+ data.tar.gz: bbde9f2fd9b4acede9286eec73c6a2cc20ad7739
5
5
  SHA512:
6
- metadata.gz: bdde9b2cc442ca9d1aabbe204feec3183b99ab80e13d397fb822bde49eb283b00fc85e2691be4bd56f272bb41cf636e3669ae06d8b589103d55d0ce0865bc475
7
- data.tar.gz: 9ce06e94a4886e2965637f6ba78ee8734811effffc934cd21a7d8d8a634b2356b7d161168f6c8b354f91e7c6b3000710ae5fb6fe711de03ebd64cab15bff8477
6
+ metadata.gz: cc5989669fbf6f11aa6f937325b4588f26692aee34598e7b82b32f47c602156f4e94e0beadb7c382d9d4347f365b2efdf1df55e26f9a92b00732c5ab2119a26a
7
+ data.tar.gz: e0ef2b04a87c87c55d45393e7cfce8af9d6c0bb0e2a1f94524860ed1b28665628d5f37fa0ed2f1691d5588975566310a0c4a6045994eaa9e8f9200720fc7071a
@@ -0,0 +1,4 @@
1
+ <a href="#" data-toggle="offCanvasRight" data-notifications-toggle>
2
+ <i class="fa fa-2x fa-bell notification__icon"></i>
3
+ <%= navigation.notification_badge %>
4
+ </a>
@@ -2,10 +2,7 @@
2
2
  <div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="large">
3
3
  <button class="menu-icon" type="button" data-toggle="offCanvasLeft"></button>
4
4
  <%= link_to(image_tag("ama-logo.png"), Rails.configuration.amaabca_site, class: "title-bar__logo") %>
5
- <a href="#" data-toggle="offCanvasRight" data-notifications-toggle>
6
- <i class="fa fa-2x fa-bell notification__icon"></i>
7
- <%= navigation.notification_badge %>
8
- </a>
5
+ <%= navigation.mobile_notification_icon %>
9
6
  </div>
10
7
  <div class="top-bar" id="main-menu">
11
8
  <div class="top-bar-left">
@@ -13,7 +10,7 @@
13
10
  </div>
14
11
  <div class="top-bar-right">
15
12
  <ul class="menu" data-responsive-menu="drilldown medium-dropdown">
16
- <%= navigation.notifications %>
13
+ <%= navigation.notification_icon %>
17
14
  <li>
18
15
  <a href="https://albertamotorassociation.zendesk.com/hc/en-us" target="_blank">Help</a>
19
16
  </li>
@@ -31,9 +31,15 @@ module AmaLayout
31
31
  h(view_data).render partial: "account_toggle"
32
32
  end
33
33
 
34
- def notifications
34
+ def notification_icon
35
35
  if user
36
- h.render 'ama_layout/notifications', notifications: user.notifications, navigation: self
36
+ h.render 'ama_layout/notification_icon', navigation: self
37
+ end
38
+ end
39
+
40
+ def mobile_notification_icon
41
+ if user
42
+ h.render 'ama_layout/mobile_notification_icon', navigation: self
37
43
  end
38
44
  end
39
45
 
@@ -1,3 +1,3 @@
1
1
  module AmaLayout
2
- VERSION = '8.0.0'
2
+ VERSION = '8.0.1'
3
3
  end
@@ -167,9 +167,15 @@ describe AmaLayout::NavigationDecorator do
167
167
  end
168
168
  end
169
169
 
170
- describe '#notifications' do
170
+ describe '#notification_icon' do
171
171
  it 'renders the content to the page' do
172
- expect(subject.notifications).to include("data-notifications-toggle")
172
+ expect(subject.notification_icon).to include('data-notifications-toggle')
173
+ end
174
+ end
175
+
176
+ describe '#mobile_notification_icon' do
177
+ it 'renders the content to the page' do
178
+ expect(subject.mobile_notification_icon).to include('fa-bell')
173
179
  end
174
180
  end
175
181
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ama_layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van den Beuken
@@ -18,7 +18,7 @@ authors:
18
18
  autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
- date: 2017-09-11 00:00:00.000000000 Z
21
+ date: 2017-10-05 00:00:00.000000000 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: foundation-rails
@@ -273,11 +273,12 @@ files:
273
273
  - app/views/ama_layout/_footer.html.erb
274
274
  - app/views/ama_layout/_main_nav_item.html.erb
275
275
  - app/views/ama_layout/_main_top_nav_item.html.erb
276
+ - app/views/ama_layout/_mobile_notification_icon.html.erb
276
277
  - app/views/ama_layout/_notice.html.erb
277
278
  - app/views/ama_layout/_notices.html.erb
278
279
  - app/views/ama_layout/_notification.html.erb
280
+ - app/views/ama_layout/_notification_icon.html.erb
279
281
  - app/views/ama_layout/_notification_sidebar.html.erb
280
- - app/views/ama_layout/_notifications.html.erb
281
282
  - app/views/ama_layout/_sidebar.html.erb
282
283
  - app/views/ama_layout/_sign_out_link.html.erb
283
284
  - app/views/ama_layout/_siteheader.html.erb