mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
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
2 changed files with 7 additions and 1 deletions
|
@ -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 a new issue