Why not restrict visibility using the selection of entities in the header ?
Regards
Julien
ijez a écrit :
> Hi,
>
> Follow-up for the Entity List Wish list, I made a new patch against
> tracking.function.php ( GLPI Trunk-14-11-2007 ), This patch will create a new
> Entity column after the requester column. This entity list is to simplify the
> admin job when checking the origin of the ticket.
>
> Thanks and Regards,
>
> =================== Begin tracking.function.php patch
> =====================================
>
> --- tracking.function.php 2007-11-14 13:25:55.000000000 +0800
> +++ inc/tracking.function.php 2007-12-20 14:32:50.000000000 +0800
> @@ -118,6 +118,9 @@
> $LANG["common"][27]=>"glpi_tracking.date",
> $LANG["joblist"][2]=>"glpi_tracking.priority",
> $LANG["job"][4]=>"glpi_tracking.author",
> + // Add entity for the entries column - 20-12-2007
> + $LANG["entity"][0]=>"glpi_tracking.fk_entities",
> + // End the entity entries column - 20-12-2007
> $LANG["joblist"][4]=>"glpi_tracking.assign",
> $LANG["common"][1]=>"glpi_tracking.device_type,glpi_tracking.computer",
> $LANG["common"][36]=>"glpi_dropdown_tracking_category.completename",
> @@ -405,8 +408,9 @@
> // Prints a job in short form
> // Should be called in a <table>-segment
> // Print links or not in case of user view
> -
> - global $CFG_GLPI, $LANG;
> +
> + // Add global database $DB so we could create a query - 20-12-2007
> + global $DB, $CFG_GLPI, $LANG;
>
> // Make new job object and fill it from database, if success, print it
> $job = new Job;
> @@ -498,6 +502,21 @@
> $fourth_col.="<br>".$data["groupname"];
>
> echo displaySearchItem($output_type,$fourth_col,$item_num,$row_num,$align);
> +
> + // New column - Entity List for ticket origin - 20-12-2007
> + $entity_col="";
> + if ($data["FK_entities"]){
> + $EntityQuery="SELECT completename FROM glpi_entities WHERE
> id=".$data['FK_entities'].";";
> + //echo $EntityQuery;
> + $EntityResult=$DB->query($EntityQuery);
> + if ($DB->numrows($EntityResult)>0){
> + while ($EntityData=$DB->fetch_array($EntityResult)){
> + $entity_col=$EntityData['completename'];
> + }
> + }
> + }
> + echo
> displaySearchItem($output_type,"<strong>".$entity_col."</strong>",$item_num,$row_num,$align."width='600'");
> + // End Entity List
>
> // Fifth column
> $fifth_col="";
>
> ========================== End tracking.function.php patch
> ==================================
>
> _______________________________________________
> Glpi-user mailing list
> [email protected]
> https://mail.gna.org/listinfo/glpi-user
>
_______________________________________________
Glpi-user mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-user