Start to debug/fix module IPP
This commit is contained in:
parent
0c9bc2ac5f
commit
0b35217481
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -104,14 +104,14 @@ class modPrintIPP extends DolibarrModules
|
||||
$r=0;
|
||||
|
||||
// This is to declare the Top Menu entry:
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home', // Put 0 if this is a top menu
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Put 0 if this is a top menu
|
||||
'type'=>'left', // This is a Top menu entry
|
||||
'titre'=>'Printer',
|
||||
'mainmenu'=>'printer',
|
||||
'url'=>'/printipp/index.php',
|
||||
'langs'=>'printipp', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>100,
|
||||
'enabled'=>'$conf->printipp->enabled',
|
||||
'position'=>300,
|
||||
'enabled'=>'$conf->printipp->enabled && $leftmenu==\'modulesadmintools\'',
|
||||
'perms'=>'$user->rights->printipp->read', // Use 'perms'=>'1' if you want your menu with no permission rules
|
||||
'target'=>'',
|
||||
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
|
||||
|
||||
@ -33,6 +33,7 @@ CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Schedul
|
||||
#
|
||||
# Menu
|
||||
#
|
||||
CronJobs=Scheduled jobs
|
||||
CronListActive= List of active jobs
|
||||
CronListInactive= List of disabled jobs
|
||||
|
||||
|
||||
10
htdocs/langs/en_US/printipp.lang
Normal file
10
htdocs/langs/en_US/printipp.lang
Normal file
@ -0,0 +1,10 @@
|
||||
# Dolibarr language file - Source file is en_US - printipp
|
||||
CHARSET=UTF-8
|
||||
PrintIPPSetup=Setup of module Direct Print
|
||||
PrintIPPDesc=Ce module permet d'ajouter un bouton d'impression direct des documents vers votre imprimante. Il requiert un systeme Linux équipé de Cups.
|
||||
PRINTIPP_ENABLED=Show picto "Direct print" into list of documents
|
||||
PRINTIPP_HOST=Print server
|
||||
PRINTIPP_PORT=Port
|
||||
PRINTIPP_USER=Login
|
||||
PRINTIPP_PASSWORD=Password
|
||||
NoPrinterFound=No printers found (check your Cups etup)
|
||||
@ -343,7 +343,7 @@ SecurityTokenIsUnique=Utiliser un paramètre securekey unique pour chaque URL ?
|
||||
EnterRefToBuildUrl=Entrer la référence pour l'objet %s
|
||||
GetSecuredUrl=Obtenir l'URL calculée
|
||||
ButtonHideUnauthorized=Cacher les boutons non autorisés (au lieu de les voir grisés)
|
||||
ProductVatMassChange=Modification de TVA en masse
|
||||
ProductVatMassChange=Modification TVA en masse
|
||||
ProductVatMassChangeDesc=Cette page permet de modifier les taux de TVA définis sur les produits ou services d'une valeur vers une autre. Attention, la modification est réalisée en masse sur toute la base de données.
|
||||
OldVATRates=Ancien taux de TVA
|
||||
NewVATRates=Nouveau taux de TVA
|
||||
|
||||
@ -33,6 +33,7 @@ CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez uti
|
||||
#
|
||||
# Menu
|
||||
#
|
||||
CronJobs=Travaux planifiés
|
||||
CronListActive= Liste des travaux actifs
|
||||
CronListInactive= Liste des travaux inactifs
|
||||
|
||||
@ -50,7 +51,7 @@ CronDelete= Supprimer les travaux cron
|
||||
CronConfirmDelete= Êtes-vous sûr de vouloir supprimer ces travaux cron ?
|
||||
CronExecute=Lancer cette tâche
|
||||
CronConfirmExecute= Êtes-vous sûr de vouloir lancer ce travail maintenant?
|
||||
CronInfo= Les travaux permettent d'exécuter des tâches à intervales réguliers
|
||||
CronInfo= Les travaux planifiés permettent d'exécuter des tâches à intervales réguliers
|
||||
CronWaitingJobs=Travaux en attente
|
||||
CronTask=Tâche
|
||||
CronNone= Aucun(e)
|
||||
|
||||
10
htdocs/langs/fr_FR/printipp.lang
Normal file
10
htdocs/langs/fr_FR/printipp.lang
Normal file
@ -0,0 +1,10 @@
|
||||
# Dolibarr language file - Source file is en_US - printipp
|
||||
CHARSET=UTF-8
|
||||
PrintIPPSetup=Configuration du module Impression direct IPP
|
||||
PrintIPPDesc=Ce module permet d'ajouter un bouton d'impression direct des documents vers votre imprimante. Il requiert un systeme Linux équipé de Cups.
|
||||
PRINTIPP_ENABLED=Affiche le logo "Impression directe" sur les listes de documents
|
||||
PRINTIPP_HOST=Serveur impression
|
||||
PRINTIPP_PORT=Port
|
||||
PRINTIPP_USER=Login
|
||||
PRINTIPP_PASSWORD=Mot de passe
|
||||
NoPrinterFound=Aucune imprimante trouvée (vérifiez votre configuration Cups)
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -44,11 +44,7 @@ if (!$mode) $mode='config';
|
||||
if ($action == 'setvalue' && $user->admin)
|
||||
{
|
||||
$db->begin();
|
||||
if (GETPOST('PRINTIPP_ENABLED','alpha') == '1') $result=dolibarr_set_const($db, "PRINTIPP_ENABLED",1,'yesno',0,'',$conf->entity);
|
||||
else
|
||||
{
|
||||
$result=dolibarr_del_const($db, "PRINTIPP_ENABLED",$conf->entity);
|
||||
}
|
||||
|
||||
if (! $result > 0) $error++;
|
||||
$result=dolibarr_set_const($db, "PRINTIPP_HOST",GETPOST('PRINTIPP_HOST','alpha'),'chaine',0,'',$conf->entity);
|
||||
if (! $result > 0) $error++;
|
||||
@ -89,8 +85,7 @@ dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"));
|
||||
|
||||
print $langs->trans("PrintIPPDesc")."<br>\n";
|
||||
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
if ($mode=='config'&& $user->admin)
|
||||
{
|
||||
@ -103,7 +98,7 @@ if ($mode=='config'&& $user->admin)
|
||||
|
||||
$var=true;
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("AccountParameter").'</td>';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -191,7 +186,7 @@ if ($mode=='test'&& $user->admin)
|
||||
{
|
||||
$var=!$var;
|
||||
$printer_det = $printer->get_printer_detail($value);
|
||||
print "<tr $bc[$var]>";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$value.'</td>';
|
||||
//print '<td><pre>'.print_r($printer_det,true).'</pre></td>';
|
||||
print '<td>'.$printer_det->printer_name->_value0.'</td>';
|
||||
@ -206,6 +201,8 @@ if ($mode=='test'&& $user->admin)
|
||||
print "</tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
if (count($list) == 0) print $langs->trans("NoPrinterFound");
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user