alphagov/transaction-wrappers — pull request #4 by jackfranklin (2013-03-19 11:17:59+00:00)
Title: Add static content through partials

**This should not be merged yet - just opening this to get the discussion going & see what @JordanHatch makes of the stuff I've done so far.**

Also, this will break when transaction-wrappers/pull/3 gets merged in, due to the slug changes.

Having spoken to Jordan yesterday we agreed to try using partials to manage the content of each individual transaction, which has the advantage of us being able to use proper Ruby conditionals & HTML, no more messing around with Yaml.

This is my first pass at it. I extracted the different form questions, of which there are five:

- Choose a document type (eg Nulla Osta, Certificate of no impediment, etc)
- Postage? Yes/No
- Postage options dropdown
- Registration Count (How many births would you like to register?)
- Certificate Count (How many certificates do you need?)

Then each transaction has its own folder within `views/partials/transactions` that matches the slug, and defines three partials:

- `_done.html.erb` (once payment has gone through)
- `_intro.html.erb` (first screen, contains form & info)
- `_confirm.html.erb` (page confirming total cost prior to going off to Barclays to pay)

For example, here's the intro for a certificate of marriage:

```

Pay for documents you need from the Foreign & Commonwealth Office (FCO) to prove you’re allowed to get married abroad.

<%= render "partials/questions/document_type", :question_text => "Which type of certificate do you need?" %>
[and so on...]
```