-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2096 from DFE-Digital/redesign-personas
Improve personas design
- Loading branch information
Showing
8 changed files
with
212 additions
and
214 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<%= govuk_table(classes: "app-personas") do |table| | ||
table.with_head do |head| | ||
head.with_row do |row| | ||
row.with_cell(header: true, text: "Bucket") | ||
row.with_cell(header: true, text: "Country/Region") | ||
row.with_cell(header: true, text: "Status check") | ||
row.with_cell(header: true, text: "Sanction check") | ||
row.with_cell(header: true, text: "Skips work history") | ||
row.with_cell(header: true, text: "Teaching authority provides written statement") | ||
row.with_cell(header: true, text: "Reduced evidence accepted") | ||
row.with_cell(header: true) | ||
end | ||
end | ||
|
||
table.with_body do |body| | ||
@eligible_personas.each do |persona| | ||
body.with_row do |row| | ||
row.with_cell do | ||
bucket = region_bucket_for_persona(persona) | ||
govuk_tag(text: bucket) if bucket | ||
end | ||
|
||
row.with_cell { CountryName.from_region(persona[:region]) } | ||
|
||
row.with_cell { persona_check_tag(persona[:status_check]) } | ||
row.with_cell { persona_check_tag(persona[:sanction_check]) } | ||
|
||
row.with_cell { govuk_boolean_tag(persona[:application_form_skip_work_history]) } | ||
row.with_cell { govuk_boolean_tag(persona[:teaching_authority_provides_written_statement]) } | ||
row.with_cell { govuk_boolean_tag(persona[:reduced_evidence_accepted]) } | ||
|
||
row.with_cell(numeric: true) do | ||
govuk_button_to "Sign in".html_safe, eligible_sign_in_persona_path(persona[:region]) | ||
end | ||
end | ||
end | ||
end | ||
end %> |
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 @@ | ||
<%= govuk_button_to "Sign in".html_safe, ineligible_sign_in_personas_path %> |
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,47 @@ | ||
<%= govuk_table(classes: "app-personas") do |table| | ||
table.with_colgroup do |colgroup| | ||
colgroup.with_col(span: 1) | ||
colgroup.with_col(span: 7) | ||
colgroup.with_col(span: 1) | ||
end | ||
|
||
table.with_head do |head| | ||
head.with_row do |row| | ||
row.with_cell(scope: false) | ||
row.with_cell(header: true, text: "Permissions", colspan: 7) | ||
row.with_cell(scope: false) | ||
end | ||
|
||
head.with_row do |row| | ||
row.with_cell(header: true, text: "Email") | ||
row.with_cell(header: true, text: "Assess") | ||
row.with_cell(header: true, text: "Change names") | ||
row.with_cell(header: true, text: "Change work history") | ||
row.with_cell(header: true, text: "Reverse decisions") | ||
row.with_cell(header: true, text: "Support console") | ||
row.with_cell(header: true, text: "Verify") | ||
row.with_cell(header: true, text: "Withdraw") | ||
row.with_cell(header: true) | ||
end | ||
end | ||
|
||
table.with_body do |body| | ||
@staff_personas.each do |staff| | ||
body.with_row do |row| | ||
row.with_cell(text: staff.email) | ||
|
||
row.with_cell { govuk_boolean_tag(staff.assess_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.change_name_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.change_work_history_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.reverse_decision_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.support_console_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.verify_permission) } | ||
row.with_cell { govuk_boolean_tag(staff.withdraw_permission) } | ||
|
||
row.with_cell(numeric: true) do | ||
govuk_button_to "Sign in ".html_safe, staff_sign_in_persona_path(staff) | ||
end | ||
end | ||
end | ||
end | ||
end %> |
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,36 @@ | ||
<%= govuk_table(classes: "app-personas") do |table| | ||
table.with_head do |head| | ||
head.with_row do |row| | ||
row.with_cell(header: true, text: "Bucket") | ||
row.with_cell(header: true, text: "Country") | ||
row.with_cell(header: true, text: "Status check") | ||
row.with_cell(header: true, text: "Sanction check") | ||
row.with_cell(header: true, text: "Stage/status") | ||
row.with_cell(header: true, text: "Email address") | ||
row.with_cell(header: true) | ||
end | ||
end | ||
|
||
table.with_body do |body| | ||
@teacher_personas.each do |persona| | ||
body.with_row do |row| | ||
row.with_cell do | ||
bucket = region_bucket_for_persona(persona) | ||
govuk_tag(text: bucket) if bucket | ||
end | ||
row.with_cell { CountryName.from_country(persona[:application_form].country) } | ||
|
||
row.with_cell { persona_check_tag(persona[:status_check]) } | ||
row.with_cell { persona_check_tag(persona[:sanction_check]) } | ||
row.with_cell do | ||
render(StatusTag::Component.new(persona[:stage_or_status])) | ||
end | ||
row.with_cell { persona[:teacher].email } | ||
|
||
row.with_cell(numeric: true) do | ||
govuk_button_to "Sign in".html_safe, teacher_sign_in_persona_path(persona[:teacher]) | ||
end | ||
end | ||
end | ||
end | ||
end %> |
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
Oops, something went wrong.