Skip to content

Commit

Permalink
Merge pull request #31 from guidance-guarantee-programme/web-variant
Browse files Browse the repository at this point in the history
Templates for rendering a digital summary document
  • Loading branch information
benbarnett committed Apr 15, 2016
2 parents e82915f + 623aa93 commit af6d8af
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 64 deletions.
118 changes: 65 additions & 53 deletions assets/markup/generic_guidance.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,25 @@

<hr>

<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<% if appointment_50_54? %>
<li>Have I agreed a retirement age with you? What is it?</li>
<li>Will I pay extra fees if I leave my pot untouched when I reach my selected retirement age?</li>
<% else %>
<li>Do I have to take the money by a certain date?</li>
<li>What are the fees for continuing to leave my pot untouched?</li>
<% end %>
<li>How much is the pot likely to grow or go down each year?</li>
<li>How is the money invested and can I change this if I want?</li>
<li>How much can I still pay in?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
<li>Do you have up-to-date details of who I want to leave my pot to (my ‘beneficiary’) when I die?</li>
</ul>
<div class="next-steps next-steps--leave-pot-untouched">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<% if appointment_50_54? %>
<li>Have I agreed a retirement age with you? What is it?</li>
<li>Will I pay extra fees if I leave my pot untouched when I reach my selected retirement age?</li>
<% else %>
<li>Do I have to take the money by a certain date?</li>
<li>What are the fees for continuing to leave my pot untouched?</li>
<% end %>
<li>How much is the pot likely to grow or go down each year?</li>
<li>How is the money invested and can I change this if I want?</li>
<li>How much can I still pay in?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
<li>Do you have up-to-date details of who I want to leave my pot to (my ‘beneficiary’) when I die?</li>
</ul>
</div>

<h4 class="icon icon--website downshift">Go to our website for more guidance on:</h4>

Expand Down Expand Up @@ -65,14 +67,16 @@

<hr>

<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>
<div class="next-steps next-steps--guaranteed-income">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
<li>Do I qualify for an enhanced or impaired annuity? You’ll need to tell your provider if you smoke or have a medical condition</li>
<li>Which types of annuity do you offer?</li>
</ul>
<ul class="list list--questions">
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
<li>Do I qualify for an enhanced or impaired annuity? You’ll need to tell your provider if you smoke or have a medical condition</li>
<li>Which types of annuity do you offer?</li>
</ul>
</div>

<% if standard_text? %>
<div class="page-break"></div>
Expand Down Expand Up @@ -110,16 +114,18 @@

<hr>

<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Do you offer flexi-access drawdown?</li>
<li>Will I have to pay any fees, eg each time I take a payment?</li>
<li>How much could my pot grow or go down?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
</ul>
<div class="next-steps next-steps--adjustable-income">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Do you offer flexi-access drawdown?</li>
<li>Will I have to pay any fees, eg each time I take a payment?</li>
<li>How much could my pot grow or go down?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
</ul>
</div>

<% unless large_text? %>
<div class="page-break"></div>
Expand Down Expand Up @@ -155,14 +161,16 @@

<hr>

<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>
<div class="next-steps next-steps--take-cash-in-chunks">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Do you offer ‘Uncrystallised Funds Pension Lump Sum’ (UFPLS)?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
</ul>
<ul class="list list--questions">
<li>Do you offer ‘Uncrystallised Funds Pension Lump Sum’ (UFPLS)?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
<li>Does my pot have any special features like a guaranteed annuity rate? (see ‘Getting started’)</li>
</ul>
</div>

<% unless large_text? %>
<div class="page-break"></div>
Expand Down Expand Up @@ -206,13 +214,15 @@

<hr>

<div class="next-steps next-steps--whole-pot">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Can I take my whole pot in one go?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
</ul>
<ul class="list list--questions">
<li>Can I take my whole pot in one go?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers this option?</li>
</ul>
</div>

<% if standard_text? %>
<div class="page-break"></div>
Expand Down Expand Up @@ -247,14 +257,16 @@
<hr>
<% end %>

<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>
<div class="next-steps next-steps--mix-options">
<h3>Next steps</h3>
<h4 class="pull icon icon--questions">Questions to ask your provider:</h4>

<ul class="list list--questions">
<li>Which pension options do you offer?</li>
<li>Can I mix some of the options together?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers the options I want?</li>
</ul>
<ul class="list list--questions">
<li>Which pension options do you offer?</li>
<li>Can I mix some of the options together?</li>
<li>Will you charge me a fee if I move my pot to a provider that offers the options I want?</li>
</ul>
</div>

<h4 class="icon icon--website downshift">Go to our website for more guidance on:</h4>

Expand Down
4 changes: 4 additions & 0 deletions lib/output/templates/section_selector.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
require 'output/templates/section_selectors/supplementary_sectionable'

require 'output/templates/section_selectors/base'
require 'output/templates/section_selectors/generic_naked'
require 'output/templates/section_selectors/generic'
require 'output/templates/section_selectors/ineligible'

module Output
Expand Down
11 changes: 1 addition & 10 deletions lib/output/templates/section_selectors/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ module Output
module Templates
module SectionSelectors
class Base
SUPPLEMENTARY_SECTIONS = %i(supplementary_benefits
supplementary_debt
supplementary_ill_health
supplementary_defined_benefit_pensions)
include Output::Templates::SupplementarySectionable

def call(output_document)
[
Expand All @@ -21,12 +18,6 @@ def call(output_document)
:footer
].flatten
end

private

def supplementary_sections(output_document)
SUPPLEMENTARY_SECTIONS.select { |c| output_document.public_send(c) }
end
end
end
end
Expand Down
23 changes: 23 additions & 0 deletions lib/output/templates/section_selectors/generic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Output
module Templates
module SectionSelectors
class Generic
include Output::Templates::SupplementarySectionable

def call(output_document)
[
:header,
:getting_started,
:options_overview,
:generic_guidance,
:inheritance_tax,
:scams,
supplementary_sections(output_document),
:further_guidance,
:footer
].flatten
end
end
end
end
end
21 changes: 21 additions & 0 deletions lib/output/templates/section_selectors/generic_naked.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module Output
module Templates
module SectionSelectors
class GenericNaked
include Output::Templates::SupplementarySectionable

def call(output_document)
[
:getting_started,
:options_overview,
:generic_guidance,
:inheritance_tax,
:scams,
supplementary_sections(output_document),
:further_guidance
].flatten
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Output
module Templates
module SupplementarySectionable
SUPPLEMENTARY_SECTIONS = %i(
supplementary_benefits
supplementary_debt
supplementary_ill_health
supplementary_defined_benefit_pensions
)

def supplementary_sections(output_document)
SUPPLEMENTARY_SECTIONS.select { |c| output_document.public_send(c) }
end
end
end
end
2 changes: 1 addition & 1 deletion lib/output/templates/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Output
module Templates
VERSION = '4.0.0'
VERSION = '4.1.0'
end
end

0 comments on commit af6d8af

Please sign in to comment.