Project

General

Profile

Custom menu link per projects

Added by ionut rascanu about 13 years ago

Hi all,
I want to addd to my Redmine a custom link menu, but particualry for each project and not a generalay one (currently there is a plugin that is doing this).
As I'm not a good programmer, is anyway that can help me with this? Or some minimum changes to soemthing that exist now? Or some work-arounds?
Thank you, Ionut


Replies (2)

RE: Custom menu link per projects - Added by Crtani Filmovi about 13 years ago

Extending the project menu

Now, let's consider that the polls are defined at project level (even if it's not the case in our example poll model). So we would like to add the Polls tab to the project menu instead.
Open init.rb and replace the line that was added just before with these 2 lines:

1 Redmine::Plugin.register :redmine_polls do
2 [...]
3
4 permission :polls, { :polls => [:index, :vote] }, :public => true
5 menu :project_menu, :polls, { :controller => 'polls', :action => 'index' }, :caption => 'Polls', :after => :activity, :param => :project_id
6 end

The second line adds our Polls tab to the project menu, just after the activity tab.
The first line is required and declares that our 2 actions from PollsController are public. We'll come back later to explain this with more details.
<Spam link removed by Mischa The Evil>

    (1-2/2)