pugin 1.3.0 → 1.3.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: ee5060392d300c70657dc2111d57a21e75d53308
4
- data.tar.gz: 1d5df330f288a5790f2afc848e4809bbf3b86c9d
3
+ metadata.gz: 21155ec1b0d35348a4a36c06779930e029640a84
4
+ data.tar.gz: be85a1ffa2cc92346541f53a0916245c73212823
5
5
  SHA512:
6
- metadata.gz: 7794100c0263228cf90dc83f12f1546b622f8b0f9d60030ae704e395d46d44cba1c82ae8c3fe20e371620f9aded2c89716a9adfec240de21b43619ded2e95847
7
- data.tar.gz: 53a8a08abc44e1cce323c94070968564b54e79679e1dd4991b24245b2f7d98122752aacae7498c34fdeb2dca74c0a7a68e5fea011e4db99cf4f740496f9ec8e7
6
+ metadata.gz: 2be2a35269c81cb83f2fd9ae3c4506ebd9b60f09d86a238e787245a32ff81ebac0f96295a2b91fb0b4a90e372cab9f6c1898d26e3da0e53a607a0f74fc85a1fa
7
+ data.tar.gz: d1c8ad210131eed9374bed5736498fee411c0d1d5d4a8b40d3dd6d9eaf1e1faa38f7ca9093580ba82cd434a85d8c58f449b1e6a07feed05f010ea023d810776d
@@ -1,7 +1,7 @@
1
1
  %li
2
2
  .list--details
3
3
  - if committees.respond_to?(:name)
4
- %h2= link_to(committees.name, committees_show_path(committees.graph_id))
4
+ %h2= committees.name
5
5
  - else
6
- %h2= link_to(committees.formal_body.name, committees_show_path(committees.formal_body.graph_id))
6
+ %h2= committees.formal_body.name
7
7
  %p= "" ? committees.date_range : committees.formal_body.date_range
@@ -5,7 +5,7 @@
5
5
  - if @letters.empty? || !local_assigns[:all_path]
6
6
  %span= I18n.t('pugin.components.navigation-letter.all').capitalize
7
7
  - else
8
- = link_to "#{I18n.t('pugin.components.navigation-letter.all').upcase}", send(all_path)
8
+ = link_to "#{I18n.t('pugin.components.navigation-letter.all').capitalize}", send(all_path, local_assigns.fetch(:route_args, nil))
9
9
  - ('a'..'z').each do |letter|
10
10
  %li{ data: { letter: letter }, class: ('active' if (params[:letter] == letter)) }
11
11
  - if @letters.include?(letter.upcase)
@@ -0,0 +1,3 @@
1
+ .status--banner.theme--caution.cookie#cookie
2
+ .container
3
+ %p= t('.cookie_content', link: link_to(t('.about_cookies'), meta_cookie_policy_path())).html_safe
@@ -1,6 +1,8 @@
1
1
  .status--banner
2
2
  .container
3
3
  %p
4
+ %img{ class: "icon--inline", src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/icons/caution-circle-white.svg" }
5
+
4
6
  = I18n.t('pugin.components.status.status_text_1')
5
7
  %a{ href: 'http://www.smartsurvey.co.uk/s/ukparliament-beta-website-feedback/' }= I18n.t('pugin.components.status.give_feedback')
6
8
  = I18n.t('pugin.components.status.status_text_2')
@@ -0,0 +1,2 @@
1
+ :javascript
2
+ document.body.className = ((document.body.className) ? document.body.className + ' has-js' : 'has-js');
@@ -15,7 +15,9 @@
15
15
  / \==========================/
16
16
  - Pugin.alternates.each do |alternate|
17
17
  %link{rel: 'alternate', type: alternate[:type], href: alternate[:href]}
18
- %body.no-js
18
+ %body
19
+ = render partial: 'pugin/javascript/has_js'
20
+ = render partial: 'pugin/components/status-cookie'
19
21
  - if ENV['GTM_KEY']
20
22
  = render partial: 'pugin/javascript/google_tag_manager_noscript'
21
23
  = render partial: 'pugin/elements/skip-content'
@@ -34,6 +34,9 @@ en:
34
34
  item_2: "Lords"
35
35
  item_3: "Parties and groups"
36
36
  item_4: "Constituencies"
37
+ status-cookie:
38
+ cookie_content: 'Parliament.uk uses cookies to make the site simpler. %{link}.'
39
+ about_cookies: 'Find out more about cookies'
37
40
  people:
38
41
  list:
39
42
  member:
data/lib/pugin/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
@@ -19,6 +19,7 @@ describe 'pugin/components/_status.html.haml', type: :view do
19
19
  <div class='status--banner'>
20
20
  <div class='container'>
21
21
  <p>
22
+ <img class='icon--inline' src='https://s3-eu-west-1.amazonaws.com/web1live.pugin-website/1.6.3/icons/caution-circle-white.svg'>
22
23
  This is a test website, so may be inaccurate.
23
24
  <a href='http://www.smartsurvey.co.uk/s/ukparliament-beta-website-feedback/'>Give feedback</a>
24
25
  to help improve it.
@@ -44,6 +45,7 @@ DATA
44
45
  <div class='status--banner'>
45
46
  <div class='container'>
46
47
  <p>
48
+ <img class='icon--inline' src='https://s3-eu-west-1.amazonaws.com/web1live.pugin-website/1.6.3/icons/caution-circle-white.svg'>
47
49
  This is a test website, so may be inaccurate.
48
50
  <a href='http://www.smartsurvey.co.uk/s/ukparliament-beta-website-feedback/'>Give feedback</a>
49
51
  to help improve it.
@@ -72,6 +74,7 @@ DATA
72
74
  <div class='status--banner'>
73
75
  <div class='container'>
74
76
  <p>
77
+ <img class='icon--inline' src='https://s3-eu-west-1.amazonaws.com/web1live.pugin-website/1.6.3/icons/caution-circle-white.svg'>
75
78
  This is a test website, so may be inaccurate.
76
79
  <a href='http://www.smartsurvey.co.uk/s/ukparliament-beta-website-feedback/'>Give feedback</a>
77
80
  to help improve it.
@@ -102,6 +105,7 @@ DATA
102
105
  <div class='status--banner'>
103
106
  <div class='container'>
104
107
  <p>
108
+ <img class='icon--inline' src='https://s3-eu-west-1.amazonaws.com/web1live.pugin-website/1.6.3/icons/caution-circle-white.svg'>
105
109
  This is a test website, so may be inaccurate.
106
110
  <a href='http://www.smartsurvey.co.uk/s/ukparliament-beta-website-feedback/'>Give feedback</a>
107
111
  to help improve it.
@@ -20,6 +20,7 @@ describe 'pugin/layouts/_layout.html.haml', type: :view do
20
20
  allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
21
21
  allow(view).to receive(:find_your_constituency_path).and_return("/find-your-constituency")
22
22
  allow(view).to receive(:opensearch_description_url).and_return("http://localhost:3000/search/opensearch")
23
+ allow(view).to receive(:meta_cookie_policy_path).and_return("/meta/cookie-policy")
23
24
  end
24
25
 
25
26
  it 'renders HAML without errors' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rayner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -198,12 +198,14 @@ files:
198
198
  - app/views/pugin/components/_header.haml
199
199
  - app/views/pugin/components/_navigation-letter.haml
200
200
  - app/views/pugin/components/_navigation-main.haml
201
+ - app/views/pugin/components/_status-cookie.haml
201
202
  - app/views/pugin/components/_status.haml
202
203
  - app/views/pugin/constituencies/list/_list.html.haml
203
204
  - app/views/pugin/elements/_list.html.haml
204
205
  - app/views/pugin/elements/_skip-content.haml
205
206
  - app/views/pugin/javascript/_google_tag_manager.haml
206
207
  - app/views/pugin/javascript/_google_tag_manager_noscript.haml
208
+ - app/views/pugin/javascript/_has_js.haml
207
209
  - app/views/pugin/layouts/_layout.html.haml
208
210
  - app/views/pugin/layouts/pugin-sinatra.haml
209
211
  - app/views/pugin/layouts/pugin.html.erb