mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
merge ProjectHelper into ProjectsHelper
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
class Projects::CreationWizardStatusComponent < ApplicationComponent
|
||||
include ApplicationHelper
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
|
||||
attr_reader :project, :current_user,
|
||||
:artifact_id, :artifact_work_package
|
||||
|
||||
@@ -34,7 +34,7 @@ module Projects
|
||||
include OpPrimer::ComponentHelpers
|
||||
include OpTurbo::Streamable
|
||||
include ApplicationHelper
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
|
||||
def initialize(project:, custom_fields_by_section:, current_section:)
|
||||
super
|
||||
|
||||
@@ -1,37 +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.
|
||||
#++
|
||||
|
||||
module ProjectHelper
|
||||
def project_creation_wizard_name(project)
|
||||
I18n.t(project.project_creation_wizard_artifact_name,
|
||||
default: :project_initiation_request,
|
||||
scope: "settings.project_initiation_request.name.options")
|
||||
end
|
||||
end
|
||||
@@ -92,4 +92,10 @@ module ProjectsHelper
|
||||
def supported_export_formats
|
||||
::Exports::Register.list_formats(Project).map(&:to_s)
|
||||
end
|
||||
|
||||
def project_creation_wizard_name(project)
|
||||
I18n.t(project.project_creation_wizard_artifact_name,
|
||||
default: :project_initiation_request,
|
||||
scope: "settings.project_initiation_request.name.options")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#++
|
||||
|
||||
class ProjectArtifactsMailer < ApplicationMailer
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include Exports::PDF::Common::Macro
|
||||
|
||||
def creation_wizard_submitted(user, project, artifact_work_package)
|
||||
|
||||
@@ -39,7 +39,7 @@ class Project::PDFExport::ProjectInitiation < Exports::Exporter
|
||||
include Project::PDFExport::Common::ProjectAttributes
|
||||
include Project::PDFExport::ProjectInitiation::Cover
|
||||
include Project::PDFExport::ProjectInitiation::Styles
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
|
||||
attr_accessor :pdf
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
module Projects::CreationWizard
|
||||
class CreateArtifactWorkPackageService < ::BaseServices::BaseContracted
|
||||
include Contracted
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include ArtifactExporter
|
||||
include Rails.application.routes.url_helpers
|
||||
prepend Projects::Concerns::UpdateDemoData
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
module Projects::CreationWizard
|
||||
class ReuploadArtifactOnStatusChangesService
|
||||
include Contracted
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include ArtifactExporter
|
||||
include Rails.application.routes.url_helpers
|
||||
prepend Projects::Concerns::UpdateDemoData
|
||||
|
||||
@@ -33,7 +33,7 @@ module Overviews
|
||||
extend Dry::Initializer
|
||||
|
||||
include ApplicationHelper
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include Redmine::I18n
|
||||
|
||||
option :project
|
||||
|
||||
@@ -32,7 +32,7 @@ require "rails_helper"
|
||||
|
||||
RSpec.describe Projects::CreationWizardStatusComponent, type: :component do
|
||||
include ApplicationHelper
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
let(:current_user) { build_stubbed(:user) }
|
||||
|
||||
@@ -34,7 +34,7 @@ require_relative "../../projects/exporter/exportable_project_context"
|
||||
|
||||
RSpec.describe Project::PDFExport::ProjectInitiation do
|
||||
include PDFExportSpecUtils
|
||||
include ProjectHelper
|
||||
include ProjectsHelper
|
||||
include Redmine::I18n
|
||||
|
||||
include_context "with a project with an arrangement of custom fields"
|
||||
|
||||
Reference in New Issue
Block a user