pugin 0.8.9 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/pugin/cards/_person-list.haml +17 -15
- data/app/views/pugin/people/list/lord/_lord.html.haml +2 -2
- data/app/views/pugin/people/list/member/_member.html.haml +2 -2
- data/lib/pugin.rb +1 -1
- data/lib/pugin/version.rb +1 -1
- data/spec/views/pugin/cards/_person-list.html.haml_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3db68c37f4262bf6e04956cd1c23e47ac91b2387
|
4
|
+
data.tar.gz: 848d39e9671fe898ee99d799ddd54732143ec720
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 685144adb0ae12ada1cadf6c6affbcd4a01cb0a97e2710938e9fd1874787de99a3cec6331cd80b27bf82f7e3cdbc709c16ee63a444a0cc6a1be462485dda76ff
|
7
|
+
data.tar.gz: 73a6089c5a412bee168455595bd912ab9a3179f4323a635043b844bbcfec924aaaf848ea464928688f37d1408287712163409ac4363dd29e96ba33e18fc62163
|
@@ -1,23 +1,25 @@
|
|
1
1
|
-if people.empty?
|
2
2
|
%ol.list--box
|
3
3
|
%li
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
.list--details
|
5
|
+
%p
|
6
|
+
= "#{I18n.t('no_content.empty_list.members.description')}"
|
7
|
+
= params[:letter].nil? ? "" : "#{I18n.t('no_content.empty_list.members.for')} '#{params[:letter].upcase}'"
|
7
8
|
-else
|
8
9
|
%ol.list--box
|
9
10
|
- people.each do |person|
|
10
11
|
- if person.respond_to?(:graph_id)
|
11
12
|
%li
|
12
|
-
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
23
|
-
|
13
|
+
.list--details
|
14
|
+
%h2
|
15
|
+
%a{:href => "/people/#{person.graph_id}"}= person.display_name
|
16
|
+
- if !person.statuses[:house_membership_status].empty? && !person.statuses[:house_membership_status].include?('Current MP')
|
17
|
+
%p= person.statuses[:house_membership_status].join(' and ')
|
18
|
+
- if !person.constituencies.empty?
|
19
|
+
- seat_incumbency = person.seat_incumbencies.select(&:current?).first
|
20
|
+
- unless seat_incumbency.nil?
|
21
|
+
%p= "#{I18n.t('pugin.cards.person-list.current_mp_for')} #{seat_incumbency.constituency.name}"
|
22
|
+
- if !person.parties.empty?
|
23
|
+
- party_membership = person.party_memberships.select(&:current?).first
|
24
|
+
- unless party_membership.nil?
|
25
|
+
%p= party_membership.party.name
|
@@ -2,9 +2,9 @@
|
|
2
2
|
- if Pugin::Feature::Bandiera.show_list_images?
|
3
3
|
%figure
|
4
4
|
- if lord.image_id != "placeholder"
|
5
|
-
%img{src: "#{ENV['IMAGE_SERVICE_URL']}/#{lord.image_id}.jpeg?crop=CU_1:1&width=186&quality=
|
5
|
+
%img{ src: "#{ENV['IMAGE_SERVICE_URL']}/#{lord.image_id}.jpeg?crop=CU_1:1&width=186&quality=80", alt: "#{lord.display_name}" }
|
6
6
|
- else
|
7
|
-
%img{src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/images/placeholder_members_image.png", alt: "placeholder"}
|
7
|
+
%img{ src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/images/placeholder_members_image.png", alt: "placeholder" }
|
8
8
|
|
9
9
|
.list--details
|
10
10
|
- if !instance_variable_get("@parliament").nil? # parliament lord
|
@@ -3,9 +3,9 @@
|
|
3
3
|
- if Pugin::Feature::Bandiera.show_list_images?
|
4
4
|
%figure
|
5
5
|
- if member.image_id != "placeholder"
|
6
|
-
%img{src: "#{ENV['IMAGE_SERVICE_URL']}/#{member.image_id}.jpeg?crop=CU_1:1&width=186&quality=
|
6
|
+
%img{ src: "#{ENV['IMAGE_SERVICE_URL']}/#{member.image_id}.jpeg?crop=CU_1:1&width=186&quality=80", alt: "#{member.display_name}" }
|
7
7
|
- else
|
8
|
-
%img{src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/images/placeholder_members_image.png", alt: "placeholder"}
|
8
|
+
%img{ src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/images/placeholder_members_image.png", alt: "placeholder" }
|
9
9
|
|
10
10
|
.list--details
|
11
11
|
- if !instance_variable_get("@parliament").nil? # parliament member
|
data/lib/pugin.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'pugin/version'
|
2
2
|
|
3
3
|
module Pugin
|
4
|
-
ASSET_VERSION = '1.5.
|
4
|
+
ASSET_VERSION = '1.5.4'.freeze
|
5
5
|
ASSET_LOCATION_URL = ENV.fetch('ASSET_LOCATION_URL', 'https://s3-eu-west-1.amazonaws.com/web1devci.pugin-website')
|
6
6
|
STATIC_ASSET_LOCATION_URL = ENV.fetch('STATIC_ASSET_LOCATION_URL', 'https://s3-eu-west-1.amazonaws.com/web1devci.static-assets')
|
7
7
|
class << self
|
data/lib/pugin/version.rb
CHANGED
@@ -56,11 +56,13 @@ describe 'pugin/cards/_person-list.html.haml', type: :view do
|
|
56
56
|
<<DATA
|
57
57
|
<ol class='list--box'>
|
58
58
|
<li>
|
59
|
+
<div class='list--details'>
|
59
60
|
<h2>
|
60
61
|
<a href='/people/123'>Jane Smith</a>
|
61
62
|
</h2>
|
62
63
|
<p>Current MP for Hackney</p>
|
63
64
|
<p>Labour</p>
|
65
|
+
</div>
|
64
66
|
</li>
|
65
67
|
</ol>
|
66
68
|
DATA
|
@@ -79,10 +81,12 @@ DATA
|
|
79
81
|
expect(response).to eq(<<DATA
|
80
82
|
<ol class='list--box'>
|
81
83
|
<li>
|
84
|
+
<div class='list--details'>
|
82
85
|
<p>
|
83
86
|
There are no results
|
84
87
|
|
85
88
|
</p>
|
89
|
+
</div>
|
86
90
|
</li>
|
87
91
|
</ol>
|
88
92
|
DATA
|
@@ -158,11 +162,13 @@ DATA
|
|
158
162
|
<<DATA
|
159
163
|
<ol class='list--box'>
|
160
164
|
<li>
|
165
|
+
<div class='list--details'>
|
161
166
|
<h2>
|
162
167
|
<a href='/people/123'></a>
|
163
168
|
</h2>
|
164
169
|
<p>Current MP for Hackney</p>
|
165
170
|
<p>Labour</p>
|
171
|
+
</div>
|
166
172
|
</li>
|
167
173
|
</ol>
|
168
174
|
DATA
|
@@ -204,10 +210,12 @@ DATA
|
|
204
210
|
<<DATA
|
205
211
|
<ol class='list--box'>
|
206
212
|
<li>
|
213
|
+
<div class='list--details'>
|
207
214
|
<h2>
|
208
215
|
<a href='/people/123'>Jane Smith</a>
|
209
216
|
</h2>
|
210
217
|
<p>Labour</p>
|
218
|
+
</div>
|
211
219
|
</li>
|
212
220
|
</ol>
|
213
221
|
DATA
|
@@ -248,10 +256,12 @@ DATA
|
|
248
256
|
<<DATA
|
249
257
|
<ol class='list--box'>
|
250
258
|
<li>
|
259
|
+
<div class='list--details'>
|
251
260
|
<h2>
|
252
261
|
<a href='/people/123'>Jane Smith</a>
|
253
262
|
</h2>
|
254
263
|
<p>Current MP for Hackney</p>
|
264
|
+
</div>
|
255
265
|
</li>
|
256
266
|
</ol>
|
257
267
|
DATA
|
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: 0.
|
4
|
+
version: 0.9.0
|
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-07-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|