govuk_admin_template 4.0.1 → 4.1.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
  SHA1:
3
- metadata.gz: fc07f78ebdc940487819517f5781bd8d1e28a7e3
4
- data.tar.gz: 6203b0bf57823e429a6fad55c23ba4f133be7854
3
+ metadata.gz: 762f371d5f38516c40b9d5a90b374bca505e27c1
4
+ data.tar.gz: decb18fbbfe991351e3d2e8a14b98dcc829137b5
5
5
  SHA512:
6
- metadata.gz: 8d24b777a28d576b647e00d103a7e1f013446a180d24b0bf114e0d521d2d582df18311174c977000dd05741a46c4c9211ef54b59e8109c2f219dd67c2e7e4a8b
7
- data.tar.gz: 95cd4c335e2855936fb09a42a86faf99753715e999102ef66c0d25fce7ee603b0a168196d991031c0a5b33489c95d9eb743b45f911547af155e48ee350eaa285
6
+ metadata.gz: 109108a81a5020d986b173c237d2ec21dc76692bbe2b1a1263d04ec59a776f5ca627157e1d48b5e017dbc30254ab80f9afd67fc91071fbf80813a2db8268afee
7
+ data.tar.gz: c961a3af7df84425bd7f55b064481f909f081d2562478361bd06c47f8bfe3fb47f72b7ccc095425d65196c87bc2154d463eabb3df12fbdac2cfd6246cb7546dd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 4.1.0
2
+
3
+ * Allow a custom URL to be sent to Google Analytics using: `content_for :custom_pageview_fullpath, "/custom-path"`
4
+ * Fix: Move navbar logic into variable. Fixes a bug where the collapsed nav icon wouldn’t shown when there are no navbar items but there is a sign out link.
5
+
1
6
  # 4.0.1
2
7
 
3
8
  * Fix environment-label styles for integration #114
@@ -3,6 +3,7 @@
3
3
  environment_label = GovukAdminTemplate.environment_label
4
4
  app_home_path = content_for?(:app_home_path) ? yield(:app_home_path) : root_path
5
5
  app_title = content_for?(:app_title) ? yield(:app_title) : GovukAdminTemplate::Config.app_title
6
+ has_navbar_content = GovukAdminTemplate::Config.show_signout || content_for?(:navbar_right) || content_for?(:navbar_items)
6
7
  %>
7
8
  <!DOCTYPE html>
8
9
  <!--[if lte IE 7]><html class="no-js lte-ie7" lang="en"><![endif]-->
@@ -51,7 +52,7 @@
51
52
  add-bottom-margin" role="banner">
52
53
  <div class="<%= content_for?(:full_width) ? 'container-fluid' : 'container' %>">
53
54
  <div class="navbar-header">
54
- <% if content_for?(:navbar_right) || content_for?(:navbar_items) %>
55
+ <% if has_navbar_content %>
55
56
  <%# Bootstrap toggle for collapsed navbar content, used at smaller widths %>
56
57
  <a class="navbar-toggle" data-toggle="collapse" data-target="header .navbar-collapse">
57
58
  <span class="sr-only">Toggle navigation</span>
@@ -67,7 +68,7 @@
67
68
  </div>
68
69
  <% end %>
69
70
  </div>
70
- <% if GovukAdminTemplate::Config.show_signout || content_for?(:navbar_right) || content_for?(:navbar_items) %>
71
+ <% if has_navbar_content %>
71
72
  <nav role="navigation" class="collapse navbar-collapse">
72
73
  <% if content_for?(:navbar_items) %>
73
74
  <ul class="nav navbar-nav">
@@ -119,7 +120,11 @@
119
120
 
120
121
  ga('create', 'UA-26179049-6', '<%= ENV.fetch('GOVUK_APP_DOMAIN') %>');
121
122
  ga('set', 'anonymizeIp', true);
122
- ga('send', 'pageview');
123
+ <% if content_for?(:custom_pageview_fullpath) %>
124
+ GOVUKAdmin.trackPageview('<%= content_for(:custom_pageview_fullpath) %>');
125
+ <% else %>
126
+ ga('send', 'pageview');
127
+ <% end %>
123
128
  </script>
124
129
  <% elsif Rails.env.development? %>
125
130
  <script>
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "4.0.1"
2
+ VERSION = "4.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-31 00:00:00.000000000 Z
11
+ date: 2016-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.3.5
33
+ version: 3.3.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: 3.3.5
40
+ version: 3.3.5.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement