FIX: If a site has no logo, don't show a broken image in the digest.
This commit is contained in:
parent
bddd7f5ea3
commit
eafde36228
|
@ -28,6 +28,8 @@ module UserNotificationsHelper
|
|||
def logo_url
|
||||
logo_url = SiteSetting.digest_logo_url
|
||||
logo_url = SiteSetting.logo_url if logo_url.blank?
|
||||
|
||||
return nil if logo_url.blank?
|
||||
if logo_url !~ /http(s)?\:\/\//
|
||||
logo_url = "#{Discourse.base_url}#{logo_url}"
|
||||
end
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
<tr>
|
||||
<td style="padding: 10px 10px; background-color: #<%= @header_color %>;">
|
||||
<a href="<%= Discourse.base_url %>">
|
||||
<img src="<%= logo_url %>" style="max-height: 35px; min-height: 35px; height: 35px;" class='site-logo'></a>
|
||||
<%- if logo_url.blank? %>
|
||||
<%= SiteSetting.title %>
|
||||
<%- else %>
|
||||
<img src="<%= logo_url %>" style="max-height: 35px; min-height: 35px; height: 35px;" class='site-logo'></a>
|
||||
<%- end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue