govuk_admin_template 4.4.2 → 5.0.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: 5b001638272059fb392e22f917167507d93bdd6f
4
- data.tar.gz: 06d2a2beb96487cc4fdc35c7fe01e097ed78b491
3
+ metadata.gz: 5c3e9e95ec03df5a4a7a15e6b66158f7f1b48c62
4
+ data.tar.gz: d254e3c347ba93f673340a1eb431cd20a44b3e9f
5
5
  SHA512:
6
- metadata.gz: ca2a85325585a860eb8efa6d8b9024e466ff684b27ca032fbbdfb92b7a3efa2f047c3a2eaeab6fbf90edbedd12f8165c08a8fafaa5b269173d78cd28a144d1bf
7
- data.tar.gz: 1869aaae180183e1ed71a5ca1c999785b1a4f51fbd23a29cfa361bc878c114498631836178c4317e43d7f0309297c15695213bb6cceeed27afc1435e3d6feab0
6
+ metadata.gz: 94ce51c82e1c44a01de7805046b6f4eb2a777546bd45ce0a355fb40006c137e1a9fe881aa94c770302044ce30b7c345d3510dc5f2091db4bf8de47a6c1777c74
7
+ data.tar.gz: 6955d3a991173e3a52005d38eab888cf487f5bae2cd6016b49a44be11198ef6ea9c511626b94965f2c5de120dd79e3f622cb3649d10c34551bf2ce9dae886c80
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 5.0.0
2
+
3
+ * Remove `exclude_analytics` content block from template. References to `exclude_analytics` should be removed and replaced with the following config flag.
4
+ * Add `disable_google_analytics` to config
5
+
1
6
  # 4.4.2
2
7
 
3
8
  * Modularize the table-filter markup
data/README.md CHANGED
@@ -98,6 +98,7 @@ GovukAdminTemplate.configure do |c|
98
98
  c.app_title = "My Publisher"
99
99
  c.show_flash = true
100
100
  c.show_signout = true
101
+ c.disable_google_analytics = false
101
102
  end
102
103
  ```
103
104
 
@@ -142,7 +143,6 @@ The gem [uses nested layouts](http://guides.rubyonrails.org/layouts_and_renderin
142
143
  `:body_start` (optional) | Just after the `<body>` tag
143
144
  `:body_end` (optional) | Just before the `</body>` tag
144
145
  `:full_width` (optional, boolean) | Expand content to edges of screen.
145
- `:exclude_analytics` (optional, boolean) | Don’t use the default Google Analytics snippet and profile.
146
146
  `:navbar` (optional) | Custom navbar content, overrides default navbar
147
147
 
148
148
  Example navbar_items:
@@ -4,6 +4,7 @@
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
6
  has_navbar_content = GovukAdminTemplate::Config.show_signout || content_for?(:navbar_right) || content_for?(:navbar_items)
7
+ disable_google_analytics = GovukAdminTemplate::Config.disable_google_analytics
7
8
  %>
8
9
  <!DOCTYPE html>
9
10
  <!--[if lte IE 7]><html class="no-js lte-ie7" lang="en"><![endif]-->
@@ -110,7 +111,7 @@
110
111
  </footer>
111
112
  </section>
112
113
  <%= yield :body_end %>
113
- <% unless content_for?(:exclude_analytics) %>
114
+ <% unless disable_google_analytics %>
114
115
  <% if Rails.env.production? %>
115
116
  <script class="analytics">
116
117
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -15,5 +15,9 @@ module GovukAdminTemplate
15
15
  # Show username and signout link in the top right corner
16
16
  # Default: false
17
17
  mattr_accessor :show_signout
18
+
19
+ # Disable analytics
20
+ # Default: false
21
+ mattr_accessor :disable_google_analytics
18
22
  end
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "4.4.2"
2
+ VERSION = "5.0.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.4.2
4
+ version: 5.0.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: 2016-11-08 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails