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: Logo was missing when no CustomStyle was set.
Wieland Lindenthal53b38b54b8e6
diff --git a/app/views/custom_styles/_inline_css.erb b/app/views/custom_styles/_inline_css.erbindex 1a46a39301b..71df0a90e25 100644--- a/app/views/custom_styles/_inline_css.erb+++ b/app/views/custom_styles/_inline_css.erb@@ -28,21 +28,6 @@ See docs/COPYRIGHT.rdoc for more details.++#%><style type="text/css">- <%- logo_url =- if CustomStyle.current.logo.present?- custom_style_logo_path(digest: CustomStyle.current.digest, filename: CustomStyle.current.logo_identifier)- elsif CustomStyle.current.theme_logo.present?- asset_path(CustomStyle.current.theme_logo)- else- asset_path("logo_openproject_white_big.png")- end- %>-- #logo .home-link {- background-image: url(<%= logo_url %>);- }-:root {<% DesignColor.overwritten.each do |design_color| %>--<%= design_color.variable %>: <%= design_color.hexcode %>;diff --git a/app/views/custom_styles/_inline_css_logo.erb b/app/views/custom_styles/_inline_css_logo.erbnew file mode 100644index 00000000000..3269ada6a19--- /dev/null+++ b/app/views/custom_styles/_inline_css_logo.erb@@ -0,0 +1,47 @@+<%#-- copyright+OpenProject is an open source project management software.+Copyright (C) 2012-2020 the OpenProject GmbH++This program is free software; you can redistribute it and/or+modify it under the terms of the GNU General Public License version 3.++OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+Copyright (C) 2006-2013 Jean-Philippe Lang+Copyright (C) 2010-2013 the ChiliProject Team++This program is free software; you can redistribute it and/or+modify it under the terms of the GNU General Public License+as published by the Free Software Foundation; either version 2+of the License, or (at your option) any later version.++This program is distributed in the hope that it will be useful,+but WITHOUT ANY WARRANTY; without even the implied warranty of+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+GNU General Public License for more details.++You should have received a copy of the GNU General Public License+along with this program; if not, write to the Free Software+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.++See docs/COPYRIGHT.rdoc for more details.++++#%>++<% cache(CustomStyle.current) do %>+ <style type="text/css">+ <% logo_url = asset_path("logo_openproject_white_big.png") %>+ <% if EnterpriseToken.allows_to?(:define_custom_style) && CustomStyle.try(:current).present? %>+ <%+ if CustomStyle.current.logo.present?+ logo_url = custom_style_logo_path(digest: CustomStyle.current.digest, filename: CustomStyle.current.logo_identifier)+ elsif CustomStyle.current.theme_logo.present?+ logo_url = asset_path(CustomStyle.current.theme_logo)+ end+ %>+ <% end %>++ #logo .home-link {+ background-image: url(<%= logo_url %>);+ }+ </style>+<% end %>\ No newline at end of filediff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erbindex 7258ab4d03a..6839aa51b4b 100644--- a/app/views/layouts/base.html.erb+++ b/app/views/layouts/base.html.erb@@ -84,6 +84,7 @@ See docs/COPYRIGHT.rdoc for more details.<%= call_hook :view_layouts_base_html_head %><!-- page specific tags --><%= content_for(:header_tags) if content_for?(:header_tags) %>+ <%= render partial: "custom_styles/inline_css_logo" %><% if EnterpriseToken.allows_to?(:define_custom_style) && CustomStyle.try(:current).present? %><% cache(CustomStyle.current) do %><%= render partial: "custom_styles/inline_css" %>