-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edit summary partial and evidence list shame css
Add a method to document model that converts file size to kb modify summary table and shame css Modify Supporting evidence checklist - remove unnecessry margin Make sure down load links work Add translate Refactor Case worker side - so that it displays a download all link correctly Fix style lint Try and fix some rspec tests Remove text for when there is no check list - the content is veriy different to the other - check with designer Move evidene checklist partial out of evidence list partial and render them side by side on the summary page
- Loading branch information
Showing
11 changed files
with
91 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
.evidence-checklist-read-only | ||
- if @claim.disk_evidence? | ||
- if @claim.disk_evidence? | ||
.evidence-checklist-read-only | ||
%h3.govuk-heading-m | ||
= t('.evidence_address') | ||
= render partial: 'external_users/claims/supporting_documents/laa_address', locals: { f: @claim } | ||
|
||
%h3.govuk-heading-m | ||
= t('shared.evidence_checklist.caption') | ||
- if current_user.persona.is_a? ExternalUser | ||
%p.form-hint | ||
= t('.evidence_hint') | ||
|
||
- if @claim.evidence_checklist_ids.empty? | ||
%p | ||
= t('.no_evidence') | ||
- else | ||
%ul.govuk-list | ||
- DocType.find_by_ids(@claim.evidence_checklist_ids).each do |dt| | ||
%li | ||
= dt.name | ||
- unless @claim.evidence_checklist_ids.empty? | ||
= render partial: 'shared/supporting_evidence_checklist', locals: { f: @claim } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,10 @@ | ||
= render partial: 'shared/evidence_checklist' | ||
|
||
.app-summary-section | ||
%h3.govuk-heading-m | ||
= t('.existing_evidence') | ||
|
||
- if current_user_persona_is?(CaseWorker) && @claim.documents.any? | ||
= govuk_link_to t('shared.download_all_html', context: t('.existing_evidence')), download_zip_case_workers_claim_path(@claim), class: 'download-all-link' | ||
|
||
- if @claim.documents.none? | ||
%p.govuk-body | ||
= t('.no_documents_uploaded') | ||
= t('shared.evidence_list.no_supporting_evidence') | ||
|
||
- else | ||
= govuk_table do | ||
= govuk_table_caption(class: 'govuk-visually-hidden') do | ||
= t('.caption') | ||
|
||
= govuk_table_thead do | ||
= govuk_table_row do | ||
= govuk_table_th do | ||
= t('.name_of_file') | ||
|
||
= govuk_table_th_numeric do | ||
= t('.file_size') | ||
|
||
= govuk_table_th_numeric do | ||
= t('.date_added') | ||
|
||
= govuk_table_th_numeric do | ||
= t('.actions') | ||
|
||
= govuk_table_tbody do | ||
- @claim.documents.includes(:document_blob, :converted_preview_document_attachment).each do |document| | ||
= govuk_table_row do | ||
= govuk_table_td('data-label': t('.name_of_file')) do | ||
= document.document_file_name | ||
|
||
= govuk_table_td_numeric('data-label': t('.file_size')) do | ||
= number_to_human_size(document.document_file_size) | ||
|
||
= govuk_table_td_numeric('data-label': t('.date_added')) do | ||
= document.created_at.strftime(Settings.date_format) | ||
|
||
= govuk_table_td_numeric('data-label': t('.actions')) do | ||
.app-link-group | ||
- if document.converted_preview_document.present? | ||
= govuk_link_to t('common.view_html', context: "#{document.document_file_name}"), document_path(document) | ||
|
||
= govuk_link_to t('common.download_html', context: "#{document.document_file_name}"), download_document_path(document) | ||
= render partial: 'shared/supporting_evidence_uploads', locals: {f: @claim } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.div.govuk-summary-card | ||
.govuk-summary-card__title-wrapper | ||
%h2.govuk-summary-card__title= (t('shared.summary.supporting_evidence_checklist')) | ||
.govuk-summary-card__content | ||
%dl.govuk-summary-list | ||
= govuk_summary_list do | ||
%ul.remove-margin | ||
- DocType.find_by_ids(@claim.evidence_checklist_ids).each do |dt| | ||
%li.no-bullets-item.format-supporting-evidence-list | ||
= dt.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.govuk-summary-card.custom-summary-card | ||
.govuk-summary-card__title-wrapper | ||
%h2.govuk-summary-card__title= (t('shared.evidence_list.existing_evidence')) | ||
.govuk-summary-card__content | ||
%dl.govuk-summary-list | ||
%div.govuk-summary-list__row | ||
%div.govuk-summary-list__key.file-name= (t('shared.evidence_list.file')) | ||
%div.govuk-summary-list__key.file-info= (t('shared.evidence_list.file_size')) | ||
%div.govuk-summary-list__key.file-info= (t('shared.evidence_list.date_added')) | ||
|
||
- @claim.documents.includes(:document_blob, :converted_preview_document_attachment).each do |document| | ||
%div.govuk-summary-list__row | ||
%div.govuk-summary-list__value.file-name= govuk_link_to document.document_file_name, download_document_path(document) | ||
%div.govuk-summary-list__value.file-info= document.document_file_size_in_kb | ||
%div.govuk-summary-list__value.file-info= document.document_date_added | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters