コード例 #1
0
 print "<table align=center rules=cols class=width95>" . NEWLINE;
 print "<tr>" . NEWLINE;
 html_tbl_print_sortable_header(lang_get('testset_id'), TS_TBL . "." . TS_ID, $order_by, $order_dir);
 html_tbl_print_sortable_header(lang_get('testset_name'), TS_TBL . "." . TS_NAME, $order_by, $order_dir);
 html_tbl_print_sortable_header(lang_get('build_name'), BUILD_TBL . "." . BUILD_NAME, $order_by, $order_dir);
 html_tbl_print_sortable_header(lang_get('release_name'), RELEASE_TBL . "." . RELEASE_NAME, $order_by, $order_dir);
 html_tbl_print_sortable_header(lang_get('tests'));
 # Display table headers based on the statuses of the project
 foreach ($statuses as $status) {
     html_tbl_print_header($status);
 }
 html_tbl_print_sortable_header(lang_get('testset_date_received'), TS_TBL . "." . TS_DATE_CREATED, $order_by, $order_dir);
 print "</tr>" . NEWLINE;
 foreach ($rows_testsets as $row_testset) {
     $testset_id = $row_testset[TS_ID];
     $num_tests = admin_count_tests_in_testset($testset_id);
     #$testset_name = admin_get_testset_name( $testset_id );
     $testset_name = $row_testset[TS_NAME];
     $testset_build_id = admin_get_build_id_from_testset_id($testset_id);
     #$testset_build_name = admin_get_build_name($testset_build_id);
     $testset_build_name = $row_testset[BUILD_NAME];
     $testset_release_id = admin_get_release_id_from_build_id($testset_build_id);
     #$testset_release_name = admin_get_release_name($testset_release_id);
     $testset_release_name = $row_testset[RELEASE_NAME];
     $testset_date_created = $row_testset[TS_DATE_CREATED];
     $display_test_id = util_pad_id($testset_id);
     $results_url = $results_page . "?release_id={$testset_release_id}&amp;build_id={$testset_build_id}&amp;testset_id={$testset_id}";
     $row_style = html_tbl_alternate_bgcolor($row_style);
     print "<tr class={$row_style}>" . NEWLINE;
     if ($num_tests > 0) {
         print "<td class='tbl-data-c'><a href='{$results_url}'>{$display_test_id}</a></td>";
コード例 #2
0
 if ($locked) {
     $lock_link = 'unlock';
     $lockdatetext = 'locked_on';
 } else {
     $lock_link = 'lock';
     $lockdatetext = 'unlocked_on';
 }
 # Format testset_id and date.  Alternate bg_color
 $formatted_testset_id = sprintf("%05s", trim($testset_id));
 $formatted_date_created = substr($testset_date_created, 0, 10);
 $formatted_signoff_date = substr($testset_signoff_date, 0, 10);
 $formatted_lock_date = substr($testset_lock_date, 0, 10);
 $row_style = html_tbl_alternate_bgcolor($row_style);
 # Display table data
 print "<tr class='{$row_style}'>" . NEWLINE;
 $number_of_tests = admin_count_tests_in_testset($testset_id);
 if ($number_of_tests > 0) {
     print "<td align='center'><a href='{$page}?{$query_string}&amp;testset_id={$testset_id}'>{$formatted_testset_id}</a></td>" . NEWLINE;
 } else {
     print "<td align='center'>{$formatted_testset_id}</td>" . NEWLINE;
 }
 # Remove up arrow from the first record and down arrow from the last record if there is more than one testset
 if ($max_orderby > 1) {
     if ($testset_orderby != 1) {
         #print"<td align='center'><a href='testset_reorder.php?$query_string&amp;testset_id=$testset_id&amp;row=$testset_orderby&amp;move=up'><img src='./images/up_arrow.gif' width=10 height=10 border=0></a></td>". NEWLINE;
         print "<td align='center'><img src='./images/up_arrow.gif' width=10 height=10 border=0></td>" . NEWLINE;
     } else {
         print "<td align='center'></td>" . NEWLINE;
     }
     if ($testset_orderby != $max_orderby) {
         #print"<td align='center'><a href='testset_reorder.php?$query_string&amp;testset_id=$testset_id&amp;row=$testset_orderby&amp;move=down'><img src='./images/down_arrow.gif' width=10 height=10 border=0></a></td>". NEWLINE;