/**
 * @param $old_version
 * @param $new_version
 */
function print_changes_table_body($old_version, $new_version)
{
    $old_version_data = get_version_data($old_version);
    $new_version_data = get_version_data($new_version);
    $all_issues = initialize_bug_array($old_version_data[0], $new_version_data[0]);
    echo '<tbody>';
    foreach ($all_issues as $issue) {
        echo '<tr>';
        if (check_inserted($issue, $old_version_data[0], $new_version_data[0])) {
            echo '<td colspan="2"></td><td colspan="2" class="center">';
            echo print_bug_link($issue, true) . ' ( + ' . plugin_lang_get('changes_inserted') . ')';
            echo '</td>';
        }
        if (check_removed($issue, $old_version_data[0], $new_version_data[0])) {
            echo '<td colspan="2" class="center">';
            echo print_bug_link($issue, true) . ' ( - ' . plugin_lang_get('changes_removed') . ')';
            echo '</td><td colspan="2"></td>';
        }
        if (check_edited($issue, $old_version_data[0], $new_version_data[0])) {
            for ($index = 0; $index < 2; $index++) {
                echo '<td colspan="2" class="center">';
                echo print_bug_link($issue, true) . ' ( # ' . plugin_lang_get('changes_edited') . ')';
                echo '</td>';
            }
        }
        echo '</tr>';
    }
    echo '</tbody>';
}
Esempio n. 2
0
/**
 * Print column content for column id
 *
 * @param BugData $p_bug bug object
 * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_id($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    echo '<td class="column-id">';
    print_bug_link($p_bug->id, false);
    echo '</td>';
}
Esempio n. 3
0
function print_column_id($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    echo '<td>';
    print_bug_link($p_row['id'], false);
    echo '</td>';
}
Esempio n. 4
0
		<thead>
			<tr class="row-category2">
				<th colspan="2"><?php 
echo lang_get('time_stats');
?>
</th>
			</tr>
		</thead>
		<tr>
			<td><?php 
echo lang_get('longest_open_bug');
?>
</td>
			<td><?php 
if ($t_bug_id > 0) {
    print_bug_link($t_bug_id);
}
?>
</td>
		</tr>
		<tr>
			<td><?php 
echo lang_get('longest_open');
?>
</td>
			<td><?php 
echo $t_largest_diff;
?>
</td>
		</tr>
		<tr>
Esempio n. 5
0
    }
    # grab the project name
    $project_name = project_get_field($v_project_id, 'name');
    ?>

<tr bgcolor="<?php 
    echo $status_color;
    ?>
">
	<?php 
    # -- Bug ID and details link + Pencil shortcut --
    ?>
	<td class="center" valign="top" width ="0" nowrap>
		<span class="small">
		<?php 
    print_bug_link($v_id);
    echo '<br />';
    if (!bug_is_readonly($v_id) && access_has_bug_level($t_update_bug_threshold, $v_id)) {
        echo '<a href="' . string_get_bug_update_url($v_id) . '"><img border="0" src="' . $t_icon_path . 'update.png' . '" alt="' . lang_get('update_bug_button') . '" /></a>';
    }
    if (ON == config_get('show_priority_text')) {
        print_formatted_priority_string($v_status, $v_priority);
    } else {
        print_status_icon($v_priority);
    }
    if (0 < $t_attachment_count) {
        echo '<a href="' . string_get_bug_view_url($v_id) . '#attachments">';
        echo '<img border="0" src="' . $t_icon_path . 'attachment.png' . '"';
        echo ' alt="' . lang_get('attachment_alt') . '"';
        echo ' title="' . $t_attachment_count . ' ' . lang_get('attachments') . '"';
        echo ' />';
Esempio n. 6
0
    ?>

<tr class="my-buglist-bug <?php 
    echo $t_bug_class;
    ?>
 <?php 
    echo $status_label;
    ?>
">
	<?php 
    # -- Bug ID and details link + Pencil shortcut --
    ?>
	<td class="center nowrap my-buglist-id">
		<span class="small">
		<?php 
    print_bug_link($t_bug->id);
    echo '<br />';
    if (!bug_is_readonly($t_bug->id) && access_has_bug_level($t_update_bug_threshold, $t_bug->id)) {
        echo '<a class="edit" href="' . string_get_bug_update_url($t_bug->id) . '"><img src="' . $t_icon_path . 'update.png' . '" alt="' . lang_get('update_bug_button') . '" /></a>';
    }
    if (ON == config_get('show_priority_text')) {
        print_formatted_priority_string($t_bug);
    } else {
        print_status_icon($t_bug->priority);
    }
    if ($t_attachment_count > 0) {
        $t_href = string_get_bug_view_url($t_bug->id) . '#attachments';
        $t_href_title = sprintf(lang_get('view_attachments_for_issue'), $t_attachment_count, $t_bug->id);
        $t_alt_text = $t_attachment_count . lang_get('word_separator') . lang_get('attachments');
        echo "<a class=\"attachments\" href=\"{$t_href}\" title=\"{$t_href_title}\"><img src=\"{$t_icon_path}attachment.png\" alt=\"{$t_alt_text}\" title=\"{$t_alt_text}\" /></a>";
    }
Esempio n. 7
0
$sevcolor = $sevcolors[$bug->severity];
$rescolor = $rescolors[$bug->resolution];
?>

<div class="scrumblock">
<p class="priority"><?php print_status_icon($bug->priority) ?></p>
<p class="bugid"></p>
<p class="commits"><?php echo $source_count[$bug->id] ?></p>
<p class="category">
<?php if ($bug->project_id != $current_project) {
	$project_name = project_get_name($bug->project_id);
	echo "<span class=\"project\">{$project_name}</span> - ";
}
echo category_full_name($bug->category_id, false) ?>
</p>
<p class="summary"><?php echo print_bug_link($bug->id) ?>: <?php echo $bug->summary ?></p>
<p class="severity" style="background: <?php echo $sevcolor ?>" title="Severity: <?php echo get_enum_element("severity", $bug->severity) ?>"></p>
<p class="resolution" style="background: <?php echo $rescolor ?>" title="Resolution: <?php echo get_enum_element("resolution", $bug->resolution) ?>"></p>
<p class="handler"><?php echo $bug->handler_id > 0 ? user_get_name($bug->handler_id) : "" ?></p>
</div>

<?php endforeach ?>
<?php endif ?>
<?php endforeach ?>
</td>
<?php endforeach ?>

</tr>
</table>

<?php
 /**
  * @param $chapter_index
  * @param $sub_chapter_index
  * @param $bug_data
  * @param $option_show_duration
  * @param $print_flag
  */
 public function print_bug_head($chapter_index, $sub_chapter_index, $bug_data, $option_show_duration, $print_flag)
 {
     echo '<tr><td class="content_chapter_item_spacer" colspan="3"></td></tr>';
     echo '<tr>';
     echo '<td class="content_chapter_item_number" id="' . string_display($bug_data[1]) . '">/F' . $chapter_index . '-' . $sub_chapter_index . '/</td>';
     echo '<td class="content_chapter_item">' . string_display($bug_data[1]) . ' (';
     if (!$print_flag) {
         print_bug_link($bug_data[0], true);
     } else {
         echo bug_format_id($bug_data[0]);
     }
     echo ')';
     echo '</td>';
     echo '<td class="content_chapter_item_duration">';
     if ($option_show_duration == '1' && !($bug_data[7] == 0 || is_null($bug_data[7]))) {
         echo plugin_lang_get('editor_bug_duration') . ': ' . $bug_data[7] . ' ' . plugin_lang_get('editor_duration_unit');
     }
     echo '</td>';
     echo '</tr>';
 }
        $t_timecard->assigned = user_get_name($t_row['handler_id']);
        $t_timecard->calculate();
        if ('user0' == $t_timecard->assigned) {
            # When bug not assigned don't print user0
            $t_timecard->assigned = '';
        }
        $t_timecard->status = MantisEnum::getLabel(config_get('status_enum_string'), $t_row['status']);
        $t_timecard->diff = time_get_diff($t_timecard->timestamp);
        if ($t_timecard->estimate < 0) {
            $t_timecard->estimate = plugin_lang_get('estimate_zero');
            $row_class = 'negative';
        } else {
            $t_time_sum += $t_timecard->estimate;
            $row_class = "row-{$i}";
        }
        echo "<tr class='{$row_class}'>\n\t\t\t\t<td>", print_bug_link($t_timecard->bug_id), '</td>' . '
				<td class="max_width">' . $t_timecard->summary . '</td>
				<td>' . $t_timecard->status . '</td>
				<td>' . $t_timecard->assigned . '</td>';
        if (plugin_config_get('use_timecard')) {
            echo '<td class="center">' . $t_timecard->timecard . '</td>';
        }
        if (plugin_config_get('use_updates')) {
            echo '<td class="center">' . $t_timecard->spent . '</td>';
            $t_timecard->estimate -= $t_timecard->spent;
        }
        echo '	<td class="center">' . $t_timecard->estimate . '</td>
				<td class="center">' . $t_timecard->diff . '</td>
			</tr>';
        $i = $i == 1 ? 2 : 1;
        #toggle row class selector