You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2010-04-19 18:37:14

gvargasdc
Member
Registered: 2009-10-21
Posts: 34

Print Number of items founds on Global Search results

Techs complained that Global search results did not include the number of items found on each type of equipment. They say it was specially confusing when there were more than 10 items, since global search will display the first 10 only.

It will be very easy to add a (Found: X) next to the item type (in the heading). Example: "Computers (Found: 23) All" (in english). I submit the following patch for inc/search.function.php under function showList() for your consideration on future releases (I believe it's very simple, harmless, but useful):

if ($output_type==GLOBAL_SEARCH){
                        $ci = new CommonItem();
                        $ci->setType($type);
                        echo "<div class='center'><h2>".$ci->getType($type);
                        echo " (".$LANG['common'][89].":".$numrows.")";
                        // More items
                        if ($numrows>$start+GLOBAL_SEARCH_DISPLAY_COUNT){
                                echo "(".$LANG['common'][90].":".GLOBAL_SEARCH_DISPLAY_COUNT.") <a href='$target?$parameters'>".$LANG['common'][66]."</a>";
                        }       
                        echo "</h2></div>";
                }       

That's around line 1102.

This requires two additional entries to locale file:

$LANG['common'][89]="Found";
$LANG['common'][90]="Showing";

Thank you.


Glpi: 10.0.1

Offline

Board footer

Powered by FluxBB