iDisplay Limit User Variable

Chris Morgan cmorgan at alum.wpi.edu
Thu Feb 9 21:21:37 CST 2006


I'm wondering if this is adding too much complexity to the display of the test 
results.  Will many users really care to see more than say 5 of the testing 
results?  Does it help them to show them varying numbers of entries?


On Tuesday 07 February 2006 1:27 pm, Jason Weisberger wrote:
> Allows the user to display the selected amount of testing results.
>
> Changelog: include/testResults.php
>
> Index: appdb/include/testResults.php
> ===================================================================
> RCS file: /home/wine/appdb/include/testResults.php,v
> retrieving revision 1.9
> diff -u -r1.9 testResults.php
> --- appdb/include/testResults.php    28 Jan 2006 22:53:28 -0000    1.9
> +++ appdb/include/testResults.php    7 Feb 2006 18:23:52 -0000
> @@ -349,23 +349,25 @@
>      // Show the Test results for a application version
>      function ShowVersionsTestingTable($iVersionId, $iCurrentTest, $link,
> $iDisplayLimit)
>      {
> -        $showAll = $_REQUEST['showAll'];
> +    $iDisplayLimit = $_REQUEST['iDisplayLimit'];
> +

Do you really want to override the display limit passed into the function?



> -        echo '<form method=get action="'.$PHP_SELF.'">';
> -        echo '<input name="versionId" type=hidden value="',$iVersionId,'"
> />';
> -        if($rowsUsed >= $iDisplayLimit && !is_string($showAll))
> -            echo '<input class="button" name="showAll" type=submit
> value="Show All Tests" />';
> +    echo '<form method=get action="'.$PHP_SELF.'">';
> +    echo '<input name="versionId" type=hidden value="',$iVersionId,'" />';
> +    if($rowsUsed >= 5) {
> +        echo 'Tests:<select name="iDisplayLimit">';
> +            echo '<option value="5"'; if($iDisplayLimit == 5) { echo '
> selected="selected"';} echo '>5</option>';
> +            echo '<option value="10"'; if($iDisplayLimit == 10) { echo '
> selected="selected"';} echo '>10</option>';
> +            echo '<option value="15"'; if($iDisplayLimit == 15) { echo '
> selected="selected"';} echo '>15</option>';
> +            echo '<option value="20"'; if($iDisplayLimit == 20) { echo '
> selected="selected"';} echo '>20</option>';
> +            echo '<option value="ALL"'; if($iDisplayLimit == "ALL") { echo
> ' selected="selected"';} echo '>ALL</option>';
> +            echo '</select>';

You can use a for() loop to generate all of these entries.



More information about the wine-patches mailing list