Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp/0.23 images #84

Draft
wants to merge 5 commits into
base: release/0.23-stable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions decidim-blogs/app/views/decidim/blogs/posts/_posts.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div class="row small-12">
<% paginate_posts.each do |post| %>
<div class="card card--post">
<% if post.photo.present? %>
<%= image_tag post.photo.url, class: "card__image" %>
<% end %>
<div class="card__content">
<div class="card__header">
<%= link_to post, class: "card__link" do %>
Expand Down
7 changes: 7 additions & 0 deletions decidim-blogs/spec/system/explore_posts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p><%= t("devise.mailer.invitation_instructions.hello", email: @user.name) %></p>
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @user.name) %></p>

<p>
<p class="email-instructions">
<%= t ".invited_you_to_join_a_conference", invited_by: @invited_by.name, application: @user.organization.name %>
</p>

<p>
<p class="email-button email-button__cta cta-decline">
<%= link_to t(".decline", conference_title: translated_attribute(@conference.title)),routes.decline_invitation_conference_registration_type_conference_registration_path(conference_slug: @conference.slug, registration_type_id: @registration_type.id) %>
</p>
<p>
<p class="email-button email-button__cta cta-accept">
<%= link_to t(".registration", conference_title: translated_attribute(@conference.title)),routes.conference_registration_type_conference_registration_url(conference_slug: @conference.slug, registration_type_id: @registration_type.id) %>
</p>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p><%= t(".confirmed_html", title: translated_attribute(@conference.title), url: @locator.url) %></p>
<p class="email-greeting"><%= t(".confirmed_html", title: translated_attribute(@conference.title), url: @locator.url) %></p>

<p><%= 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)) %></p>
<p class="email-instructions"><%= 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)) %></p>

<ul>
<% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %>
<li><%= present(conference_meeting).title %> </li>
<% end %>
</ul>

<p><%= t(".details_2") %></p>
<p class="email-instructions"><%= t(".details_2") %></p>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p><%= t(".pending_html", title: translated_attribute(@conference.title), url: @locator.url) %></p>
<p class="email-greeting"><%= t(".pending_html", title: translated_attribute(@conference.title), url: @locator.url) %></p>

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

<ul>
<% @registration_type.conference_meetings.order(:start_time).each do |conference_meeting| %>
<li><%= present(conference_meeting).title %> </li>
<% end %>
</ul>

<p><%= t(".confirmation_pending") %></p>
<p class="email-small email-closing"><%= t(".confirmation_pending") %></p>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>

<p>
<p class="email-instructions">
<%= t("decidim.conferences.admin.invite_join_conference_mailer.invite.invited_you_to_join_a_conference", invited_by: @resource.invited_by.name, application: @resource.organization.name) %>
</p>

<p><%= 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) %></p>
<p class="email-button email-button__cta"><%= 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) %></p>

<% if @resource.invitation_due_at %>
<p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<% end %>

<p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
<%= t(".click_button", password: @password, date: l(Decidim.data_portability_expiry_time.from_now, format: :decidim_short) ).html_safe %><br>
<%= link_to t(".download"), download_file_data_portability_url(host: @organization.host, filename: @filename), class: "button expanded hollow button--sc" %>
<p class="email-instructions">
<%= t(".click_button", password: @password, date: l(Decidim.data_portability_expiry_time.from_now, format: :decidim_short) ).html_safe %><br>
</p>

<p class="email-button email-button__cta">
<%= link_to t(".download"), download_file_data_portability_url(host: @organization.host, filename: @filename), class: "button expanded hollow button--sc" %>
</p>
4 changes: 3 additions & 1 deletion decidim-core/app/views/decidim/export_mailer/export.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<%= t(".ready") %>
<p class="email-instructions">
<%= t(".ready") %>
</p>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".admin_in_group", group: @sender.name) %></p>
<p class="email-instructions email-small"><%= t(".admin_in_group", group: @sender.name) %></p>

<p><%= t(".intro", group: @sender.name, manager: @third_party.name) %></p>
<p class="email-instructions"><%= t(".intro", group: @sender.name, manager: @third_party.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.profile_conversation_url(nickname: @sender.nickname, id: @conversation.id, host: @host), decidim.profile_conversation_url(nickname: @sender.nickname, id: @conversation.id, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".admin_in_group", group: @sender.name) %></p>
<p class="email-instructions email-small"><%= t(".admin_in_group", group: @sender.name) %></p>

<p><%= t(".intro", group: @sender.name, manager: @third_party.name) %></p>
<p class="email-instructions"><%= t(".intro", group: @sender.name, manager: @third_party.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.profile_conversation_url(nickname: @sender.nickname, id: @conversation.id, host: @host), decidim.profile_conversation_url(nickname: @sender.nickname, id: @conversation.id, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".intro", sender: @sender.name) %></p>
<p class="email-instructions"><%= t(".intro", sender: @sender.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.conversation_url(@conversation, host: @host), decidim.conversation_url(@conversation, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".admin_in_group", group: @third_party.name) %></p>
<p class="email-instructions email-small"><%= t(".admin_in_group", group: @third_party.name) %></p>

<p><%= t(".intro", sender: @sender.name, group: @third_party.name) %></p>
<p class="email-instructions"><%= t(".intro", sender: @sender.name, group: @third_party.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.profile_conversation_url(nickname: @third_party.nickname, id: @conversation.id, host: @host), decidim.profile_conversation_url(nickname: @third_party.nickname, id: @conversation.id, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".admin_in_group", group: @third_party.name) %></p>
<p class="email-instructions email-small"><%= t(".admin_in_group", group: @third_party.name) %></p>

<p><%= t(".intro", sender: @sender.name, group: @third_party.name) %></p>
<p class="email-instructions"><%= t(".intro", sender: @sender.name, group: @third_party.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.profile_conversation_url(nickname: @third_party.nickname, id: @conversation.id, host: @host), decidim.profile_conversation_url(nickname: @third_party.nickname, id: @conversation.id, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<p><%= t(".greeting", recipient: @recipient.name) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @recipient.name) %></p>

<p><%= t(".intro", sender: @sender.name) %></p>
<p class="email-instructions"><%= t(".intro", sender: @sender.name) %></p>

<blockquote>
<p>
<em><%= @message %></em>
</p>
</blockquote>

<p>
<p class="email-button email-button__cta">
<%= link_to decidim.conversation_url(@conversation, host: @host), decidim.conversation_url(@conversation, host: @host) %>
</p>

<p><%= t(".outro") %></p>
<p class="email-closing"><%= t(".outro") %></p>
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<p><%= t ".hello" %></p>
<p class="email-greeting"><%= t ".hello" %></p>

<p><%= t ".body_1", organization_name: h(@organization.name) %></p>
<p class="email-instructions"><%= t ".body_1", organization_name: h(@organization.name) %></p>

<p><%= t ".body_2" %></p>
<p class="email-instructions"><%= t ".body_2" %></p>

<table class="button radius" style="margin: 16px auto;">
<tr>
<td>
<table>
<tr>
<td>
<%= 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" %>
</td>
</tr>
</table>
</td>
</tr>
</table>

<p><%= t ".body_3" %></p>
<p class="email-instructions"><%= t ".body_3" %></p>

<p><%= t(".greetings", organization_name: h(@organization.name), organization_url: decidim.root_url(host: @organization.host)).html_safe %></p>
<p class="email-closing"><%= t(".greetings", organization_name: h(@organization.name), organization_url: decidim.root_url(host: @organization.host)).html_safe %></p>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p><%= @event_instance.email_greeting %></p>
<p class="email-greeting"><%= @event_instance.email_greeting %></p>

<p><%= @event_instance.email_intro %></p>
<p class="email-instructions"><%= @event_instance.email_intro %></p>

<% if @event_instance.try(:safe_resource_text).present? %>
<blockquote>
Expand All @@ -11,9 +11,9 @@
<% end %>

<% if @event_instance.resource_path.present? && @event_instance.resource_title.present? %>
<p>
<p class="email-button email-button__cta">
<%= link_to @event_instance.resource_title, @event_instance.resource_url %>
</p>
<% end %>

<p><%= @event_instance.email_outro %></p>
<p class="email-closing"><%= @event_instance.email_outro %></p>
6 changes: 3 additions & 3 deletions decidim-core/app/views/decidim/reported_mailer/hide.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<p><%= t(".hello", name: @user.name) %></p>
<p class="email-greeting"><%= t(".hello", name: @user.name) %></p>

<p>
<p class="email-instructions">
<%= t(".report_html", { url: reported_content_url }) %>
</p>

<p>
<p class="email-button email-button__cta">
<%= link_to t(".manage_moderations"), manage_moderations_url %>
</p>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p><%= t(".hello", name: @user.name) %></p>
<p class="email-greeting"><%= t(".hello", name: @user.name) %></p>

<p>
<p class="email-instructions">
<%= t(".report_html", { url: reported_content_url }) %>
</p>

Expand Down Expand Up @@ -46,7 +46,7 @@
<table>
<tr>
<td>
<%= 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" %>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<p><%= t(".greeting", recipient: @resource.email) %></p>
<p class="email-greeting"><%= t(".greeting", recipient: @resource.email) %></p>

<p><%= t(".instruction") %></p>
<p><%= link_to t(".action"), confirmation_url(@resource, confirmation_token: @token, host: @resource.organization.host) %></p>
<p class="email-instructions"><%= t(".instruction") %></p>

<p class="email-button email-button__cta"><%= link_to t(".action"), confirmation_url(@resource, confirmation_token: @token, host: @resource.organization.host) %></p>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>

<p>
<p class="email-instructions">
<%= t("devise.mailer.invitation_instructions.someone_invited_you", application: @resource.organization.name) %>
</p>

<p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim.root_path, host: @resource.organization.host) %></p>
<p class="email-button email-button__cta"><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token, invite_redirect: decidim.root_path, host: @resource.organization.host) %></p>

<% if @resource.invitation_due_at %>
<p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<% end %>

<p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
10 changes: 5 additions & 5 deletions decidim-core/app/views/devise/mailer/invite_admin.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>
<p class="email-greeting"><%= t("devise.mailer.invitation_instructions.hello", email: @resource.name) %></p>

<p>
<p class="email-instructions">
<% if @resource.invited_by.present? %>
<%= t("devise.mailer.invitation_instructions.invited_you_as_admin", invited_by: @resource.invited_by.name, application: @resource.organization.name) %>
<% else %>
<%= t("devise.mailer.invitation_instructions.someone_invited_you_as_admin", application: @resource.organization.name) %>
<% end %>
</p>

<p><%= 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) %></p>
<p class="email-button email-button__cta"><%= 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) %></p>

<% if @resource.invitation_due_at %>
<p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<p class="email-small"><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :long)) %></p>
<% end %>

<p><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
<p class="email-small email-closing"><%= t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
Loading