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
Remove footer_content setting
Oliver Günther8d2bd8fdaf39
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rbindex 4ae296f9e73..9d89d316f21 100644--- a/app/helpers/application_helper.rb+++ b/app/helpers/application_helper.rb@@ -438,25 +438,6 @@ module ApplicationHelper"<meta name='ROBOTS' content='#{h(content)}' />".html_safeend- #- # Returns the footer text displayed in the layout file.- #- def footer_content- elements = []- elements << I18n.t(:text_powered_by, link: link_to(OpenProject::Info.app_name,- OpenProject::Info.url))- unless OpenProject::Footer.content.nil?- OpenProject::Footer.content.each do |name, value|- content = value.respond_to?(:call) ? value.call : value- if content- elements << content_tag(:span, content, class: "footer_#{name}")- end- end- end- elements << Setting.additional_footer_content if Setting.additional_footer_content.present?- elements.join(', ').html_safe- end-def permitted_paramsPermittedParams.new(params, current_user)enddiff --git a/config/constants/settings/definitions.rb b/config/constants/settings/definitions.rbindex b67ac6a4bda..9f58722e691 100644--- a/config/constants/settings/definitions.rb+++ b/config/constants/settings/definitions.rb@@ -37,10 +37,6 @@ Settings::Definition.define doadd :activity_days_default,default: 30- add :additional_footer_content,- format: :string,- default: nil-add :after_first_login_redirect_url,format: :string,default: nil,diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rbindex 88c10968910..51b8b2438bf 100644--- a/spec/helpers/application_helper_spec.rb+++ b/spec/helpers/application_helper_spec.rb@@ -32,52 +32,6 @@ describe ApplicationHelper, type: :helper doinclude ApplicationHelperinclude WorkPackagesHelper- describe 'footer_content' do- context 'no additional footer content' do- before do- OpenProject::Footer.content = nil- end-- it {- expect(footer_content).to eq(I18n.t(:text_powered_by, link: link_to(OpenProject::Info.app_name, OpenProject::Info.url)))- }- end-- context 'string as additional footer content' do- before do- OpenProject::Footer.content = nil- OpenProject::Footer.add_content('openproject', 'footer')- end-- it {- expect(footer_content.include?(I18n.t(:text_powered_by,- link: link_to(OpenProject::Info.app_name, OpenProject::Info.url)))).to be_truthy- }-- it { expect(footer_content.include?("<span class=\"footer_openproject\">footer</span>")).to be_truthy }- end-- context 'proc as additional footer content' do- before do- OpenProject::Footer.content = nil- OpenProject::Footer.add_content('openproject', Proc.new { Date.parse(Time.now.to_s) })- end-- it {- expect(footer_content.include?("<span class=\"footer_openproject\">#{Date.parse(Time.now.to_s)}</span>")).to be_truthy- }- end-- context 'proc which returns nothing' do- before do- OpenProject::Footer.content = nil- OpenProject::Footer.add_content('openproject', Proc.new { 'footer' if false })- end-- it { expect(footer_content.include?("<span class=\"footer_openproject\">")).to be_falsey }- end- end-describe '.link_to_if_authorized' dolet(:project) { create :valid_project }let(:project_member) do