mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Again, try to get a flexible absolute logo_url
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="<%= Discourse.base_url %>">
|
<a href="<%= Discourse.base_url %>">
|
||||||
<%= image_tag(SiteSetting.logo_url, style: "height: 50px; margin-bottom: 15px; ") %>
|
<img src="<%= logo_url %>" style="height: 50px; margin-bottom: 15px;"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -13,10 +13,16 @@ class EmailRenderer
|
|||||||
def html
|
def html
|
||||||
formatted_body = EmailStyles.new(PrettyText.cook(text, environment: 'email')).format
|
formatted_body = EmailStyles.new(PrettyText.cook(text, environment: 'email')).format
|
||||||
|
|
||||||
|
logo_url = SiteSetting.logo_url
|
||||||
|
if logo_url !~ /http(s)?\:\/\//
|
||||||
|
logo_url = "#{Discourse.base_url}#{logo_url}"
|
||||||
|
end
|
||||||
|
|
||||||
ActionView::Base.new(Rails.configuration.paths["app/views"]).render(
|
ActionView::Base.new(Rails.configuration.paths["app/views"]).render(
|
||||||
template: 'email/template',
|
template: 'email/template',
|
||||||
format: :html,
|
format: :html,
|
||||||
locals: { html_body: formatted_body }
|
locals: { html_body: formatted_body,
|
||||||
|
logo_url: logo_url }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user