OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
fix custom logo in mail
ulfertsaff06fe91a0e
diff --git a/app/helpers/mail_notification_helper.rb b/app/helpers/mail_notification_helper.rbindex 9e550b118bb..577356108e6 100644--- a/app/helpers/mail_notification_helper.rb+++ b/app/helpers/mail_notification_helper.rb@@ -37,20 +37,20 @@ module MailNotificationHelperif current_logo.present?logo_file = current_logo.local_filelogo = File.read(logo_file)- suffix = MIME::Types.type_for(logo_file.path).first.content_type+ content_type = MIME::Types.type_for(logo_file.path).first.content_typeelselogo = File.read(Rails.root.join('app/assets/images/logo_openproject_narrow.svg'))- suffix = "svg+xml"+ content_type = "image/svg+xml"end- email_image_tag(logo, suffix, **options)+ email_image_tag(logo, content_type, **options)end- def email_image_tag(image, suffix, **options)+ def email_image_tag(image, content_type, **options)image_string = image.to_sbase64_string = Base64.strict_encode64(image_string)- image_tag "data:image/#{suffix};base64,#{base64_string}", **options+ image_tag "data:#{content_type};base64,#{base64_string}", **optionsenddef unique_reasons_of_notifications(notifications)