|
1 |
| -<% page_title %> |
2 |
| -<% page_class "govuk-main-wrapper" %> |
3 |
| - <%= render "govuk_publishing_components/components/breadcrumbs", { |
4 |
| - collapse_on_mobile: true, |
5 |
| - breadcrumbs: [ |
6 |
| - { |
7 |
| - title: "Home", |
8 |
| - url: "/" |
9 |
| - } |
10 |
| - ] |
11 |
| - } %> |
12 |
| - |
13 | 1 | <div class="govuk-grid-row">
|
14 | 2 | <div class="govuk-grid-column-two-thirds">
|
15 | 3 | <%= render "govuk_publishing_components/components/title", {
|
|
51 | 39 | <div class="govuk-grid-row">
|
52 | 40 | <div class="govuk-grid-column-one-third">
|
53 | 41 | <%= render "govuk_publishing_components/components/big_number", {
|
54 |
| - number: @open_consultation_count, |
| 42 | + number: @content_item.open_consultation_count, |
55 | 43 | label: t('get_involved.open_consultations'),
|
56 | 44 | href: "/search/policy-papers-and-consultations?content_store_document_type=open_consultations"
|
57 | 45 | } %>
|
58 | 46 | </div>
|
59 | 47 | <div class="govuk-grid-column-two-thirds">
|
60 | 48 | <%= render "govuk_publishing_components/components/big_number", {
|
61 |
| - number: @closed_consultation_count, |
| 49 | + number: @content_item.closed_consultation_count, |
62 | 50 | label: t('get_involved.closed_consultations'),
|
63 | 51 | href: "/search/policy-papers-and-consultations?content_store_document_type=closed_consultations"
|
64 | 52 | } %>
|
65 | 53 | </div>
|
66 | 54 | </div>
|
67 | 55 |
|
68 |
| - <% if @next_closing_consultation %> |
| 56 | + <% if @content_item.next_closing_consultation %> |
69 | 57 | <%# Attention to closing consultation %>
|
70 | 58 | <%= render "govuk_publishing_components/components/inset_text", {
|
71 | 59 | } do %>
|
72 | 60 | <%= render "govuk_publishing_components/components/heading", {
|
73 |
| - text: time_until_closure(@next_closing_consultation), |
| 61 | + text: @content_item.time_until_closure(@content_item.next_closing_consultation), |
74 | 62 | heading_level: 3
|
75 | 63 | } %>
|
76 | 64 | <p class="govuk-body">
|
77 |
| - <%= @next_closing_consultation['title'] %> |
| 65 | + <%= @content_item.next_closing_consultation['title'] %> |
78 | 66 | </p>
|
79 |
| - <%= link_to t('get_involved.read_respond'), @next_closing_consultation['link'], class: "govuk-link" %> |
| 67 | + <%= link_to t('get_involved.read_respond'), @content_item.next_closing_consultation['link'], class: "govuk-link" %> |
80 | 68 | <% end %>
|
81 | 69 | <% end %>
|
82 | 70 | </div>
|
|
93 | 81 | margin_bottom: 4
|
94 | 82 | } %>
|
95 | 83 | <%= render "govuk_publishing_components/components/document_list", {
|
96 |
| - items: @recently_opened |
| 84 | + items: @content_item.recently_opened |
97 | 85 | } %>
|
98 |
| - <%= link_to(t('get_involved.search_all'), get_consultations_link, class: "govuk-link" ) %> |
| 86 | + <%= link_to(t('get_involved.search_all'), @content_item.consultations_link, class: "govuk-link" ) %> |
99 | 87 | </div>
|
100 | 88 | </div>
|
101 | 89 |
|
|
111 | 99 | } %>
|
112 | 100 |
|
113 | 101 | <%= render "govuk_publishing_components/components/document_list", {
|
114 |
| - items: @recent_outcomes |
| 102 | + items: @content_item.recent_outcomes |
115 | 103 | } %>
|
116 | 104 |
|
117 |
| - <%= link_to(t('get_involved.search_all'), get_consultations_link, class: "govuk-link" ) %> |
| 105 | + <%= link_to(t('get_involved.search_all'), @content_item.consultations_link, class: "govuk-link" ) %> |
118 | 106 | </div>
|
119 | 107 | </div>
|
120 | 108 |
|
|
177 | 165 | id: "take-part"
|
178 | 166 | } %>
|
179 | 167 | <div role="list">
|
180 |
| - <% @take_part_pages.each_with_index do |take_part_page, index| %> |
| 168 | + <% @content_item.take_part_pages.each_with_index do |take_part_page, index| %> |
181 | 169 | <% if index % 3 == 0 && index != 0 %> </div> <% end %>
|
182 | 170 | <% if index % 3 == 0 %>
|
183 | 171 | <div class="govuk-grid-row">
|
|
193 | 181 | image_loading: "lazy",
|
194 | 182 | } %>
|
195 | 183 | </div>
|
196 |
| - <% if index == @take_part_pages.size-1 %> |
| 184 | + <% if index == @content_item.take_part_pages.size-1 %> |
197 | 185 | </div>
|
198 | 186 | <% end %>
|
199 | 187 | <% end %>
|
|
0 commit comments