Feature #2073

Hook for repository page

Added by Marina Tarazanova over 14 years ago. Updated over 14 years ago.

Status:ClosedStart date:2008-10-23
Priority:NormalDue date:
Assignee:Eric Davis% Done:


Category:Plugin API
Target version:0.8


I've created a small plugin for Redmine.
It adds a link "Synhronize with PRO", which laгnches a script on server of my customers.
So could you please add a hook on the respositiry page show.rhtml just after the link "Statistics":

<%= call_hook(:view_project_repository_link, { :project => @project}) %>

And for english nd russian translation of the link name:

label_synhronize_with_pro: Synhronize with PRO - to en.yml
label_synhronize_with_pro: Синхронизировать с PRO - to ru.yml

Associated revisions

Revision 1948
Added by Eric Davis over 14 years ago

Added hook :view_repositories_show_contextual to allow adding items to the
repository's contextual menu.



#1 Updated by Eric Davis over 14 years ago

  • Due date deleted (2008-10-25)
  • Status changed from New to Closed
  • Target version set to 0.8
  • % Done changed from 0 to 100
  • Resolution set to Fixed

I've added the hook called :view_repositories_show_contextual in r1948. For example, to create a link to Google you can do this in your plugin:

class MyClassNameForHooks  < Redmine::Hook::ViewListener
  def view_repositories_show_contextual(context = { })
    link_to("This is a hook on #{context[:repository].id} with a link to Google", "http://google.com")

Also available in: Atom PDF