diff --git a/decidim-blogs/app/views/decidim/blogs/posts/_posts.html.erb b/decidim-blogs/app/views/decidim/blogs/posts/_posts.html.erb index e63a799443c7..8687f62a049c 100644 --- a/decidim-blogs/app/views/decidim/blogs/posts/_posts.html.erb +++ b/decidim-blogs/app/views/decidim/blogs/posts/_posts.html.erb @@ -1,6 +1,9 @@
<% paginate_posts.each do |post| %>
+ <% if post.photo.present? %> + <%= image_tag post.photo.url, class: "card__image" %> + <% end %>
<%= link_to post, class: "card__link" do %> diff --git a/decidim-blogs/spec/system/explore_posts_spec.rb b/decidim-blogs/spec/system/explore_posts_spec.rb index a38c0e4aa5da..6c1831e48b91 100644 --- a/decidim-blogs/spec/system/explore_posts_spec.rb +++ b/decidim-blogs/spec/system/explore_posts_spec.rb @@ -9,6 +9,8 @@ let!(:old_post) { create(:post, component: component, created_at: Time.current - 2.days) } let!(:new_post) { create(:post, component: component, created_at: Time.current) } + let!(:image) { create(:attachment, attached_to: old_post) } + describe "index" do it "shows all posts for the given process" do visit_component @@ -17,6 +19,11 @@ expect(page).to have_selector(".card--post", text: translated(old_post.title)) end + it "shows images" do + visit_component + expect(page).to have_selector(".card--post img.card__image") + end + context "when paginating" do let(:collection_size) { 10 } let!(:collection) { create_list :post, collection_size, component: component } diff --git a/decidim-conferences/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb b/decidim-conferences/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb index c4c5942d559e..34fd0a15e1eb 100644 --- a/decidim-conferences/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/admin/invite_join_conference_mailer/invite.html.erb @@ -1,12 +1,12 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @user.name) %>

+ -

+

-

+

-

+

diff --git a/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb b/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb index b47583325833..f3037ca64822 100644 --- a/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb @@ -1,6 +1,6 @@ -

<%= t(".confirmed_html", title: translated_attribute(@conference.title), url: @locator.url) %>

+ -

<%= t(".details_1", registration_type: translated_attribute(@registration_type.title), price: number_to_currency((@registration_type.price || 0), locale: I18n.locale, unit: Decidim.currency_unit)) %>

+
    <% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %> @@ -8,4 +8,4 @@ <% end %>
-

<%= t(".details_2") %>

+ diff --git a/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb b/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb index 209a29d28c1e..59aedf9a0590 100644 --- a/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb @@ -1,6 +1,6 @@ -

<%= t(".pending_html", title: translated_attribute(@conference.title), url: @locator.url) %>

+ -

<%= t(".details", registration_type: translated_attribute(@registration_type.title), price: number_to_currency((@registration_type.price || 0), locale: I18n.locale, unit: Decidim.currency_unit)) %>

+
    <% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %> @@ -8,4 +8,4 @@ <% end %>
-

<%= t(".confirmation_pending") %>

+ diff --git a/decidim-conferences/app/views/devise/mailer/join_conference.html.erb b/decidim-conferences/app/views/devise/mailer/join_conference.html.erb index b8c600a7c020..cb3edb920dcd 100644 --- a/decidim-conferences/app/views/devise/mailer/join_conference.html.erb +++ b/decidim-conferences/app/views/devise/mailer/join_conference.html.erb @@ -1,13 +1,13 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:conference]).conference_conference_registration_path(conference_slug: @opts[:conference]), host: @resource.organization.host) %>

+ <% if @resource.invitation_due_at %> -

<%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-conferences/spec/mailers/conference_registration_mailer_spec.rb b/decidim-conferences/spec/mailers/conference_registration_mailer_spec.rb index 104903c011d5..688a1b1caeeb 100644 --- a/decidim-conferences/spec/mailers/conference_registration_mailer_spec.rb +++ b/decidim-conferences/spec/mailers/conference_registration_mailer_spec.rb @@ -29,7 +29,7 @@ module Decidim::Conferences describe "confirmation" do let(:default_subject) { "Your conference's registration has been confirmed" } - let(:default_body) { "details in the attachment" } + let(:default_body) { "You will find the conference" } it "expect subject and body" do expect(mail.subject).to eq(default_subject) diff --git a/decidim-core/app/views/decidim/export_mailer/data_portability_export.html.erb b/decidim-core/app/views/decidim/export_mailer/data_portability_export.html.erb index 348092590d1e..8132ea4b73bb 100644 --- a/decidim-core/app/views/decidim/export_mailer/data_portability_export.html.erb +++ b/decidim-core/app/views/decidim/export_mailer/data_portability_export.html.erb @@ -1,2 +1,7 @@ -<%= t(".click_button", password: @password, date: l(Decidim.data_portability_expiry_time.from_now, format: :decidim_short) ).html_safe %>
-<%= link_to t(".download"), download_file_data_portability_url(host: @organization.host, filename: @filename), class: "button expanded hollow button--sc" %> + + + diff --git a/decidim-core/app/views/decidim/export_mailer/export.html.erb b/decidim-core/app/views/decidim/export_mailer/export.html.erb index 99da8884c7c5..2c01abff4695 100644 --- a/decidim-core/app/views/decidim/export_mailer/export.html.erb +++ b/decidim-core/app/views/decidim/export_mailer/export.html.erb @@ -1 +1,3 @@ -<%= t(".ready") %> + diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_conversation.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_conversation.html.erb index 65cb880ce439..4828626da16d 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_conversation.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_conversation.html.erb @@ -1,8 +1,8 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".admin_in_group", group: @sender.name) %>

+ -

<%= t(".intro", group: @sender.name, manager: @third_party.name) %>

+

@@ -10,8 +10,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_message.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_message.html.erb index 65cb880ce439..4828626da16d 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_message.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/comanagers_new_message.html.erb @@ -1,8 +1,8 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".admin_in_group", group: @sender.name) %>

+ -

<%= t(".intro", group: @sender.name, manager: @third_party.name) %>

+

@@ -10,8 +10,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_conversation.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_conversation.html.erb index baf61eba164f..cca7e21e2f8b 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_conversation.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_conversation.html.erb @@ -1,6 +1,6 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".intro", sender: @sender.name) %>

+

@@ -8,8 +8,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_conversation.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_conversation.html.erb index acdf8fbef97f..7c73a9ec2048 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_conversation.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_conversation.html.erb @@ -1,8 +1,8 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".admin_in_group", group: @third_party.name) %>

+ -

<%= t(".intro", sender: @sender.name, group: @third_party.name) %>

+

@@ -10,8 +10,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_message.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_message.html.erb index acdf8fbef97f..7c73a9ec2048 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_message.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_group_message.html.erb @@ -1,8 +1,8 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".admin_in_group", group: @third_party.name) %>

+ -

<%= t(".intro", sender: @sender.name, group: @third_party.name) %>

+

@@ -10,8 +10,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_message.html.erb b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_message.html.erb index baf61eba164f..cca7e21e2f8b 100644 --- a/decidim-core/app/views/decidim/messaging/conversation_mailer/new_message.html.erb +++ b/decidim-core/app/views/decidim/messaging/conversation_mailer/new_message.html.erb @@ -1,6 +1,6 @@ -

<%= t(".greeting", recipient: @recipient.name) %>

+ -

<%= t(".intro", sender: @sender.name) %>

+

@@ -8,8 +8,8 @@

-

+

-

<%= t(".outro") %>

+ diff --git a/decidim-core/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb b/decidim-core/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb index 231fba193dfc..c15792918de0 100644 --- a/decidim-core/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb +++ b/decidim-core/app/views/decidim/newsletters_opt_in_mailer/notify.html.erb @@ -1,8 +1,8 @@ -

<%= t ".hello" %>

+ -

<%= t ".body_1", organization_name: h(@organization.name) %>

+ -

<%= t ".body_2" %>

+ @@ -10,7 +10,7 @@
- <%= link_to t(".button"), decidim.newsletters_opt_in_url(token: @token, host: @organization.host), method: "PUT", class: "button", target: "_blank" %> + <%= link_to t(".button"), decidim.newsletters_opt_in_url(token: @token, host: @organization.host), method: "PUT", class: "button email-button email-button__cta", target: "_blank" %>
@@ -18,6 +18,6 @@ -

<%= t ".body_3" %>

+ -

<%= t(".greetings", organization_name: h(@organization.name), organization_url: decidim.root_url(host: @organization.host)).html_safe %>

+ diff --git a/decidim-core/app/views/decidim/notification_mailer/event_received.html.erb b/decidim-core/app/views/decidim/notification_mailer/event_received.html.erb index ea517d219cc3..bf7f755827e1 100644 --- a/decidim-core/app/views/decidim/notification_mailer/event_received.html.erb +++ b/decidim-core/app/views/decidim/notification_mailer/event_received.html.erb @@ -1,6 +1,6 @@ -

<%= @event_instance.email_greeting %>

+ -

<%= @event_instance.email_intro %>

+ <% if @event_instance.try(:safe_resource_text).present? %>
@@ -11,9 +11,9 @@ <% end %> <% if @event_instance.resource_path.present? && @event_instance.resource_title.present? %> -

+

<% end %> -

<%= @event_instance.email_outro %>

+ diff --git a/decidim-core/app/views/decidim/reported_mailer/hide.html.erb b/decidim-core/app/views/decidim/reported_mailer/hide.html.erb index 1178821e928f..3d7fbb9e4c72 100644 --- a/decidim-core/app/views/decidim/reported_mailer/hide.html.erb +++ b/decidim-core/app/views/decidim/reported_mailer/hide.html.erb @@ -1,9 +1,9 @@ -

<%= t(".hello", name: @user.name) %>

+ -

+

-

+

diff --git a/decidim-core/app/views/decidim/reported_mailer/report.html.erb b/decidim-core/app/views/decidim/reported_mailer/report.html.erb index 83a97ef3fa3e..a2a9298c96f7 100644 --- a/decidim-core/app/views/decidim/reported_mailer/report.html.erb +++ b/decidim-core/app/views/decidim/reported_mailer/report.html.erb @@ -1,6 +1,6 @@ -

<%= t(".hello", name: @user.name) %>

+ -

+

@@ -46,7 +46,7 @@
- <%= link_to t(".manage_moderations"), manage_moderations_url, class: "button", target: "_blank" %> + <%= link_to t(".manage_moderations"), manage_moderations_url, class: "button email-button email-button_cta", target: "_blank" %>
diff --git a/decidim-core/app/views/devise/mailer/confirmation_instructions.html.erb b/decidim-core/app/views/devise/mailer/confirmation_instructions.html.erb index 4920db95e1e8..120656c714c3 100644 --- a/decidim-core/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/decidim-core/app/views/devise/mailer/confirmation_instructions.html.erb @@ -1,4 +1,5 @@ -

<%= t(".greeting", recipient: @resource.email) %>

+ -

<%= t(".instruction") %>

-

<%= link_to t(".action"), confirmation_url(@resource, confirmation_token: @token, host: @resource.organization.host) %>

+ + + diff --git a/decidim-core/app/views/devise/mailer/invitation_instructions.html.erb b/decidim-core/app/views/devise/mailer/invitation_instructions.html.erb index 3f37da2c51a0..e518af3508f8 100644 --- a/decidim-core/app/views/devise/mailer/invitation_instructions.html.erb +++ b/decidim-core/app/views/devise/mailer/invitation_instructions.html.erb @@ -1,13 +1,13 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim.root_path, host: @resource.organization.host) %>

+ <% if @resource.invitation_due_at %> -

<%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-core/app/views/devise/mailer/invite_admin.html.erb b/decidim-core/app/views/devise/mailer/invite_admin.html.erb index f924b24175ac..d0733210c7e4 100644 --- a/decidim-core/app/views/devise/mailer/invite_admin.html.erb +++ b/decidim-core/app/views/devise/mailer/invite_admin.html.erb @@ -1,6 +1,6 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), 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", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-core/app/views/devise/mailer/invite_collaborator.html.erb b/decidim-core/app/views/devise/mailer/invite_collaborator.html.erb index f924b24175ac..d0733210c7e4 100644 --- a/decidim-core/app/views/devise/mailer/invite_collaborator.html.erb +++ b/decidim-core/app/views/devise/mailer/invite_collaborator.html.erb @@ -1,6 +1,6 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), 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", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-core/app/views/devise/mailer/invite_private_user.html.erb b/decidim-core/app/views/devise/mailer/invite_private_user.html.erb index b9f49338a99b..3b5e9029e09c 100644 --- a/decidim-core/app/views/devise/mailer/invite_private_user.html.erb +++ b/decidim-core/app/views/devise/mailer/invite_private_user.html.erb @@ -1,6 +1,6 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, host: @resource.organization.host) %>

+ <% if @resource.invitation_due_at %> -

<%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-core/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb b/decidim-core/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb index b4a18361b47e..68198d936fb5 100644 --- a/decidim-core/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +++ b/decidim-core/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb @@ -1,10 +1,11 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %>

+ -

<%= t("devise.mailer.invitation_instructions.someone_invited_you", application: @resource.organization.name) %>

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), 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", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-core/app/views/devise/mailer/password_change.html.erb b/decidim-core/app/views/devise/mailer/password_change.html.erb index 689c723551b9..d9f038548c4b 100644 --- a/decidim-core/app/views/devise/mailer/password_change.html.erb +++ b/decidim-core/app/views/devise/mailer/password_change.html.erb @@ -1,3 +1,3 @@ -

<%= t(".greeting", recipient: @resource.email) %>

+ -

<%= t(".message") %>

+ diff --git a/decidim-core/app/views/devise/mailer/reset_password_instructions.html.erb b/decidim-core/app/views/devise/mailer/reset_password_instructions.html.erb index a90beb25e5f9..b753d52ec67a 100644 --- a/decidim-core/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/decidim-core/app/views/devise/mailer/reset_password_instructions.html.erb @@ -1,8 +1,9 @@ -

<%= t(".greeting", recipient: @resource.email) %>

+ -

<%= t(".instruction") %>

+ -

<%= link_to t(".action"), edit_password_url(@resource, reset_password_token: @token, host: @resource.organization.host) %>

+ -

<%= t(".instruction_2") %>

-

<%= t(".instruction_3") %>

+ + + diff --git a/decidim-core/app/views/devise/mailer/unlock_instructions.html.erb b/decidim-core/app/views/devise/mailer/unlock_instructions.html.erb index 72ea9dec0fd6..cfd02b8241f8 100644 --- a/decidim-core/app/views/devise/mailer/unlock_instructions.html.erb +++ b/decidim-core/app/views/devise/mailer/unlock_instructions.html.erb @@ -1,7 +1,7 @@ -

<%= t(".greeting", recipient: @resource.email) %>

+ -

<%= t(".message") %>

+ -

<%= t(".instruction") %>

+ -

<%= link_to t(".action"), unlock_url(@resource, unlock_token: @token, host: @resource.organization.host) %>

+ diff --git a/decidim-core/lib/decidim/has_attachments.rb b/decidim-core/lib/decidim/has_attachments.rb index 93c3cc1ffcab..860800333668 100644 --- a/decidim-core/lib/decidim/has_attachments.rb +++ b/decidim-core/lib/decidim/has_attachments.rb @@ -15,28 +15,35 @@ module HasAttachments inverse_of: :attached_to, as: :attached_to - # All the attachments that are photos for this process. + # The first attachment that is a photo for this model. + # + # Returns an Attachment + def photo + @photo ||= photos.first + end + + # All the attachments that are photos for this model. # # Returns an Array def photos @photos ||= attachments.select(&:photo?) end - # All the attachments that are documents for this process. + # All the attachments that are documents for this model. # # Returns an Array def documents @documents ||= attachments.includes(:attachment_collection).select(&:document?) end - # All the attachments that are documents for this process that has a collection. + # All the attachments that are documents for this model that has a collection. # # Returns an Array def documents_with_collection documents.select(&:attachment_collection_id?) end - # All the attachments that are documents for this process that not has a collection. + # All the attachments that are documents for this model that not has a collection. # # Returns an Array def documents_without_collection diff --git a/decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb b/decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb index d1694c6503f8..33e80fd1c670 100644 --- a/decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb +++ b/decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb @@ -29,6 +29,14 @@ def title private + def resource_image_path + model.photo&.url + end + + def has_image? + true + end + def spans_multiple_dates? start_date != end_date end diff --git a/decidim-meetings/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb index dea938fc3b63..3779c459cd31 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb @@ -1,8 +1,8 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @user.name) %>

+ -

+

-

<%= link_to t(".decline", meeting_title: present(@meeting).title),routes.decline_invitation_meeting_registration_path(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %> -

<%= link_to t(".join", meeting_title: present(@meeting).title),routes.meeting_registration_url(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %> +

<%= t(".confirmed_html", title: present(@meeting).title, url: @locator.url) %>

+

<%= t(".registration_code", code: @registration.code) %>

-

<%= t(".details") %>

+ diff --git a/decidim-meetings/app/views/devise/mailer/join_meeting.html.erb b/decidim-meetings/app/views/devise/mailer/join_meeting.html.erb index 596cadf4a548..78a4967549fe 100644 --- a/decidim-meetings/app/views/devise/mailer/join_meeting.html.erb +++ b/decidim-meetings/app/views/devise/mailer/join_meeting.html.erb @@ -1,14 +1,14 @@ -

<%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %>

+ -

+

-

<%= link_to t("devise.mailer.invitation_instructions.decline"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).decline_invitation_meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %>

-

<%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: Decidim::EngineRouter.main_proxy(@opts[:meeting].component).meeting_registration_path(meeting_id: @opts[:meeting], participatory_space_id: @opts[:meeting].component.participatory_space), host: @resource.organization.host) %>

+ + <% if @resource.invitation_due_at %> -

<%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %>

+ <% end %> -

<%= t("devise.mailer.invitation_instructions.ignore").html_safe %>

+ diff --git a/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb b/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb index d6e6ef23d8a7..02a26c4ecaf9 100644 --- a/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb +++ b/decidim-meetings/spec/cells/decidim/meetings/meeting_m_cell_spec.rb @@ -19,6 +19,14 @@ module Decidim::Meetings it "renders the card" do expect(cell_html).to have_css(".card--meeting") end + + context "when an image is attached to the meeting" do + let!(:attachment) { create(:attachment, attached_to: meeting) } + + it "renders the picture" do + expect(cell_html).to have_css(".card__image") + end + end end context "when title contains special html entities" do diff --git a/decidim-meetings/spec/mailers/registration_mailer_spec.rb b/decidim-meetings/spec/mailers/registration_mailer_spec.rb index f6515491fab1..f7cfde720b19 100644 --- a/decidim-meetings/spec/mailers/registration_mailer_spec.rb +++ b/decidim-meetings/spec/mailers/registration_mailer_spec.rb @@ -18,8 +18,8 @@ module Decidim::Meetings let(:subject) { "La teva inscripciĆ³ a la trobada ha estat confirmada" } let(:default_subject) { "Your meeting's registration has been confirmed" } - let(:body) { "detalls de la" } - let(:default_body) { "details in the attachment" } + let(:body) { "arxiu adjunt" } + let(:default_body) { "You will find the meeting" } include_examples "user localised email" end