Skip to content
Snippets Groups Projects
engine.rb 1.16 KiB
Newer Older
Oliver Günther's avatar
Oliver Günther committed
require 'active_support/dependencies'
require 'open_project/plugins'

module OpenProject::Souvap
  class Engine < ::Rails::Engine
    engine_name :openproject_Souvap

    include OpenProject::Plugins::ActsAsOpEngine

    patch_with_namespace :Redmine, :MenuManager, :TopMenuHelper
Oliver Günther's avatar
Oliver Günther committed
    patch_with_namespace :OpenProject, :CustomStyles, :ColorThemes
Oliver Günther's avatar
Oliver Günther committed

    assets %w(
      souvap/logo.svg
    )

    register(
      'openproject-souvap',
      :author_url => 'https://openproject.org',
    ) do
      menu :top_menu,
           :central_navigation,
           nil,
           partial: 'souvap/menu/top_menu_node'
    end

    add_api_path :linked_applications do
      "#{root}/linked_applications"
    end

    add_api_endpoint 'API::V3::Root' do
      mount ::API::V3::LinkedApplications::LinkedApplicationsAPI
    end

    initializer 'souvap.settings' do
      ::Settings::Definition.add 'souvap_navigation_url',
                                 default: nil,
                                 format: :string

      ::Settings::Definition.add 'souvap_navigation_secret',
                                 default: nil,
                                 format: :string
Oliver Günther's avatar
Oliver Günther committed
    end
  end
end

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.