From c7d765c2e4e4ab5259388cd8fbeb7cc2b1359b12 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 10 Sep 2021 11:32:59 +0100 Subject: [PATCH] Make tasklist a partial --- app/views/case_logs/_tasklist.html.erb | 28 +++++++++++++++++++++++++ app/views/case_logs/show.html.erb | 29 +------------------------- 2 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 app/views/case_logs/_tasklist.html.erb diff --git a/app/views/case_logs/_tasklist.html.erb b/app/views/case_logs/_tasklist.html.erb new file mode 100644 index 000000000..455190ffb --- /dev/null +++ b/app/views/case_logs/_tasklist.html.erb @@ -0,0 +1,28 @@ +<%# Placeholder until we have a real form schema %> +<% + sections = { + "About the household" => ["Household characteristics", "Household situation", "Household needs"], + "Tenancy and property information" => ["Tenancy information", "Property information"], + "Rent and charges" => ["Income & benefits", "Rent"], + "Local Authority" => ["Local authority"], + "Submission" => ["Declaration"] + } +%> + +
    + <% sections.map do |section, subsections| %> +
  1. +

    + <%= section %> +

    +
      + <% subsections.map do |subsection| %> +
    • + <%= subsection %> + Not started +
    • + <% end %> +
    +
  2. + <% end %> +
diff --git a/app/views/case_logs/show.html.erb b/app/views/case_logs/show.html.erb index e005f74a0..e385d89e7 100644 --- a/app/views/case_logs/show.html.erb +++ b/app/views/case_logs/show.html.erb @@ -8,31 +8,4 @@ Skip to next incomplete section

-<%# Placeholder until we have a real form schema %> -<% - sections = { - "About the household" => ["Household characteristics", "Household situation", "Household needs"], - "Tenancy and property information" => ["Tenancy information", "Property information"], - "Rent and charges" => ["Income & benefits", "Rent"], - "Local Authority" => ["Local authority"], - "Submission" => ["Declaration"] - } -%> - -
    - <% sections.map do |section, subsections| %> -
  1. -

    - <%= section %> -

    -
      - <% subsections.map do |subsection| %> -
    • - <%= subsection %> - Not started -
    • - <% end %> -
    -
  2. - <% end %> -
+<%= render "tasklist" %>