slimmer 3.10.0 → 3.10.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.
@@ -17,6 +17,7 @@ module Slimmer::TestTemplate
17
17
  <script src="https://static.preview.alphagov.co.uk/static/browse.js" defer></script>
18
18
  <script src="https://static.preview.alphagov.co.uk/static/jquery.history.js" defer></script>
19
19
  <script src="https://static.preview.alphagov.co.uk/static/jquery.tabs.js" defer></script>
20
+ <script src="https://static.preview.alphagov.co.uk/static/libs/jquery/plugins/jquery.player.min.js" defer></script>
20
21
  </head>
21
22
  <body>
22
23
  <div class="header-context">
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '3.10.0'
2
+ VERSION = '3.10.1'
3
3
  end
@@ -1,51 +1,35 @@
1
- <!-- Whilst they are both in use, this and the copy in static should be kept in sync -->
2
- <% if artefact %>
1
+ <%# Whilst they are both in use, this and the test copy in slimmer should be kept in sync %>
2
+ <% if artefact and artefact.related_artefacts.any? %>
3
3
 
4
4
  <!-- related -->
5
5
  <div class="related-positioning">
6
6
  <div class="related-container">
7
7
 
8
- <div class="related">
8
+ <div class="related" id="related">
9
9
  <div class="inner group">
10
- <h2>More like this:</h2>
10
+ <h2>Other relevant links</h2>
11
11
  <nav role="navigation">
12
12
  <ul>
13
- <%# Content API style Artefact %>
14
- <% if artefact.respond_to?(:related_artefacts) %>
15
- <% artefact.related_artefacts.each do |item| %>
16
- <li>
17
- <a href="<%= h item.web_url %>"><%= h item.title %></a>
18
- </li>
19
- <% end %>
20
- <% if root_section = artefact.primary_root_section %>
21
- <li class="related-topic"><a href="<%= h root_section["content_with_tag"]["web_url"] %>"
22
- >More from the <span><%= h root_section["title"] %></span> category</a></li>
23
- <% end %>
24
- <% else %> <%# Panopticon API style Artefact (deprecated) %>
25
- <% if artefact["related_items"].any? %>
26
- <% artefact["related_items"].each do |item| %>
27
- <% if item["artefact"] %>
28
- <li class="<%= h item["artefact"]["kind"] %>">
29
- <a href="/<%= h item["artefact"]["slug"] %>"><%= h item["artefact"]["name"] %></a>
30
- </li>
31
- <% end %>
32
- <% end %>
33
- <% end %>
34
-
35
- <% if artefact["section"] and artefact["section"] != "" %>
36
- <% section, subsection = artefact["section"].split(':', 2) %>
37
- <li class="related-topic"><a href="/browse/<%= h section.parameterize %>"
38
- >More from the <span><%= h section %></span> category</a></li>
39
- <% end %>
13
+ <% artefact.related_artefacts.each do |item| %>
14
+ <li>
15
+ <a href="<%= h item.web_url %>"><%= h item.title %></a>
16
+ </li>
17
+ <% end %>
18
+ <% if root_section = artefact.primary_root_section %>
19
+ <li class="related-topic"><a href="<%= h root_section["content_with_tag"]["web_url"] %>"
20
+ >More from the <span><%= h root_section["title"] %></span> category</a></li>
40
21
  <% end %>
41
22
  </ul>
42
23
  </nav>
24
+ <nav role="navigation" class="return-to-top">
25
+ <a href="#content">Return to top &uarr;</a>
26
+ </nav>
43
27
  </div>
44
28
  <div id="legacy-sources">
45
- <p>Information from</p>
29
+ <p>This replaces</p>
46
30
  <ul>
47
31
  <li class="directgov">Directgov</li>
48
- <li class="businesslink">BusinessLink</li>
32
+ <li class="businesslink">Business Link</li>
49
33
  </ul>
50
34
  </div>
51
35
  </div>
@@ -29,7 +29,7 @@ class RelatedItemsInserterTest < MiniTest::Unit::TestCase
29
29
  }
30
30
 
31
31
  Slimmer::Processors::RelatedItemsInserter.new(@skin, @artefact).filter(source, template)
32
- assert_in template, "div.related h2", "More like this:"
32
+ assert_in template, "div.related h2", "Other relevant links"
33
33
  assert_in template, "div.related nav[role=navigation] ul li:nth-child(1) a[href='https://www.test.gov.uk/vat-rates']", "Vat rates"
34
34
  assert_in template, "div.related nav[role=navigation] ul li:nth-child(2) a[href='https://www.test.gov.uk/starting-to-import']", "Starting to import"
35
35
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 3.10.0
5
+ version: 3.10.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Griffiths
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2012-12-18 00:00:00 Z
14
+ date: 2013-01-29 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -243,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
243
  requirements:
244
244
  - - ">="
245
245
  - !ruby/object:Gem::Version
246
- hash: 3028966060044324322
246
+ hash: -4345242334148281785
247
247
  segments:
248
248
  - 0
249
249
  version: "0"
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  requirements:
253
253
  - - ">="
254
254
  - !ruby/object:Gem::Version
255
- hash: 3028966060044324322
255
+ hash: -4345242334148281785
256
256
  segments:
257
257
  - 0
258
258
  version: "0"