From 6403dba06da5245b55a587a421ec970d14cc8b96 Mon Sep 17 00:00:00 2001 From: Dominik Blunk 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 ''; print_bracket_link( $tpl_print_link, lang_get( 'print' ) ); echo ''; + + # 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 ''; + if ( is_numeric( $t_label ) ) { + print_bracket_link_prepared( $t_href ); + } else { + print_bracket_link( $t_href, $t_label ); + } + echo ''; + } + } else { + print_bracket_link_prepared( $t_hook ); + } + } + } echo ''; echo ''; 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,