Project

General

Profile

Adding sub view to project page

Added by Alex Shemshurenko over 10 years ago

Hi.
I have created plugin for redmine that displays issues with some additional info.
Plugin works ok.
Now i want this information to be shown on project page under issues summary.
ive read this article
http://www.redmine.org/boards/3/topics/33949

and rednder_on approach looks very promising.
ive added new plugin with hook for view_projects_show_right
code looks like this
@# lib/release_history_hook.rb

class ReleaseHistoryHook < Redmine::Hook::ViewListener
render_on :view_projects_show_right, :partial => 'bottlenecks/view_issues'
end@

bottlenecks plugin tree structure is like this
/opt/redmine/plugins/bottlenecks/
├── app
│   ├── controllers
│   │   ├── bottlenecks_controller.rb
│   │   └── bottlenecks_controller.rb~
│   ├── helpers
│   │   ├── bottlenecks_helper.rb
│   │   └── bottlenecks_helper.rb~
│   ├── models
│   └── views
│   └── bottlenecks
│   ├── view_issues.html.erb
│   ├── view_issues.html.erb~
│   ├── view_issues.html_original.erb
│   ├── view_issues.html_original.erb~
│   └── view_users.html.erb
├── assets
│   ├── images
│   ├── javascripts
│   └── stylesheets
├── config
│   ├── locales
│   │   └── en.yml
│   └── routes.rb
├── db
│   └── migrate
├── init.rb
├── init.rb~
├── lib
│   └── tasks
├── README.rdoc
└── test
├── fixtures
├── functional
│   └── bottlenecks_controller_test.rb
├── integration
├── test_helper.rb
└── unit

21 directories, 16 files

Ive tried to specify full path,path with extensions ...all the combinations.
When i run redmine and access project page its always gives me 404 error.
I clearly misunderstand something very basic.
I just cant find more information on that subject.
What am i doing wrong?
Also render_on seems to be deprecated. What can i use instead?