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
Extend banner for team planners
Oliver Günthera9abaed22de3
diff --git a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rbindex 25e4de27a02..2e02e579725 100644--- a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb+++ b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb@@ -6,7 +6,7 @@ module ::TeamPlannerbefore_action :build_plan_view, only: %i[new]before_action :find_plan_view, only: %i[destroy]- guard_enterprise_feature(:team_planner_view, except: %i[index]) do+ guard_enterprise_feature(:team_planner_view, except: %i[index overview]) doredirect_to action: :indexenddiff --git a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erbindex d38e1cf1a45..a68d3a7fa71 100644--- a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb+++ b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb@@ -15,4 +15,11 @@end%>-<%= render ::TeamPlanner::Overview::TableComponent.new(rows: @views, current_user: current_user) %>+<%=+ render(EnterpriseEdition::BannerComponent.new(+ :team_planner_view,+ variant: :large,+ video: "enterprise/team-planner-animation.mp4"+ )) do %>+ <%= render ::TeamPlanner::Overview::TableComponent.new(rows: @views, current_user: current_user) %>+<% end %>diff --git a/modules/team_planner/spec/controllers/team_planner/team_planner_controller_spec.rb b/modules/team_planner/spec/controllers/team_planner/team_planner_controller_spec.rbdeleted file mode 100644index 92a48962adb..00000000000--- a/modules/team_planner/spec/controllers/team_planner/team_planner_controller_spec.rb+++ /dev/null@@ -1,47 +0,0 @@-# frozen_string_literal: true--#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 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 COPYRIGHT and LICENSE files for more details.-#++--require "spec_helper"-require_relative "../../../../../spec/controllers/shared_upsell_examples"--RSpec.describe TeamPlanner::TeamPlannerController do- let(:user) { create(:admin) }- let(:project) { create(:project) }-- before do- login_as user-- # We need to set this as the team planner controller needs to be used in the context of a project.- # Without a project, any action will result in a 403 forbidden response.- controller.instance_variable_set(:@project, project)- end-- it_behaves_like "it has an upsell action"-enddiff --git a/modules/team_planner/spec/features/team_planner_upsell_spec.rb b/modules/team_planner/spec/features/team_planner_upsell_spec.rbindex d392095d635..c88b241a3bc 100644--- a/modules/team_planner/spec/features/team_planner_upsell_spec.rb+++ b/modules/team_planner/spec/features/team_planner_upsell_spec.rb@@ -40,21 +40,21 @@ RSpec.describe "Team planner index",login_as current_userend- it "redirects routes to upsell" do+ it "shows an upsell banner" dovisit team_planners_path- expect(page).to have_enterprise_upsell_page(:premium)+ expect(page).to have_enterprise_banner(:premium)visit project_team_planners_path(project)- expect(page).to have_enterprise_upsell_page(:premium)+ expect(page).to have_enterprise_banner(:premium)visit new_project_team_planners_path(project)- expect(page).to have_enterprise_upsell_page(:premium)+ expect(page).to have_enterprise_banner(:premium)visit project_team_planner_path(project, id: "new")- expect(page).to have_enterprise_upsell_page(:premium)+ expect(page).to have_enterprise_banner(:premium)endenddiff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rbindex 8e333d6fcfc..1e8ec5d54e8 100644--- a/spec/controllers/custom_styles_controller_spec.rb+++ b/spec/controllers/custom_styles_controller_spec.rb@@ -59,8 +59,6 @@ RSpec.describe CustomStylesController doendend- it_behaves_like "it has an upsell action"-describe "#create", with_ee: %i[define_custom_style] dolet(:custom_style) { CustomStyle.new }let(:params) do