Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11894
Modified Files:
bug_change_status_page.php bug_reminder.php bug_update.php
bug_update_advanced_page.php bug_update_page.php
bug_view_page.php bugnote_add.php bugnote_add_inc.php
bugnote_edit_page.php bugnote_update.php bugnote_view_inc.php
config_defaults_inc.php config_inc.php.sample
print_all_bug_options_inc.php
Added Files:
billing_inc.php billing_page.php bugnote_stats_inc.php
Log Message:
Add time tracking functionality see bug 4428
Index: bugnote_view_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_view_inc.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- bugnote_view_inc.php 26 Sep 2006 01:50:10 -0000 1.32
+++ bugnote_view_inc.php 12 Dec 2006 18:26:28 -0000 1.33
@@ -102,6 +102,9 @@
$v3_note = $row['note'];
$v3_note = string_display_links( $v3_note );
$t_bugnote_id_formatted = bugnote_format_id( $v3_id );
+ $v3_time_tracking = db_convert_time( $v3_time_tracking );
+ if ( "" != $v3_time_tracking )
+ $v3_time_tracking = "[ $v3_time_tracking ]";
if ( VS_PRIVATE == $v3_view_state ) {
$t_bugnote_css = 'bugnote-private';
@@ -123,6 +126,8 @@
<br />
<span class="small"><?php echo $v3_date_submitted ?></span><br
/>
<?php
+ if ( config_get('time_tracking_enabled') )
+ echo '<span
class="small">'.$v3_time_tracking.'</span><br />';
if ( true == $t_bugnote_modified ) {
echo '<span class="small">'.lang_get( 'edited_on').'
'.$v3_last_modified.'</span><br />';
}
Index: bugnote_edit_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_edit_page.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- bugnote_edit_page.php 25 Jul 2005 16:34:10 -0000 1.49
+++ bugnote_edit_page.php 12 Dec 2006 18:26:28 -0000 1.50
@@ -57,6 +57,8 @@
}
$t_bugnote_text = string_textarea( bugnote_get_text( $f_bugnote_id ) );
+ $t_time_tracking = bugnote_get_field( $f_bugnote_id, "time_tracking" );
+ $t_time_tracking = db_convert_time( $t_time_tracking );
# Determine which view page to redirect back to.
$t_redirect_url = string_get_bug_view_url( $t_bug_id );
@@ -82,6 +84,14 @@
<textarea cols="80" rows="10" name="bugnote_text"
wrap="virtual"><?php echo $t_bugnote_text ?></textarea>
</td>
</tr>
+<?php if ( config_get('time_tracking_enabled') ) { ?>
+<tr class="row-2">
+ <td class="center" colspan="2">
+ <b><?php echo lang_get( 'time_tracking') ?> (HH:MM)</b><br />
+ <input type="text" name="time_tracking" size="5" value="<?php
echo $t_time_tracking ?>" />
+ </td>
+</tr>
+<?php } ?>
<tr>
<td class="center" colspan="2">
<input type="submit" class="button" value="<?php echo lang_get(
'update_information_button' ) ?>" />
Index: print_all_bug_options_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/print_all_bug_options_inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- print_all_bug_options_inc.php 10 Aug 2004 10:46:12 -0000 1.24
+++ print_all_bug_options_inc.php 12 Dec 2006 18:26:28 -0000 1.25
@@ -46,7 +46,8 @@
'attached_files',
'bugnote_title',
'bugnote_date',
- 'bugnote_description' );
+ 'bugnote_description',
+ 'time_tracking' );
}
Index: bug_reminder.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_reminder.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- bug_reminder.php 16 Mar 2006 19:20:09 -0000 1.20
+++ bug_reminder.php 12 Dec 2006 18:26:28 -0000 1.21
@@ -64,7 +64,7 @@
$f_to = $t_to;
}
$t_attr = '|' . implode( '|', $f_to ) . '|';
- bugnote_add( $f_bug_id, $f_body, config_get(
'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr );
+ bugnote_add( $f_bug_id, $f_body, 0, config_get(
'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr );
}
html_page_top1();
Index: bugnote_add_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_add_inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- bugnote_add_inc.php 15 Aug 2006 07:11:23 -0000 1.26
+++ bugnote_add_inc.php 12 Dec 2006 18:26:28 -0000 1.27
@@ -29,7 +29,7 @@
<?php } ?>
<div id="bugnote_add_open">
-<form method="post" action="bugnote_add.php">
+<form name=bugnoteadd method="post" action="bugnote_add.php">
<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
<table class="width100" cellspacing="1">
<tr>
@@ -69,6 +69,25 @@
</td>
</tr>
<?php } ?>
+
+<?php if ( config_get('time_tracking_enabled') ) { ?>
+<tr <?php echo helper_alternate_class() ?>>
+ <td class="category">
+ <?php echo lang_get( 'time_tracking' ) ?>
+ </td>
+ <td>
+ <?php if ( config_get('time_tracking_stopwatch') && ON ==
config_get( 'use_javascript' )) { ?>
+ <script type="text/javascript" language="JavaScript"
src="javascript/time_tracking_stopwatch.js"></script>
+ <input type="text" name="time_tracking">
+ <input type="button" name="time_tracking_ssbutton"
value="Start" onClick="time_tracking_swstartstop()">
+ <input type="button" name="time_tracking_reset" value="R"
onClick="time_tracking_swreset()">
+ <?php } else { ?>
+ <input type="text" name="time_tracking" size="5" value="0:00" />
+ <?php } ?>
+ </td>
+</tr>
+<?php } ?>
+
<tr>
<td class="center" colspan="2">
<input type="submit" class="button" value="<?php echo lang_get(
'add_bugnote_button' ) ?>" />
Index: config_inc.php.sample
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_inc.php.sample,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- config_inc.php.sample 12 Sep 2006 04:08:32 -0000 1.17
+++ config_inc.php.sample 12 Dec 2006 18:26:28 -0000 1.18
@@ -50,4 +50,4 @@
# The default value is ON but you must make sure file uploading is
enabled
# in PHP as well. You may need to add "file_uploads = TRUE" to your
php.ini.
$g_allow_file_upload = ON;
-?>
\ No newline at end of file
+?>
Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.321
retrieving revision 1.322
diff -u -d -r1.321 -r1.322
--- config_defaults_inc.php 8 Dec 2006 06:37:40 -0000 1.321
+++ config_defaults_inc.php 12 Dec 2006 18:26:28 -0000 1.322
@@ -1769,4 +1769,22 @@
# The maximum number of issues to keep in the recently visited list.
$g_recently_visited_count = 5;
-?>
\ No newline at end of file
+
+ #####################
+ # Time tracking
+ #####################
+
+ # Turn on Time Tracking accounting
+ $g_time_tracking_enabled = OFF;
+
+ # When a single value is entered into the time tracking field
+ # is it treated as hours or minutes
+ $g_time_tracking_hours = ON;
+
+ # A billing sums
+ $g_time_tracking_with_billing = OFF;
+
+ # Stop watch to build time tracking field
+ $g_time_tracking_stopwatch = OFF;
+
+?>
Index: bugnote_add.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_add.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- bugnote_add.php 25 Jul 2005 16:34:10 -0000 1.46
+++ bugnote_add.php 12 Dec 2006 18:26:28 -0000 1.47
@@ -23,6 +23,7 @@
<?php
$f_bug_id = gpc_get_int( 'bug_id' );
$f_private = gpc_get_bool( 'private' );
+ $f_time_tracking = gpc_get_string( 'time_tracking', '0:00' );
$f_bugnote_text = gpc_get_string( 'bugnote_text', '' );
if ( bug_is_readonly( $f_bug_id ) ) {
@@ -43,7 +44,7 @@
# check for blank bugnote
if ( !is_blank( $f_bugnote_text ) ) {
- bugnote_add( $f_bug_id, $f_bugnote_text, $f_private );
+ bugnote_add( $f_bug_id, $f_bugnote_text, $f_time_tracking,
$f_private );
email_bugnote_add( $f_bug_id );
}
Index: bug_update.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- bug_update.php 31 Oct 2006 08:43:57 -0000 1.90
+++ bug_update.php 12 Dec 2006 18:26:28 -0000 1.91
@@ -73,6 +73,7 @@
$f_private = gpc_get_bool(
'private' );
$f_bugnote_text = gpc_get_string(
'bugnote_text', '' );
+ $f_time_tracking = gpc_get_string(
'time_tracking', '0:00' );
$f_close_now = gpc_get_string(
'close_now', false );
# Handle auto-assigning
@@ -137,7 +138,8 @@
case $t_resolved:
# bug_resolve updates the status,
fixed_in_version, resolution, handler_id and bugnote and sends message
bug_resolve( $f_bug_id,
$t_bug_data->resolution, $t_bug_data->fixed_in_version,
- $f_bugnote_text,
$t_bug_data->duplicate_id, $t_bug_data->handler_id, $f_private );
+ $f_bugnote_text,
$t_bug_data->duplicate_id, $t_bug_data->handler_id,
+ $f_private, $f_time_tracking );
$t_notify = false;
$t_bug_note_set = true;
@@ -153,7 +155,7 @@
case CLOSED:
# bug_close updates the status and bugnote and
sends message
- bug_close( $f_bug_id, $f_bugnote_text,
$f_private );
+ bug_close( $f_bug_id, $f_bugnote_text,
$f_private, $f_time_tracking );
$t_notify = false;
$t_bug_note_set = true;
break;
@@ -162,7 +164,7 @@
if ( $t_old_bug_status >= $t_resolved ) {
bug_set_field( $f_bug_id, 'handler_id',
$t_bug_data->handler_id ); # fix: update handler_id before calling bug_reopen
# bug_reopen updates the status and
bugnote and sends message
- bug_reopen( $f_bug_id, $f_bugnote_text,
$f_private );
+ bug_reopen( $f_bug_id, $f_bugnote_text,
$f_time_tracking, $f_private );
$t_notify = false;
$t_bug_note_set = true;
@@ -177,7 +179,7 @@
# Add a bugnote if there is one
if ( ( !is_blank( $f_bugnote_text ) ) && ( false == $t_bug_note_set ) )
{
- bugnote_add( $f_bug_id, $f_bugnote_text, $f_private );
+ bugnote_add( $f_bug_id, $f_bugnote_text, $f_time_tracking,
$f_private );
}
# Update the bug entry, notify if we haven't done so already
Index: bug_change_status_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- bug_change_status_page.php 15 Sep 2006 06:00:32 -0000 1.24
+++ bug_change_status_page.php 12 Dec 2006 18:26:28 -0000 1.25
@@ -284,6 +284,18 @@
</tr>
<?php } ?>
+<?php if ( config_get('time_tracking_enabled') ) { ?>
+<?php if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ),
$f_bug_id ) ) { ?>
+<tr <?php echo helper_alternate_class() ?>>
+ <td class="category">
+ <?php echo lang_get( 'time_tracking' ) ?>
+ </td>
+ <td>
+ <input type="text" name="time_tracking" size="5" value="0:00" />
+ </td>
+</tr>
+<?php } ?>
+<?php } ?>
<!-- Submit Button -->
<tr>
--- NEW FILE: billing_page.php ---
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito -
kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx
# Copyright (C) 2002 - 2004 Mantis Team -
mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: billing_page.php,v 1.1 2006/12/12 18:26:28 davidnewcomb Exp $
# --------------------------------------------------------
?>
<?php
require_once( 'core.php' );
$t_core_path = config_get( 'core_path' );
?>
<?php
/*
compress_enable();
*/
?>
<?php html_page_top1( lang_get( 'time_tracking_billing_link' ) ) ?>
<?php html_page_top2() ?>
<br />
<?php
$t_mantis_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
?>
<!-- Jump to Bugnote add form -->
<?php
# Work break-down
include( $t_mantis_dir . 'billing_inc.php' );
html_page_bottom1( __FILE__ );
?>
Index: bug_update_advanced_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- bug_update_advanced_page.php 11 Nov 2006 07:37:59 -0000 1.91
+++ bug_update_advanced_page.php 12 Dec 2006 18:26:28 -0000 1.92
@@ -535,6 +535,19 @@
</tr>
<?php } ?>
+<!-- Bugnote Time Tracking (if permitted) -->
+<?php if ( config_get('time_tracking_enabled') ) { ?>
+<tr <?php echo helper_alternate_class() ?>>
+ <td class="category">
+ <?php echo lang_get( 'time_tracking' ) ?>
+ </td>
+ <td colspan="5">
+ <input type="text" name="time_tracking" size="5" value="0:00" />
+ </td>
+</tr>
+<?php } ?>
+<?php } ?>
+
<!-- Submit Button -->
<tr>
Index: bugnote_update.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_update.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- bugnote_update.php 12 Feb 2005 20:01:05 -0000 1.43
+++ bugnote_update.php 12 Dec 2006 18:26:28 -0000 1.44
@@ -22,8 +22,9 @@
require_once( $t_core_path.'current_user_api.php' );
?>
<?php
- $f_bugnote_id = gpc_get_int( 'bugnote_id' );
- $f_bugnote_text = gpc_get_string( 'bugnote_text', '' );
+ $f_bugnote_id = gpc_get_int( 'bugnote_id' );
+ $f_bugnote_text = gpc_get_string( 'bugnote_text', '' );
+ $f_time_tracking = gpc_get_string( 'time_tracking', '0:00' );
# Check if the current user is allowed to edit the bugnote
$t_user_id = auth_get_current_user_id();
@@ -43,6 +44,7 @@
$f_bugnote_text = trim( $f_bugnote_text ) . "\n\n";
bugnote_set_text( $f_bugnote_id, $f_bugnote_text );
+ bugnote_set_time_tracking( $f_bugnote_id, $f_time_tracking );
print_successful_redirect( string_get_bug_view_url( $t_bug_id ) .
'#bugnotes' );
?>
Index: bug_view_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- bug_view_page.php 15 Sep 2006 05:19:45 -0000 1.81
+++ bug_view_page.php 12 Dec 2006 18:26:28 -0000 1.82
@@ -445,6 +445,10 @@
<br />
<?php } ?>
<?php
+ # Time Tracking stats
+ if ( config_get('time_tracking_enabled') ) {
+ include( $t_mantis_dir . 'bugnote_stats_inc.php' );
+ }
# History
if ( $f_history ) {
include( $t_mantis_dir . 'history_inc.php' );
@@ -453,4 +457,4 @@
html_page_bottom1( __FILE__ );
last_visited_issue( $f_bug_id );
-?>
\ No newline at end of file
+?>
--- NEW FILE: bugnote_stats_inc.php ---
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito -
kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx
# Copyright (C) 2002 - 2004 Mantis Team -
mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: bugnote_stats_inc.php,v 1.1 2006/12/12 18:26:28 davidnewcomb Exp
$
# --------------------------------------------------------
?>
<?php
# This include file prints out the bug bugnote_stats
# $f_bug_id must already be defined
?>
<?php
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'bugnote_api.php' );
?>
<?php
if ( ! config_get('time_tracking_enabled') )
return;
?>
<a name="bugnotestats" id="bugnotestats" /><br />
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<div id="bugnotestats_closed" style="display: none;">
<table class="width100" cellspacing="0">
<tr>
<td class="form-title" colspan="4">
<a href="" onClick="ToggleDiv( 'bugnotestats',
g_div_bugnotestats ); return false;"
><img border="0" src="images/plus.png" alt="+" /></a>
<?php echo lang_get( 'time_tracking_bugnote_stats' ) ?>
</td>
</tr>
</table>
</div>
<?php } ?>
<div id="bugnotestats_open">
<?php
$t_bugnote_stats_from_def = date( "m/d/Y", $t_bug->date_submitted );
$f_bugnote_stats_from = gpc_get_string('bugnote_stats_from',
$t_bugnote_stats_from_def);
$f_bugnote_stats_to = gpc_get_string('bugnote_stats_to', date("d/m/Y"));
$f_get_bugnote_stats_button =
gpc_get_string('get_bugnote_stats_button', '');
?>
<form method="post" action="<?php echo $PHP_SELF ?>">
<input type="hidden" name="id" value="<?php echo $f_bug_id ?>" />
<table border=0 class="width100" cellspacing="0">
<tr>
<td class="form-title" colspan="4">
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<a href="" onClick="ToggleDiv( 'bugnotestats',
g_div_bugnotestats ); return false;"
><img border="0" src="images/minus.png" alt="-" /></a>
<?php } ?>
<?php echo lang_get( 'time_tracking_bugnote_stats' ) ?>
</td>
</tr>
<tr class="row-2">
<td class="category" width="25%">
<?php echo lang_get( 'from' ). " (mm/dd/yyyy)"; ?>
</td>
<td width="75%">
<input type="text" name="bugnote_stats_from" value="<?php echo
$f_bugnote_stats_from ?>" />
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'to' ). " (mm/dd/yyyy)"; ?>
</td>
<td>
<input type="text" name="bugnote_stats_to" value="<?php echo
$f_bugnote_stats_to ?>" />
</td>
</tr>
<tr>
<td class="center" colspan="2">
<input type="submit" class="button"
name="get_bugnote_stats_button" value="<?php echo lang_get(
'time_tracking_get_bugnote_stats_button' ) ?>" />
</td>
</tr>
</table>
</form>
<?php
if ( "" != $f_get_bugnote_stats_button ) {
$t_bugnote_stats = bugnote_stats_get_events_array( $f_bug_id,
$f_bugnote_stats_from, $f_bugnote_stats_to );
?>
<table border=0 class="width100" cellspacing="0">
<tr class="row-category-history">
<td class="small-caption">
<?php echo lang_get( 'username' ) ?>
</td>
<td class="small-caption">
<?php echo lang_get( 'time_tracking' ) ?>
</td>
</tr>
<?php foreach ( $t_bugnote_stats as $t_item ) { ?>
<?php
if ( "" == $t_item['sum_time_tracking'] ) {
$t_item['sum_time_tracking'] = " ";
}
?>
<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption">
<?php echo $t_item['username'] ?>
</td>
<td class="small-caption">
<?php echo $t_item['sum_time_tracking'] ?>
</td>
</tr>
<?php } # end for loop ?>
</table>
<?php } # end if ?>
</div>
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<script type="text/JavaScript">
SetDiv( "bugnotestats", g_div_bugnotestats );
</script>
<?php } ?>
Index: bug_update_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update_page.php,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- bug_update_page.php 12 Aug 2006 08:04:13 -0000 1.92
+++ bug_update_page.php 12 Dec 2006 18:26:28 -0000 1.93
@@ -410,6 +410,18 @@
</tr>
<?php } ?>
+<!-- Bugnote Time Tracking (if permitted) -->
+<?php if ( config_get('time_tracking_enabled') ) { ?>
+<tr <?php echo helper_alternate_class() ?>>
+ <td class="category">
+ <?php echo lang_get( 'time_tracking' ) ?>
+ </td>
+ <td colspan="5">
+ <input type="text" name="time_tracking" size="5" value="0:00" />
+ </td>
+</tr>
+<?php } ?>
+
<!-- Submit Button -->
<tr>
--- NEW FILE: billing_inc.php ---
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito -
kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx
# Copyright (C) 2002 - 2004 Mantis Team -
mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: billing_inc.php,v 1.1 2006/12/12 18:26:28 davidnewcomb Exp $
# --------------------------------------------------------
?>
<?php
# This include file prints out the bug bugnote_stats
# $f_bug_id must already be defined
?>
<?php
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'bugnote_api.php' );
?>
<?php
if ( ! config_get('time_tracking_enabled') )
return;
?>
<a name="bugnotestats" id="bugnotestats" /><br />
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<div id="bugnotestats_closed" style="display: none;">
<table class="width100" cellspacing="0">
<tr>
<td class="form-title" colspan="4">
<a href="" onClick="ToggleDiv( 'bugnotestats',
g_div_bugnotestats ); return false;"
><img border="0" src="images/plus.png" alt="+" /></a>
<?php echo lang_get( 'time_tracking_bugnote_stats' ) ?>
</td>
</tr>
</table>
</div>
<?php } ?>
<div id="bugnotestats_open">
<?php
$f_bugnote_stats_from = gpc_get_string('bugnote_stats_from', '');
$f_bugnote_stats_to = gpc_get_string('bugnote_stats_to', '');
$f_bugnote_cost = gpc_get_string('bugnote_cost', '');
$f_get_bugnote_stats_button =
gpc_get_string('get_bugnote_stats_button', '');
$f_project_id = helper_get_current_project();
if ( config_get('time_tracking_with_billing') )
$t_cost_col = true;
else
$t_cost_col = false;
?>
<form method="post" action="<?php echo $PHP_SELF ?>">
<table border=0 class="width100" cellspacing="0">
<tr>
<td class="form-title" colspan="4">
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<a href="" onClick="ToggleDiv( 'bugnotestats',
g_div_bugnotestats ); return false;"
><img border="0" src="images/minus.png" alt="-" /></a>
<?php } ?>
<?php echo lang_get( 'time_tracking_bugnote_stats' ) ?>
</td>
</tr>
<tr class="row-2">
<td class="category" width="25%">
<?php echo lang_get( 'from' ). " (mm/dd/yyyy)"; ?>
</td>
<td width="75%">
<input type="text" name="bugnote_stats_from" value="<?php echo
$f_bugnote_stats_from ?>" />
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'to' ). " (mm/dd/yyyy)"; ?>
</td>
<td>
<input type="text" name="bugnote_stats_to" value="<?php echo
$f_bugnote_stats_to ?>" />
</td>
</tr>
<?php if ($t_cost_col) { ?>
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'time_tracking_cost_per_hour' ); ?>
</td>
<td>
<input type="text" name="bugnote_cost" value="<?php echo
$f_bugnote_cost ?>" />
</td>
</tr>
<?php } ?>
<tr>
<td class="center" colspan="2">
<input type="submit" class="button"
name="get_bugnote_stats_button" value="<?php echo lang_get(
'time_tracking_get_bugnote_stats_button' ) ?>" />
</td>
</tr>
</table>
</form>
<?php
if ( "" != $f_get_bugnote_stats_button ) {
$t_bugnote_stats = bugnote_stats_get_project_array( $f_project_id,
$f_bugnote_stats_from, $f_bugnote_stats_to, $f_bugnote_cost );
if ( $f_bugnote_cost == "" )
$t_cost_col = false;
?>
<table border=0 class="width100" cellspacing="0">
<?php $t_prev_id = -1; ?>
<?php foreach ( $t_bugnote_stats as $t_item ) { ?>
<?php
if ( $t_item['bug_id'] != $t_prev_id) {
$t_link = bug_format_summary( $t_item['bug_id'],
SUMMARY_CAPTION );
//$t_link = string_get_bug_view_link( $t_item['bug_id'] , null,
true);
echo "<tr class='row-category-history'><td
colspan=4>".$t_link."</td></tr>";
?>
<tr class="row-category-history">
<td class="small-caption"> </td>
<td class="small-caption"><?php echo lang_get( 'username' ) ?></td>
<td class="small-caption"><?php echo lang_get( 'time_tracking' ) ?></td>
<?php if ( $t_cost_col) { ?>
<td class="small-caption"><?php echo lang_get( 'time_tracking_cost' )
?></td>
<?php } ?>
</tr>
<?php
$t_prev_id = $t_item['bug_id'];
}
?>
<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption"> </td>
<td class="small-caption">
<?php echo $t_item['username'] ?>
</td>
<td class="small-caption">
<?php echo $t_item['sum_time_tracking'] ?>
</td>
<?php if ($t_cost_col) { ?>
<td class="small-caption">
<?php echo $t_item['cost'] ?>
</td>
<?php } ?>
</tr>
<?php } # end for?>
</table>
<?php } # end if f_get_bugnote_stats_button?>
</div>
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<script type="text/JavaScript">
SetDiv( "bugnotestats", g_div_bugnotestats );
</script>
<?php } ?>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|