Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. [Solved] Patching/overriding existent OP view via plugin.

[Solved] Patching/overriding existent OP view via plugin.

Added by Alexander Aleschenko about 1 year ago

Hello

I'm trying to build simple plugin which changes app's controller and view. Controllers(and models) can be patched and it works ok, but there's problem with views. As I understand, rails looks up view file in app scope at first and if it not found tries to check view file in the engine(plugin).

Is there a way to completely override OP's view via plugin? Or, ideally, inject "render" inside erb at specific place without changing OP app itself?


Replies (3)

RE: Patching/overriding existent OP view via plugin. - Added by Markus Kahl about 1 year ago

HI Alexander,

have you checked our proto_plugin? That should give you some hints as to how to inject your own views into the existing OpenProject ones where possible.

RE: Patching/overriding existent OP view via plugin. - Added by Alexander Aleschenko about 1 year ago

It shows only adding new views, not changing or replacing existing.

RE: Patching/overriding existent OP view via plugin. - Added by Alexander Aleschenko about 1 year ago

Looks like OpenProject::Plugins::ActsAsOpEngine#override_core_views! inside engine.rb does the job.

  • (1 - 3/3)
Loading...