Пример #1
0
/**
 * Print all buttons for view bug pages
 * @param int $p_bug_id
 * @return null
 */
function html_buttons_view_bug_page($p_bug_id)
{
    $t_resolved = config_get('bug_resolved_status_threshold');
    $t_closed = config_get('bug_closed_status_threshold');
    $t_status = bug_get_field($p_bug_id, 'status');
    $t_readonly = bug_is_readonly($p_bug_id);
    $t_sticky = config_get('set_bug_sticky_threshold');
    $t_bug = bug_get($p_bug_id);
    echo '<table><tr class="vcenter">';
    if (!$t_readonly) {
        # UPDATE button
        echo '<td class="center">';
        html_button_bug_update($p_bug_id);
        echo '</td>';
        # ASSIGN button
        echo '<td class="center">';
        html_button_bug_assign_to($t_bug);
        echo '</td>';
    }
    # Change status button/dropdown
    if (!$t_readonly) {
        echo '<td class="center">';
        html_button_bug_change_status($t_bug);
        echo '</td>';
    }
    # MONITOR/UNMONITOR button
    if (!current_user_is_anonymous()) {
        echo '<td class="center">';
        if (user_is_monitoring_bug(auth_get_current_user_id(), $p_bug_id)) {
            html_button_bug_unmonitor($p_bug_id);
        } else {
            html_button_bug_monitor($p_bug_id);
        }
        echo '</td>';
    }
    # STICK/UNSTICK button
    if (access_has_bug_level($t_sticky, $p_bug_id)) {
        echo '<td class="center">';
        if (!bug_get_field($p_bug_id, 'sticky')) {
            html_button_bug_stick($p_bug_id);
        } else {
            html_button_bug_unstick($p_bug_id);
        }
        echo '</td>';
    }
    # CLONE button
    if (!$t_readonly) {
        echo '<td class="center">';
        html_button_bug_create_child($p_bug_id);
        echo '</td>';
    }
    # REOPEN button
    echo '<td class="center">';
    html_button_bug_reopen($t_bug);
    echo '</td>';
    # CLOSE button
    echo '<td class="center">';
    html_button_bug_close($t_bug);
    echo '</td>';
    # MOVE button
    echo '<td class="center">';
    html_button_bug_move($p_bug_id);
    echo '</td>';
    # DELETE button
    echo '<td class="center">';
    html_button_bug_delete($p_bug_id);
    echo '</td>';
    helper_call_custom_function('print_bug_view_page_custom_buttons', array($p_bug_id));
    echo '</tr></table>';
}
Пример #2
0
function html_buttons_view_bug_page($p_bug_id)
{
    $t_resolved = config_get('bug_resolved_status_threshold');
    $t_status = bug_get_field($p_bug_id, 'status');
    $t_readonly = bug_is_readonly($p_bug_id);
    print '<table><tr class="vcenter">';
    if (!$t_readonly) {
        # UPDATE button
        echo '<td class="center">';
        html_button_bug_update($p_bug_id);
        echo '</td>';
        # ASSIGN button
        echo '<td class="center">';
        html_button_bug_assign_to($p_bug_id);
        echo '</td>';
        # Change State button
        echo '<td class="center">';
        html_button_bug_change_status($p_bug_id);
        echo '</td>';
    }
    # MONITOR/UNMONITOR button
    echo '<td class="center">';
    if (!current_user_is_anonymous()) {
        if (user_is_monitoring_bug(auth_get_current_user_id(), $p_bug_id)) {
            html_button_bug_unmonitor($p_bug_id);
        } else {
            html_button_bug_monitor($p_bug_id);
        }
    }
    echo '</td>';
    if (!$t_readonly) {
        # CREATE CHILD button
        echo '<td class="center">';
        html_button_bug_create_child($p_bug_id);
        echo '</td>';
    }
    if ($t_resolved <= $t_status) {
        # resolved is not the same as readonly
        print '<td class="center">';
        # REOPEN button
        html_button_bug_reopen($p_bug_id);
        print '</td>';
    }
    if (!$t_readonly) {
        # MOVE button
        echo '<td class="center">';
        html_button_bug_move($p_bug_id);
        echo '</td>';
        # DELETE button
        echo '<td class="center">';
        html_button_bug_delete($p_bug_id);
        echo '</td>';
    }
    helper_call_custom_function('print_bug_view_page_custom_buttons', array($p_bug_id));
    echo '</tr></table>';
}
Пример #3
0
/**
 * Print all buttons for view bug pages
 * @param int $p_bug_id
 * @return null
 */
function html_buttons_view_bug_page($p_bug_id)
{
    $t_resolved = config_get('bug_resolved_status_threshold');
    $t_closed = config_get('bug_closed_status_threshold');
    $t_status = bug_get_field($p_bug_id, 'status');
    $t_readonly = bug_is_readonly($p_bug_id);
    // WK/BFE: Folgende Zeile ist eine Kopie der vorigen., LB/BFE 2015
    //	bug_is_readonly -> bug_is_readonly_BFE
    //	$t_readonly -> $t_readonly_BFE
    $t_readonly_BFE = bug_is_readonly_BFE($p_bug_id);
    $t_sticky = config_get('set_bug_sticky_threshold');
    $t_bug = bug_get($p_bug_id);
    echo '<table><tr class="vcenter">';
    // WK/BFE: Bedingund von $t_readonly auf $t_readonly_BFE geändert., LB/BFE 2015
    if (!$t_readonly_BFE) {
        # UPDATE button
        echo '<td class="center">';
        html_button_bug_update($p_bug_id);
        echo '</td>';
    }
    if (!$t_readonly) {
        # ASSIGN button
        echo '<td class="center">';
        html_button_bug_assign_to($t_bug);
        echo '</td>';
    }
    # Change status button/dropdown
    if (!$t_readonly) {
        echo '<td class="center">';
        html_button_bug_change_status($t_bug);
        echo '</td>';
    }
    # MONITOR/UNMONITOR button
    if (!current_user_is_anonymous()) {
        echo '<td class="center">';
        if (user_is_monitoring_bug(auth_get_current_user_id(), $p_bug_id)) {
            html_button_bug_unmonitor($p_bug_id);
        } else {
            html_button_bug_monitor($p_bug_id);
        }
        echo '</td>';
    }
    # STICK/UNSTICK button
    if (access_has_bug_level($t_sticky, $p_bug_id)) {
        echo '<td class="center">';
        if (!bug_get_field($p_bug_id, 'sticky')) {
            html_button_bug_stick($p_bug_id);
        } else {
            html_button_bug_unstick($p_bug_id);
        }
        echo '</td>';
    }
    # CLONE button
    if (!$t_readonly) {
        echo '<td class="center">';
        html_button_bug_create_child($p_bug_id);
        echo '</td>';
    }
    # REOPEN button
    echo '<td class="center">';
    html_button_bug_reopen($t_bug);
    echo '</td>';
    # CLOSE button
    # LB/BFE 2015 Schließen-Button entfernt: https://issuetracking.bfe.tv/view.php?id=18093
    /*
    echo '<td class="center">';
    html_button_bug_close( $t_bug );
    echo '</td>';
    */
    # MOVE button
    echo '<td class="center">';
    html_button_bug_move($p_bug_id);
    echo '</td>';
    # DELETE button
    echo '<td class="center">';
    html_button_bug_delete($p_bug_id);
    echo '</td>';
    helper_call_custom_function('print_bug_view_page_custom_buttons', array($p_bug_id));
    echo '</tr></table>';
}