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 2017-11-03 18:21:44

llescano
Member
From: Buenos Aires - Argentina
Registered: 2017-09-14
Posts: 13

Center data in a column

Estimados,
Buenos dias.

Queria saber si es posible centrar el contenido de una columna para que no quede de izquierda a derecha.

Por lo que estuve viendo, tengo que modificar el archivo computer.class.php en C:\xampp\htdocs\glpi\inc

Me podrian indicar como hacerlo? Gracias.

------------------------------------------------------------------------------------------------------------------------------------

Dear,
Good morning.

I wanted to know if it is possible to center the content of a column so that it is not left to right.

From what I was seeing, I have to modify the computer.class.php file in C: \ xampp \ htdocs \ glpi \ inc

Could you tell me how to do it? Thank you.

------------------------------------------------------------------------------------------------------------------------------------

Cher,
Bonjour.

Je voulais savoir s'il est possible de centrer le contenu d'une colonne afin qu'elle ne soit pas à droite.

D'après ce que je voyais, je dois modifier le fichier computer.class.php dans C: \ xampp \ htdocs \ glpi \ inc

Pourriez-vous me dire comment le faire? Merci



GLPI 9.1.1 Copyright (C) 2015-2016 Teclib' - Copyright (C) 2003-2015 INDEPNET Development Team
FusionInventory 9.1+1.0 - Copyleft © 2010-2016 by FusionInventory Team

FluxBB bbcode test


Lucas Lescano
GLPI 9.4.5 + FusionInventory 9.4+1.1

Offline

#2 2017-11-03 18:36:32

btry
Moderator
Registered: 2015-10-01
Posts: 591

Re: Center data in a column

Hi

in the setup.php of your plugin add this function. Don't forget to replace yourplugin by... the name of your plugin.

// center all columns of plugin
function plugin_yourplugin_displayConfigItem($itemtype, $ID, $data, $num)
{
    return "align='center'";
}

See how this function is called in inc/search.class.php, method  Search::displayConfigItem()

I think this is what you need.


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

#3 2017-11-03 18:49:37

llescano
Member
From: Buenos Aires - Argentina
Registered: 2017-09-14
Posts: 13

Re: Center data in a column

btry wrote:

Hi

in the setup.php of your plugin add this function. Don't forget to replace yourplugin by... the name of your plugin.

// center all columns of plugin
function plugin_yourplugin_displayConfigItem($itemtype, $ID, $data, $num)
{
    return "align='center'";
}

See how this function is called in inc/search.class.php, method  Search::displayConfigItem()

I think this is what you need.


Hello! Thanks for answering.

It is not a plugin.
It is the "Computers" tab within "Inventory".

-----------------------------------------------------------------------------------------------------------------

Salut! Merci pour la réponse.

Ce n'est pas un plugin.
C'est l'onglet "Ordinateurs" dans "Inventaire".

FluxBB bbcode test


Lucas Lescano
GLPI 9.4.5 + FusionInventory 9.4+1.1

Offline

#4 2017-11-03 18:56:12

btry
Moderator
Registered: 2015-10-01
Posts: 591

Re: Center data in a column

There is no way to do this with a setting.

Reading the  Search::displayConfigItem() method, it appears you may do this with a plugin, by using the snippet I gave to you. This is less intrusive than modifying GLPI, and will not void your warranty wink


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

Board footer

Powered by FluxBB