|
|
@ -41,12 +41,19 @@ module TasklistHelper |
|
|
|
def subsection_link(subsection, log, current_user) |
|
|
|
def subsection_link(subsection, log, current_user) |
|
|
|
if subsection.status(log) != :cannot_start_yet |
|
|
|
if subsection.status(log) != :cannot_start_yet |
|
|
|
next_page_path = next_page_or_check_answers(subsection, log, current_user).to_s |
|
|
|
next_page_path = next_page_or_check_answers(subsection, log, current_user).to_s |
|
|
|
govuk_link_to(subsection.label, next_page_path.dasherize, aria: { describedby: subsection.id.dasherize }) |
|
|
|
govuk_link_to(subsection.label, next_page_path.dasherize, class: "govuk-task-list__link", aria: { describedby: subsection.id.dasherize }) |
|
|
|
else |
|
|
|
else |
|
|
|
subsection.label |
|
|
|
subsection.label |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def subsection_href(subsection, log, current_user) |
|
|
|
|
|
|
|
if subsection.status(log) != :cannot_start_yet |
|
|
|
|
|
|
|
next_page_path = next_page_or_check_answers(subsection, log, current_user).to_s |
|
|
|
|
|
|
|
next_page_path.dasherize |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def review_log_text(log) |
|
|
|
def review_log_text(log) |
|
|
|
if log.collection_period_open? |
|
|
|
if log.collection_period_open? |
|
|
|
path = log.sales? ? review_sales_log_path(id: log, sales_log: true) : review_lettings_log_path(log) |
|
|
|
path = log.sales? ? review_sales_log_path(id: log, sales_log: true) : review_lettings_log_path(log) |
|
|
@ -59,6 +66,10 @@ module TasklistHelper |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tasklist_link_class(status) |
|
|
|
|
|
|
|
status == :cannot_start_yet ? "" : "govuk-task-list__item--with-link" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
def breadcrumb_organisation(log) |
|
|
|
def breadcrumb_organisation(log) |
|
|
|