Exemplo n.º 1
0
function html_print_bug_filter($project_id, $filter_bug_status, $filter_bug_category, $filter_bug_component, $filter_reported_by, $filter_assigned_to, $filter_assigned_to_developer, $filter_found_in_rel, $filter_assigned_to_rel, $filter_per_page, $filter_view_closed, $filter_search, $filter_jump)
{
    print "<table class=width100>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td>" . NEWLINE;
    print "<table class=inner rules=none border=0>" . NEWLINE;
    # TITLES FOR HEADER DIALOG
    print "<tr class=left>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('reported_by') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to_developer') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('found_in_release') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to_release') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('show') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # REPORTED BY - all users
    print "<td align='center'>" . NEWLINE;
    print "<select name='reported_by'>" . NEWLINE;
    $reported_by = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($reported_by, $filter_reported_by);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO - all users?? or all users with bug_assign_status
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to'>" . NEWLINE;
    $assigned_to = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to, $filter_assigned_to);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO DEVELOPER
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to_developer'>" . NEWLINE;
    $assigned_to_developer = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to_developer, $filter_assigned_to_developer);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # FOUND IN RELEASE
    print "<td align='center'>" . NEWLINE;
    print "<select name='found_in_release'>" . NEWLINE;
    $found_in_release = admin_get_all_release_names($project_id, $blank = true);
    html_print_list_box_from_array($found_in_release, $filter_found_in_rel);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO RELEASE
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to_release'>" . NEWLINE;
    $assigned_to_release = admin_get_all_release_names($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to_release, $filter_assigned_to_rel);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # PER PAGE
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='3' maxlength='3' name='per_page' value='" . $filter_per_page . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "<td align='center' rowspan=4 valign=center><input type='submit' value='Filter'></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # SECOND ROW OF FILTERS
    print "<tr class='left'>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_status') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_category') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_component') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('view_closed') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('search') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('jump') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "<tr>" . NEWLINE;
    # STATUS
    print "<td align='center'>" . NEWLINE;
    print "<select name='status'>" . NEWLINE;
    $bug_status = bug_get_status(true);
    html_print_list_box_from_array($bug_status, $filter_bug_status);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # CATEGORY
    print "<td align='center'>" . NEWLINE;
    print "<select name='category'>" . NEWLINE;
    html_print_list_box_from_key_array(bug_get_categories($project_id, $blank = true), $selected = $filter_bug_category);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # COMPONENT
    print "<td align='center'>" . NEWLINE;
    print "<select name='component'>" . NEWLINE;
    html_print_list_box_from_key_array(bug_get_components($project_id, $blank = true), $selected = $filter_bug_component);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # VIEW CLOSED
    print "<td align='center'>" . NEWLINE;
    print "<select name='view_closed'>" . NEWLINE;
    $view_closed_options = array(lang_get('yes'), lang_get('no'));
    html_print_list_box_from_array($view_closed_options, $filter_view_closed);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # SEARCH
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='15' maxlength='25' name='bug_search' value='" . $filter_search . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    # JUMP
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='6' maxlength='6' name='filter_jump' value='" . $filter_jump . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
    print "<input type=hidden name=bug_form_filter_value value=true>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
}
        $ids .= $req_id . "|";
    }
} else {
    error_report_show($redirect_on_error, NO_REQ_SELECTED);
}
# Trim off last "|"
$version_ids = trim($version_ids, "|");
$ids = trim($ids, "|");
switch ($field) {
    case 'status':
        $form_title = lang_get('update_req_status');
        $possible_values = requirement_get_statuses();
        break;
    case 'assigned_release':
        $form_title = lang_get('update_req_release');
        $possible_values = admin_get_all_release_names($project_id, $blank = true);
        break;
}
print "<br>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<form method=post action={$action_page}>" . NEWLINE;
print "<input type='hidden' name='ids' value='{$ids}'>" . NEWLINE;
print "<input type='hidden' name='version_ids' value='{$version_ids}'>" . NEWLINE;
print "<input type='hidden' name=field value='{$field}'>" . NEWLINE;
print "<table class=width50>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
# FORM TITLE
print "<tr>" . NEWLINE;
print "<td class='form-data-l'><h4>{$form_title}</h4></td>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('found_in_release') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
$selected_value = session_validate_form_get_field('found_in_release');
print "<select name='found_in_release' size=1>" . NEWLINE;
$releases = admin_get_all_release_names($project_id, $blank = true);
html_print_list_box_from_array($releases, $selected_value);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# ASSIGN TO RELEASE
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('assign_to_release') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
$selected_value = session_validate_form_get_field('assign_to_release');
print "<select name='assign_to_release' size=1>" . NEWLINE;
$releases = admin_get_all_release_names($project_id, $blank = true);
html_print_list_box_from_array($releases, $selected_value);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# IMPLEMENTED IN RELEASE
/*print"<tr>". NEWLINE;
	print"<td class=form-lbl-r nowrap>". lang_get('implemented_in_release') ."</td>". NEWLINE;
	print"<td class=form-data-l>". NEWLINE;
		$selected_value = session_validate_form_get_field('implemented_in_release');
		print"<select name='implemented_in_release' size=1>". NEWLINE;
		$releases = admin_get_all_release_names( $project_id, $blank=true );
		html_print_list_box_from_array( $releases, $selected_value);
		print"</select>". NEWLINE;
		print"</td>". NEWLINE;
		print"</tr>". NEWLINE;*/