-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
<!--Descriptive page name, messages and instructions--> | ||
<h2 class="heading"> | ||
<h2 class="heading" id="invite-heading"> | ||
<%= t(".title", email: invitation.invitee_email) %> | ||
</h2> | ||
<!--/descriptions--> | ||
|
||
<!--main content--> | ||
<% status = invitation.resent_at ? "resent" : "not_resent" %> | ||
<p> | ||
<%= t(".date", date: l(invitation.sent_at.to_date)) %> | ||
<% if invitation.sent_at < ArchiveConfig.HOURS_BEFORE_RESEND_INVITATION.hours.ago %> | ||
<%= t(".resend", count: ArchiveConfig.HOURS_BEFORE_RESEND_INVITATION) %> | ||
<%= button_to t(".resend_button"), resend_invite_requests_path(email: invitation.invitee_email) %> | ||
<% end %> | ||
<%= t(".info.#{status}", | ||
sent_at: l(invitation.sent_at.to_date), | ||
resent_at: invitation.resent_at ? l(invitation.resent_at.to_date) : nil ) %> | ||
Check failure on line 12 in app/views/invite_requests/_invitation.html.erb GitHub Actions / ERB Lint runner
|
||
<% if invitation.can_resend? %> | ||
<%# i18n-tasks-use t("invite_requests.invitation.after_cooldown_period.not_resent") | ||
i18n-tasks-use t("invite_requests.invitation.after_cooldown_period.resent")-%> | ||
<%= t(".after_cooldown_period.#{status}", | ||
count: ArchiveConfig.HOURS_BEFORE_RESEND_INVITATION, | ||
support_link: link_to(t(".contact_support"), new_feedback_report_path)) %> | ||
<%= button_to t(".resend_button"), resend_invite_requests_path(email: invitation.invitee_email) %> | ||
<% else %> | ||
<%= t(".before_cooldown_period", count: ArchiveConfig.HOURS_BEFORE_RESEND_INVITATION) %> | ||
<% end %> | ||
</p> | ||
|
||
<%= content_for :footer_js do %> | ||
<%= javascript_tag do %> | ||
Check failure on line 26 in app/views/invite_requests/_invitation.html.erb GitHub Actions / ERB Lint runner
|
||
$j(document).ready(function(){ | ||
$j('#invite-heading').replaceWith(function () { | ||
return "<h3>" + $j(this).html() + "</h3>"; | ||
}); | ||
}) | ||
<% end %> | ||
<% end %> | ||
<!--/content--> |
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,7 @@ | ||
class AddResentAtToInvitations < ActiveRecord::Migration[6.1] | ||
uses_departure! if Rails.env.staging? || Rails.env.production? | ||
|
||
def change | ||
add_column :invitations, :resent_at, :datetime | ||
end | ||
end |