roadrunner  committed 70408ad

[svn r4592] Add option to open hudson page in new tab/browser. Closes #2553.

  • Participants
  • Parent commits e6df459

Comments (0)

Files changed (1)

File 0.10/HudsonTrac/

 		      'The url of the hudson main page to which the trac nav ' +
 		      'entry should link; if empty, no entry is created in ' +
 		      'the nav bar. This may be a relative url.')
+    disp_tab = BoolOption('hudson', 'display_in_new_tab', 'false',
+		          'Open hudson page in new tab/window')
     # INavigationContributor methods
     def get_navigation_items(self, req):
 	if self.nav_url:
-	    yield 'mainnav', 'builds', Markup('<a href="%s">Builds</a>' % self.nav_url)
+	    yield 'mainnav', 'builds', Markup('<a href="%s"%s>Builds</a>' % \
+			(self.nav_url, self.disp_tab and ' target="hudson"' or ''))
     # ITemplateProvider methods
     def get_templates_dirs(self):