Skip to content

Commit

Permalink
Merge branch 'develop' into minor
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/install/mysql/migration/3.2.0-3.3.0.sql
  • Loading branch information
marcosgdf committed Sep 10, 2012
2 parents 45cd500 + 83179fc commit 74b28da
Show file tree
Hide file tree
Showing 34 changed files with 282 additions and 281 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -46,6 +46,7 @@ For users:
New experimental modules:
- New: Add margin and commissions management module.
- New: Add holiday module.
- New: Allow to search product from barcodes directly from the permanent mini search left box

- Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/modules.php
Expand Up @@ -150,8 +150,8 @@

// We discard modules according to features level (PS: if module is activated we always show it)
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && ! $conf->global->$const_name) $modulequalified=0;
if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && ! $conf->global->$const_name) $modulequalified=0;
if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)) $modulequalified=0;
if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)) $modulequalified=0;

if ($modulequalified)
{
Expand Down
10 changes: 5 additions & 5 deletions htdocs/admin/system/database.php
Expand Up @@ -56,11 +56,11 @@
print '</table>';

// Tables
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
print '</table>';
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
print '</table>';


$base=0;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/categories/categorie.php
Expand Up @@ -223,7 +223,7 @@
print '</td></tr>';
}

if (! empty($conf->global->MAIN_MODULE_BARCODE))
if (! empty($conf->barcode->enabled))
{
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
}
Expand Down
10 changes: 5 additions & 5 deletions htdocs/core/class/html.formbarcode.class.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008-2012 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
Expand Down Expand Up @@ -100,11 +100,11 @@ function setBarcodeEncoder($selected,$barcodelist,$code_id,$idForm='formbarcode'
* Return form to select type of barcode
*
* @param int $selected Id code pre-selected
* @param string $htmlname Nom de la zone select
* @param string $htmlname Name of HTML select field
* @param int $useempty Affiche valeur vide dans liste
* @return void
*/
function select_barcode_type($selected='',$htmlname='coder_id',$useempty=0)
function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0)
{
global $langs,$conf;

Expand Down Expand Up @@ -169,7 +169,7 @@ function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
{
print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setbarcodetype">';
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>';
$this->select_barcode_type($selected, $htmlname, 1);
Expand Down
18 changes: 9 additions & 9 deletions htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -689,15 +689,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools');
if ($leftmenu=="admintools")
{
$newmenu->add('/admin/system/dolibarr.php?mainmenu=home', $langs->trans('InfoDolibarr'), 1);
$newmenu->add('/admin/system/constall.php?mainmenu=home', $langs->trans('AllParameters'), 2);
$newmenu->add('/admin/system/modules.php?mainmenu=home', $langs->trans('Modules'), 2);
$newmenu->add('/admin/triggers.php?mainmenu=home', $langs->trans('Triggers'), 2);
$newmenu->add('/admin/system/os.php?mainmenu=home', $langs->trans('InfoOS'), 1);
$newmenu->add('/admin/system/web.php?mainmenu=home', $langs->trans('InfoWebServer'), 1);
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home', $langs->trans('InfoPHP'), 1);
//if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1);
$newmenu->add('/admin/system/database.php?mainmenu=home', $langs->trans('InfoDatabase'), 1);
$newmenu->add('/admin/system/dolibarr.php?mainmenu=home', $langs->trans('InfoDolibarr'), 1);
$newmenu->add('/admin/system/constall.php?mainmenu=home', $langs->trans('AllParameters'), 2);
$newmenu->add('/admin/system/modules.php?mainmenu=home', $langs->trans('Modules'), 2);
$newmenu->add('/admin/triggers.php?mainmenu=home', $langs->trans('Triggers'), 2);
$newmenu->add('/admin/system/os.php?mainmenu=home', $langs->trans('InfoOS'), 1);
$newmenu->add('/admin/system/web.php?mainmenu=home', $langs->trans('InfoWebServer'), 1);
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home', $langs->trans('InfoPHP'), 1);
//if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1);
$newmenu->add('/admin/system/database.php?mainmenu=home', $langs->trans('InfoDatabase'), 1);

$newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1);
$newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1);
Expand Down
8 changes: 5 additions & 3 deletions htdocs/core/modules/export/modules_export.php
Expand Up @@ -26,8 +26,7 @@


/**
* \class ModeleExports
* \brief Parent class for export modules
* Parent class for export modules
*/
class ModeleExports extends CommonDocGenerator // This class can't be abstract as there is instance propreties loaded by liste_modeles
{
Expand All @@ -41,7 +40,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac


/**
* Charge en memoire et renvoie la liste des modeles actifs
* Load into memory list of available export format
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
Expand Down Expand Up @@ -87,6 +86,9 @@ function liste_modeles($db,$maxfilenamelength=0)
}
closedir($handle);
}

asort($this->driverlabel);

return $this->driverlabel;
}

Expand Down
119 changes: 60 additions & 59 deletions htdocs/exports/index.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2012 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
Expand All @@ -18,7 +18,7 @@
/**
* \file htdocs/exports/index.php
* \ingroup export
* \brief Home page of export tools
* \brief Home page of export wizard
*/

require_once '../main.inc.php';
Expand Down Expand Up @@ -51,42 +51,10 @@

print '<table class="notopnoleftnoright" width="100%">';

print '<tr><td valign="top" width="40%" class="notopnoleft">';
print '<tr><td valign="top" width="70%" class="notopnoleft">';


// List of available export format
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
print '<td>'.$langs->trans("LibraryShort").'</td>';
print '<td align="right">'.$langs->trans("LibraryVersion").'</td>';
print '</tr>';

include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
$model=new ModeleExports();
$liste=$model->liste_modeles($db); // This is not a static method for exports because method load non static properties

$var=true;
foreach($liste as $key => $val)
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>';
$text=$model->getDriverDesc($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>';
print '</tr>';
}

print '</table>';


print '</td><td valign="top" width="60%" class="notopnoleftnoright">';


// Affiche les modules d'exports
// List export set
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>';
Expand All @@ -96,27 +64,27 @@
$var=true;
if (count($export->array_export_code))
{
foreach ($export->array_export_code as $key => $value)
{
$var=!$var;
print '<tr '.$bc[$var].'><td>';
//print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
print $export->array_export_module[$key]->getName();
print '</td><td>';
print img_object($export->array_export_module[$key]->getName(),$export->array_export_icon[$key]).' ';
$string=$langs->trans($export->array_export_label[$key]);
print ($string!=$export->array_export_label[$key]?$string:$export->array_export_label[$key]);
print '</td>';
// print '<td width="24">';
// print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&amp;datatoexport='.$export->array_export_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
// print '</td>';
print '</tr>';

}
foreach ($export->array_export_code as $key => $value)
{
$var=!$var;
print '<tr '.$bc[$var].'><td>';
//print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
print $export->array_export_module[$key]->getName();
print '</td><td>';
print img_object($export->array_export_module[$key]->getName(),$export->array_export_icon[$key]).' ';
$string=$langs->trans($export->array_export_label[$key]);
print ($string!=$export->array_export_label[$key]?$string:$export->array_export_label[$key]);
print '</td>';
// print '<td width="24">';
// print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&amp;datatoexport='.$export->array_export_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
// print '</td>';
print '</tr>';

}
}
else
{
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
}
print '</table>';
print '<br>';
Expand All @@ -133,18 +101,51 @@
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("NewExport").'</a>';
}
/*
print '<center><form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';
print ($user->rights->export->creer?'':' disabled="disabled"');
print '></form></center>';
print '<center><form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';
print ($user->rights->export->creer?'':' disabled="disabled"');
print '></form></center>';
*/
}
print '</center>';

print '</td></tr>';

print '</td><td valign="top" width="30%" class="notopnoleftnoright">';


// List of available export format
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
print '<td>'.$langs->trans("LibraryShort").'</td>';
print '<td align="right">'.$langs->trans("LibraryVersion").'</td>';
print '</tr>';

include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
$model=new ModeleExports();
$liste=$model->liste_modeles($db); // This is not a static method for exports because method load non static properties

$var=true;
foreach($liste as $key => $val)
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>';
$text=$model->getDriverDesc($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>';
print '</tr>';
}

print '</table>';

$db->close();

print '</td></tr>';
print '</table>';


llxFooter();

$db->close();
?>

0 comments on commit 74b28da

Please sign in to comment.