Generalise implementation of view / controller hooks for easier plugin development
I have been developing several plugins for our Redmine, and hooks are a really good mechanism overall, but I have been struggling with the way they are partially implemented or even missing in some views / controllers.
It would be nice to have hooks implemented for all forms / controllers, equally.
Let me give some examples:
- IssuesController has hooks for the Create action, but not for the Update action
- IssueStatuses form partial has a call_hook, but it does not add the form itself (f) as a param, which makes it impossible to add additional elements to the form itself. The related IssueStatusesController does not have hooks for the Create or Update action
- There are hooks for the Users form, and the form is passed as a param, which is nice, but there is no hook at all in the UsersController (Create, Update...)