Skip to content

Commit

Permalink
Set the all-smart-answer-questions answer as an example
Browse files Browse the repository at this point in the history
This uses the new text_for & govspeak_for helpers and drops the
.govspeak extension from the filename.
  • Loading branch information
kevindew committed May 29, 2020
1 parent b0aadfa commit 0215636
Show file tree
Hide file tree
Showing 18 changed files with 80 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<% render_content_for :meta_description do %>
<% text_for :meta_description do %>
Do SEO magic here.
<% end %>

<% render_content_for :title do %>
<% text_for :title do %>
All Smart Answer questions
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
This flow shows all the different question types for Smart Answers.
You can [peek at the results](/all-smart-answer-questions/y/mithrandir,olorin,tharkun/mordor/2019-01-01/1900-01-01/2020-02-29/0000-12-25/9999999.0/four/yes/WC2B%206NH/500000.0-month/world/0/0.5) and access all the different question types individually via changing the previous answers.
<% end %>

<% render_content_for :post_body do %>
<% govspeak_for :post_body do %>
Enjoy!
<% end %>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<% render_content_for :title do %>
<% text_for :title do %>
Congratulations
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
You managed to get through all the questions.
<% end %>

<% render_content_for :next_steps do %>
<% govspeak_for :next_steps do %>
Now you can close the browser. Or not.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<% render_content_for :title do %>
<% text_for :title do %>
Money question: How much does the world cost?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.
<% end %>

<% render_content_for :suffix_label do %>
<% text_for :suffix_label do %>
this year
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
It's gotta be more than that!
<% end %>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<% render_content_for :title do %>
<% text_for :title do %>
Salary question: What would you like your salary to be?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :hint do %>
<% text_for :hint do %>
This is a hint
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
Really, not more?
<% end %>
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% render_content_for :title do %>
<% text_for :title do %>
Multiple choice (yes/no): Would you like to see the other questions?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :hint do %>
<% text_for :hint do %>
This is a hint
<% end %>

Expand All @@ -17,6 +17,6 @@
"no": "No"
) %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
Of course you would!
<% end %>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<% render_content_for :title do %>
<% text_for :title do %>
Checkbox question: What are other names for Gandalf?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- also formatting in a govspeak style
- like this
<% end %>

<% render_content_for :post_body do %>
<% govspeak_for :post_body do %>
Post body can contain less important information.
<% end %>

Expand All @@ -21,10 +21,10 @@
"elrohir": "Elrohir"
) %>

<% render_content_for :hint do %>
<% text_for :hint do %>
This is a hint
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
It's neither Elrohir nor Radagast.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% render_content_for :title do %>
<% text_for :title do %>
Multiple choice: Which of these numbers is not a prime number?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :hint do %>
<% text_for :hint do %>
This is a hint
<% end %>

Expand All @@ -19,6 +19,6 @@
"four": "Four"
) %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
4 is divisible by 2.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% render_content_for :title do %>
<% text_for :title do %>
Country select: Where are you now?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and also govspeak
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
You are currently in a fictional country?
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% render_content_for :title do %>
<% text_for :title do %>
Date question: What date is tomorrow?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and maybe govspeak
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
That's not tomorrow.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% render_content_for :title do %>
<% text_for :title do %>
Date question: What is your date of birth?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
You haven't been born yet.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% render_content_for :title do %>
<% text_for :title do %>
Date question: When is Christmas this year?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
That's not Christmas.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% render_content_for :title do %>
<% text_for :title do %>
Date question: When will be the next 29 February?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.

- and govspeak
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
That's not a leap year.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% text_for :title do %>
Value/float question: What is 1/2?
<% end %>

<% govspeak_for :body do %>
Body can contain further explanations.
<% end %>

<% text_for :label do %>
Number
<% end %>

<% text_for :error_message do %>
0.5
<% end %>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<% render_content_for :title do %>
<% text_for :title do %>
Value/integer question: How many software engineers does it take to change a light bulb?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
None. That's a hardware problem. Or: The light bulb works fine on the system in my office. Or: Darkness is working as intended.
<% end %>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<% render_content_for :title do %>
<% text_for :title do %>
Postcode question: Where is Aviation House?
<% end %>

<% render_content_for :body do %>
<% govspeak_for :body do %>
Body can contain further explanations.
<% end %>

<% render_content_for :hint do %>
<% text_for :hint do %>
This is a hint
<% end %>

<% render_content_for :error_message do %>
<% text_for :error_message do %>
It's WC2B 6NH.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% text_for :title do %>
Value question: "Hello ..."?
<% end %>

<% govspeak_for :body do %>
Body can contain further explanations.
<% end %>

<% text_for :suffix_label do %>
!
<% end %>

<% text_for :error_message do %>
"world"
<% end %>

This file was deleted.

0 comments on commit 0215636

Please sign in to comment.