ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Refactor project settings menu to use Redmine::MenuManager instead of 'private' array

Added by Gregor Schmidt at 2011-03-08 11:10 am

Currrently most menus are configured in lib/redmine.rb using the Redmine::MenuManager.map API. This enables easy extension from within plugins. The project settings menu is not managed this way. Instead all available settings are defined in a local variable in a helper method in the projects_helper.

Since I assume, that plugins would also like to store per-project settings it would be nice, if the project settings menu would also use the MenuMapper API to store which tabs are available. I guess, there would be some refactoring needed, since the MenuMapper API and the Array of Hashes used for the project settings tab differ slightly.

Before going down that road, I would like to hear some basic feedback for that idea. Also, do you think, that this change would ease plugin development significantly? Do you think, that this might be merged into Chili once it is implemented? (A 'yes, why not' would greatly increase my motivation :))

So: thoughts?


Replies (2)

RE: Refactor project settings menu to use Redmine::MenuManager instead of 'private' array - Added by Eric Davis at 2011-03-09 12:32 am

+1 Adding new "tabs" to the project menu is a pain. I'd also like to see this on the Admin > Settings too.

If you want some motivation, this is all of the hacks I had to do to add a new tab to Admin > Users > Edit. Not too bad but way too much work and difficult to keep compatible with core changes.

Eric Davis

(1-2/2)