-
Notifications
You must be signed in to change notification settings - Fork 257
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 #3120 from projectblacklight/email-slots
Use the new slot API for the modal
- Loading branch information
Showing
5 changed files
with
27 additions
and
5 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= render Blacklight::System::ModalComponent.new do |component| %> | ||
<% component.title { t('blacklight.tools.citation') } %> | ||
<% component.with_title { t('blacklight.tools.citation') } %> | ||
|
||
<%= render Blacklight::Document::CitationComponent.with_collection(@documents) if @documents.present? %> | ||
<% 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<%= render Blacklight::System::ModalComponent.new do |component| %> | ||
<% component.title { t('blacklight.email.form.title') } %> | ||
<% component.with_title { t('blacklight.email.form.title') } %> | ||
|
||
<% component.body do %> | ||
<% component.with_body do %> | ||
<%= render 'email_form' %> | ||
<% 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<%= render Blacklight::System::ModalComponent.new do |component| %> | ||
<% component.title { t('blacklight.sms.form.title') } %> | ||
<% component.with_title { t('blacklight.sms.form.title') } %> | ||
|
||
<% component.body do %> | ||
<% component.with_body do %> | ||
<%= render 'sms_form' %> | ||
<% 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,10 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe 'Citation functionality' do | ||
before { visit solr_document_path('2007020969') } | ||
|
||
it 'displays the Cite modal with expected header' do | ||
click_link 'Cite' | ||
expect(find('div.modal-header')).to have_text 'Cite' | ||
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,12 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe 'SMS functionality' do | ||
before { visit solr_document_path('2007020969') } | ||
|
||
it 'displays SMS modal with form' do | ||
click_link 'SMS' | ||
expect(find('div.modal-header')).to have_text 'SMS This' | ||
fill_in 'Phone Number:', with: '555-555-5555' | ||
select 'Verizon', from: 'Carrier' | ||
end | ||
end |