-
Notifications
You must be signed in to change notification settings - Fork 2
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 #515 from commercekitchen/develop
Release 8_17_2021
- Loading branch information
Showing
16 changed files
with
179 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ | |
@import "admin/custom/*"; | ||
@import "scaffolds"; | ||
@import "pdf"; | ||
@import "att_pdf"; |
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,45 @@ | ||
@import "vars"; | ||
|
||
.att-pdf-cert { | ||
background-color: $att-light-blue; | ||
padding: 2em; | ||
|
||
.cert-box { | ||
height: auto; | ||
text-align: center; | ||
border: none; | ||
padding: 3rem; | ||
background-color: $white; | ||
color: $att-light-blue; | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
|
||
p { | ||
font-size: 1.5em; | ||
} | ||
|
||
h1 { | ||
font-size: 3.5em; | ||
margin: 0 0 1em 0; | ||
} | ||
|
||
.name-fill { | ||
border-bottom: 1px solid $att-light-blue; | ||
width: 75%; | ||
margin: 3em auto 1em auto; | ||
} | ||
|
||
h2 { | ||
font-size: 2.5em; | ||
font-weight: lighter; | ||
margin-bottom: 2em; | ||
} | ||
|
||
img { | ||
margin: 2em; | ||
position: relative; | ||
height: 5em; | ||
} | ||
} | ||
} |
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
25 changes: 25 additions & 0 deletions
25
app/views/course_completions/custom_certificates/att.pdf.erb
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,25 @@ | ||
<div class="att-pdf-cert"> | ||
<div class="cert-box"> | ||
<h1><%= t('completed_courses_page.certificate_of_completion') %></h1> | ||
|
||
<p> | ||
<%= t('certificate.this_award') %> | ||
</p> | ||
|
||
<div class="name-fill"> </div> | ||
|
||
<p> | ||
<%= t('certificate.has_completed') %> | ||
</p> | ||
|
||
<%= content_tag :h2, "#{@course.title}", class: "course" %> | ||
|
||
<div class="image-container"> | ||
<%= wicked_pdf_image_tag "att_certificate_logo.png" %> | ||
</div> | ||
|
||
<div class="disclaimer"> | ||
<%= t('certificate.att.disclaimer').html_safe %> | ||
</div> | ||
</div> | ||
</div> |
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'feature_helper' | ||
|
||
feature 'Admin updates translations' do | ||
let(:organization) { FactoryBot.create(:organization) } | ||
let(:admin) { FactoryBot.create(:user, :admin, organization: organization) } | ||
|
||
before do | ||
switch_to_subdomain(organization.subdomain) | ||
log_in_with admin.email, admin.password | ||
end | ||
|
||
scenario 'Admin sees correct content on custom translations page' do | ||
visit admin_custom_translations_path | ||
|
||
# Page Header | ||
expect(page).to have_content 'Custom Text - English' | ||
|
||
# Table Headers | ||
expect(page).to have_content 'Section' | ||
expect(page).to have_content 'Default Text' | ||
expect(page).to have_content 'Actions' | ||
|
||
# Translation labels | ||
expect(page).to have_content 'Homepage Greeting' | ||
expect(page).to have_content 'Course Selection Greeting' | ||
expect(page).to have_content 'Course Selection Subheader' | ||
expect(page).to have_content 'Retake the Quiz Button' | ||
|
||
# Translation values | ||
expect(page).to have_content 'Choose a course below to start learning or search courses.' | ||
expect(page).to have_content 'Retake the Quiz' | ||
end | ||
|
||
scenario 'Admin can change a translation' do | ||
visit admin_custom_translations_path | ||
|
||
find(:xpath, "//tr[td[contains(.,'Course Selection Subheader')]]/td/a", text: 'Edit').click | ||
expect(current_path).to eq(new_admin_custom_translation_path('en')) | ||
|
||
fill_in 'Course Selection Subheader in English', with: 'New Subheader text' | ||
click_on 'Submit' | ||
|
||
expect(page).to have_content 'Text for Course Selection Subheader updated.' | ||
expect(page).to have_content 'New Subheader text' | ||
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