Example #1
0
function print_column_edit($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    if ($p_columns_target != COLUMNS_TARGET_CSV_PAGE) {
        global $t_icon_path, $t_update_bug_threshold;
        echo '<td>';
        if (!bug_is_readonly($p_row['id']) && access_has_bug_level($t_update_bug_threshold, $p_row['id'])) {
            echo '<a href="' . string_get_bug_update_url($p_row['id']) . '">';
            echo '<img border="0" width="16" height="16" src="' . $t_icon_path . 'update.png';
            echo '" alt="' . lang_get('update_bug_button') . '"';
            echo ' title="' . lang_get('update_bug_button') . '" /></a>';
        } else {
            echo '&nbsp;';
        }
        echo '</td>';
    }
}
Example #2
0
/**
 * Print column content for column edit
 *
 * @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_edit($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_icon_path, $t_update_bug_threshold;
    echo '<td class="column-edit">';
    if (!bug_is_readonly($p_bug->id) && access_has_bug_level(config_get('update_bug_threshold'), $p_bug->id)) {
        echo '<a href="' . string_get_bug_update_url($p_bug->id) . '">';
        echo '<img width="16" height="16" src="' . $t_icon_path . 'update.png';
        echo '" alt="' . lang_get('update_bug_button') . '"';
        echo ' title="' . lang_get('update_bug_button') . '" /></a>';
    } else {
        echo '&#160;';
    }
    echo '</td>';
}
Example #3
0
    ?>

<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 ' />';
        echo '</a>';
    }
    if (VS_PRIVATE == $v_view_state) {
Example #4
0
/**
 * return an href anchor that links to a bug UPDATE page for the given bug
 * account for the user preference and site override
 * @param integer $p_bug_id  A bug identifier.
 * @param integer $p_user_id A valid user identifier.
 * @return string
 */
function string_get_bug_update_link($p_bug_id, $p_user_id = null)
{
    $t_summary = string_attribute(bug_get_field($p_bug_id, 'summary'));
    return '<a href="' . helper_mantis_url(string_get_bug_update_url($p_bug_id, $p_user_id)) . '" title="' . $t_summary . '">' . bug_format_id($p_bug_id) . '</a>';
}
Example #5
0
    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>";
    }
    if (VS_PRIVATE == $t_bug->view_state) {
        echo '<img src="' . $t_icon_path . 'protected.gif" width="8" height="15" alt="' . lang_get('private') . '" />';
    }
    if ($t_show_reporter) {
        # Reporter
        echo '<th class="category"><label for="reporter_id">' . lang_get('reporter') . '</label></th>';
        echo '<td>';
        # Do not allow the bug's reporter to edit the Reporter field
        # when limit_reporters is ON
        if (ON == config_get('limit_reporters') && !access_has_project_level(access_threshold_min_level(config_get('report_bug_threshold', null, null, $t_bug->project_id)) + 1, $t_bug->project_id)) {
            echo string_attribute(user_get_name($t_bug->reporter_id));
        } else {
            if ($f_reporter_edit) {
                echo '<select ' . helper_get_tab_index() . ' id="reporter_id" name="reporter_id">';
                print_reporter_option_list($t_bug->reporter_id, $t_bug->project_id);
                echo '</select>';
            } else {
                echo string_attribute(user_get_name($t_bug->reporter_id));
                echo ' [<a href="#reporter_edit" class="click-url" url="' . string_get_bug_update_url($f_bug_id) . '&amp;reporter_edit=true">' . lang_get('edit_link') . '</a>]';
            }
        }
        echo '</td>';
    } else {
        $t_spacer += 2;
    }
    # spacer
    echo '<td colspan="', $t_spacer, '">&#160;</td>';
    echo '</tr>';
}
#
# Assigned To, Due Date
#
if ($t_show_handler || $t_show_due_date) {
    echo '<tr>';
Example #7
0
function print_header_redirect_update($p_bug_id)
{
    print_header_redirect(string_get_bug_update_url($p_bug_id));
}