-
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.
Overwrite Devise views to enable TermCustomizer
Add translation keys Update mailers: - [x] confirmamtion_instructions - [x] email_changed - [x] invitation_instructions - [x] invite_admin - [x] invite_collaborator - [x] invite_private_user - [x] organization_admin_invitation_instructions - [x] password_change - [x] reset_password_instructions - [x] unlock_instructions
- Loading branch information
Showing
19 changed files
with
290 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
app/views/devise/mailer/confirmation_instructions.html.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,11 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<% if @resource.unconfirmed_email.blank? %> | ||
<p class="email-greeting"> | ||
<%= t('.greeting', scope: scope, recipient: @email) %> | ||
</p> | ||
<% end %> | ||
|
||
<p class="email-instructions"><%= t('.instruction', scope: scope) %></p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t('.action', scope: scope), confirmation_url(@resource, confirmation_token: @token, host: @resource.organization.host) %></p> |
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,9 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p><%=t('.greeting', scope: scope, recipient: @email) %></p> | ||
|
||
<% if @resource.try(:unconfirmed_email?) %> | ||
<p><%= t('.message_unconfirmed', scope: scope, email: @resource.unconfirmed_email) %></p> | ||
<% else %> | ||
<p><%= t('.message', scope: scope, email: @resource.email) %></p> | ||
<% 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,15 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t(".hello", scope: scope, email: @resource.name) %></p> | ||
|
||
<p class="email-instructions"> | ||
<%= t(".someone_invited_you", scope: scope, application: @resource.organization.name) %> | ||
</p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t(".accept", scope: scope), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim.root_path, host: @resource.organization.host) %></p> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<p class="email-small"><%= t(".accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %></p> | ||
<% end %> | ||
|
||
<p class="email-small email-closing"><%= t(".ignore", scope: scope).html_safe %></p> |
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,13 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<%= t(".hello", scope: scope, email: @resource.name) %> | ||
|
||
<%= t(".someone_invited_you", scope: scope, application: @resource.organization.name) %> | ||
|
||
<%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim.root_path, host: @resource.organization.host) %> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<%= t(".accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %> | ||
<% end %> | ||
|
||
<%= strip_tags t(".ignore", scope: scope) %> |
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,19 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %></p> | ||
|
||
<p class="email-instructions"> | ||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_admin", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_admin", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
</p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t("devise.mailer.invitation_instructions.accept", scope: scope), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %></p> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %></p> | ||
<% end %> | ||
|
||
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %></p> |
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,17 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %> | ||
|
||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_admin", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_admin", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
|
||
<%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %> | ||
<% end %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %> |
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,19 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %></p> | ||
|
||
<p class="email-instructions"> | ||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_admin", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_admin", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
</p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t("devise.mailer.invitation_instructions.accept", scope: scope), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %></p> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %></p> | ||
<% end %> | ||
|
||
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %></p> |
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,17 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %> | ||
|
||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_admin", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_admin", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
|
||
<%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %> | ||
<% end %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %> |
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,19 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %></p> | ||
|
||
<p class="email-instructions"> | ||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_private_user", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_private_user", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
</p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t("devise.mailer.invitation_instructions.accept", scope: scope), accept_invitation_url(@resource, invitation_token: @token, host: @resource.organization.host) %></p> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %></p> | ||
<% end %> | ||
|
||
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %></p> |
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,17 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.name) %> | ||
|
||
<% if @resource.invited_by.present? %> | ||
<%= t("devise.mailer.invitation_instructions.invited_you_as_private_user", scope: scope, invited_by: @resource.invited_by.name, application: @resource.organization.name) %> | ||
<% else %> | ||
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_private_user", scope: scope, application: @resource.organization.name) %> | ||
<% end %> | ||
|
||
<%= accept_invitation_url(@resource, invitation_token: @token, host: @resource.organization.host) %> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %> | ||
<% end %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %> |
13 changes: 13 additions & 0 deletions
13
app/views/devise/mailer/organization_admin_invitation_instructions.html.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,13 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.email) %></p> | ||
|
||
<p class="email-instructions"><%= t("devise.mailer.invitation_instructions.someone_invited_you", scope: scope, application: @resource.organization.name) %></p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t("devise.mailer.invitation_instructions.accept", scope: scope), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %></p> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %></p> | ||
<% end %> | ||
|
||
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore", scope: scope).html_safe %></p> |
13 changes: 13 additions & 0 deletions
13
app/views/devise/mailer/organization_admin_invitation_instructions.text.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,13 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.hello", scope: scope, email: @resource.email) %> | ||
|
||
<%= t("devise.mailer.invitation_instructions.someone_invited_you", scope: scope, application: @resource.organization.name) %> | ||
|
||
<%= accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim_admin.root_path, host: @resource.organization.host) %> | ||
|
||
<% if @resource.invitation_due_at %> | ||
<%= t("devise.mailer.invitation_instructions.accept_until", scope: scope, due_date: l(@resource.invitation_due_at, format: :long)) %> | ||
<% end %> | ||
|
||
<%= strip_tags t("devise.mailer.invitation_instructions.ignore", scope: scope) %> |
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,5 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t(".greeting", scope: scope, recipient: @resource.email) %></p> | ||
|
||
<p class="email-instructions"><%= t(".message", scope: scope) %></p> |
11 changes: 11 additions & 0 deletions
11
app/views/devise/mailer/reset_password_instructions.html.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,11 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t(".greeting", scope: scope, recipient: @resource.email) %></p> | ||
|
||
<p class="email-instructions"><%= t(".instruction", scope: scope) %></p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t(".action", scope: scope), edit_password_url(@resource, reset_password_token: @token, host: @resource.organization.host) %></p> | ||
|
||
<p class="email-instruction email-small"><%= t(".instruction_2", scope: scope) %></p> | ||
|
||
<p class="email-instruction email-small"><%= t(".instruction_3", scope: scope) %></p> |
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,9 @@ | ||
<% scope = Decidim.config.devise_custom_scope.(@organization) %> | ||
|
||
<p class="email-greeting"><%= t(".greeting", scope: scope, recipient: @resource.email) %></p> | ||
|
||
<p class="email-instructions"><%= t(".message", scope: scope) %></p> | ||
|
||
<p class="email-instructions"><%= t(".instruction", scope: scope) %></p> | ||
|
||
<p class="email-button email-button__cta"><%= link_to t(".action", scope: scope), unlock_url(@resource, unlock_token: @token, host: @resource.organization.host) %></p> |
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
@Kagemaru Könnten wir das mit dem tenant_type Setting auf Organization lösen anstatt IDs zu hardcoden? Genau für solche Dinge ist der tenant_type gedacht. Wir müssten dazu nur:
case
Statement hier vonorg.tenant_type
abhängig machen