View Issue Details

IDProjectCategoryView StatusLast Update
0012011mantisbtplug-inspublic2014-02-02 12:18
Reporterdominik Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.2.1 
Summary0012011: Added new event: EVENT_MENU_ISSUE_HELPER
Description

Attached a patch file with a new event EVENT_MENU_ISSUE_HELPER

This event allows to change the issue link helper bar on the right side of the view issue page ([issue history] [print])...

Unfortunately I had private files in theses commits so I had to manually remove files -> if you have problems to apply the patch please let me know (or if you know how I can exlude files when creating patches please let me know as well ;-))

TagsNo tags attached.
Attached Files
2010-06-09_new_event_menu_issue_helper.patch (2,560 bytes)   
From 6403dba06da5245b55a587a421ec970d14cc8b96 Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Fri, 4 Jun 2010 17:28:31 +0200
Subject: [PATCH 16/19] Plugin PrettyPrint - Part 1

---
 bug_view_inc.php                                   |   20 ++
 core/events_inc.php                                |    1 +
 plugins/PrettyPrint/PrettyPrint.php                |   89 ++++++
 plugins/PrettyPrint/lang/strings_english.txt       |   12 +
 plugins/PrettyPrint/lang/strings_german.txt        |   32 ++
 .../PrettyPrint/pages/pretty_print_bug_page.php    |  335 ++++++++++++++++++++
 .../pages/pretty_print_bug_page_old.php            |  218 +++++++++++++
 plugins/PrettyPrint/pretty_print.inc.php           |   63 ++++
 8 files changed, 770 insertions(+), 0 deletions(-)
 create mode 100644 plugins/PrettyPrint/PrettyPrint.php
 create mode 100644 plugins/PrettyPrint/lang/strings_english.txt
 create mode 100644 plugins/PrettyPrint/lang/strings_german.txt
 create mode 100644 plugins/PrettyPrint/pages/pretty_print_bug_page.php
 create mode 100644 plugins/PrettyPrint/pages/pretty_print_bug_page_old.php
 create mode 100644 plugins/PrettyPrint/pretty_print.inc.php

diff --git a/bug_view_inc.php b/bug_view_inc.php
index f5b8389..2a18ac1 100644
--- a/bug_view_inc.php
+++ b/bug_view_inc.php
@@ -271,6 +271,26 @@
 	echo '<span class="small">';
 	print_bracket_link( $tpl_print_link, lang_get( 'print' ) );
 	echo '</span>';
+	
+	# Print additional Helper Links
+	$tpl_helper_links = event_signal( 'EVENT_MENU_ISSUE_HELPER', $f_bug_id );
+	foreach ( $tpl_helper_links as $t_plugin => $t_hooks ) {
+		foreach( $t_hooks as $t_hook ) {
+			if ( is_array( $t_hook ) ) {
+				foreach( $t_hook as $t_label => $t_href ) {
+					echo '<span class="small">';
+					if ( is_numeric( $t_label ) ) {
+						print_bracket_link_prepared( $t_href );
+					} else {
+						print_bracket_link( $t_href, $t_label );
+					}
+					echo '</span>';
+				}
+			} else {
+				print_bracket_link_prepared( $t_hook );
+			}
+		}
+	}
 	echo '</td>';
 	echo '</tr>';
 
diff --git a/core/events_inc.php b/core/events_inc.php
index 79e6462..4022775 100644
--- a/core/events_inc.php
+++ b/core/events_inc.php
@@ -53,6 +53,7 @@ event_declare_many( array(
 	'EVENT_MENU_ACCOUNT' => EVENT_TYPE_DEFAULT,
 	'EVENT_MENU_FILTER' => EVENT_TYPE_DEFAULT,
 	'EVENT_MENU_ISSUE' => EVENT_TYPE_DEFAULT,
+	'EVENT_MENU_ISSUE_HELPER' => EVENT_TYPE_DEFAULT,
 
 	# Management pages
 	'EVENT_MANAGE_OVERVIEW_INFO' => EVENT_TYPE_OUTPUT,

Activities