diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php
index 3e628c8fa1f..d5c8e4b2368 100644
--- a/htdocs/exports/index.php
+++ b/htdocs/exports/index.php
@@ -121,14 +121,26 @@ else
print '
| '.$langs->trans("NoExportableData").' |
';
}
print '';
+print '
';
+print '';
if (sizeof($export->array_export_code))
{
+ if ($user->rights->export->creer)
+ {
+ print ''.$langs->trans("NewExport").'';
+ }
+ else
+ {
+ print ''.$langs->trans("NewExport").'';
+ }
+ /*
print '';
+ */
}
-
+print '';
print '';
print '';
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 74a2357ea9b..2e327de20a6 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -857,7 +857,7 @@ if ($step == 4 && $datatoimport)
{
//$var=!$var;
$nbofnotimportedfields++;
- show_elem($fieldssource,$lefti,$key,'',$var);
+ show_elem($fieldssource,$lefti,$key,'',$var,'nostyle');
//print '> '.$lefti.'-'.$key;
$listofkeys[$key]=1;
$lefti++;
@@ -866,7 +866,7 @@ if ($step == 4 && $datatoimport)
// Print one more empty field
$newkey=getnewkey($fieldssource,$listofkeys);
- show_elem($fieldssource,$lefti,$newkey,'',$var);
+ show_elem($fieldssource,$lefti,$newkey,'',$var,'nostyle');
//print '> '.$lefti.'-'.$newkey;
$listofkeys[$newkey]=1;
$nbofnotimportedfields++;
@@ -880,7 +880,7 @@ if ($step == 4 && $datatoimport)
while ($i < $nbofnotimportedfields)
{
// Print empty cells
- show_elem('','','','none',$var);
+ show_elem('','','','none',$var,'nostyle');
$i++;
}
print '';
@@ -1172,15 +1172,24 @@ if ($step == 5 && $datatoimport)
print '
';
print $langs->trans("NowClickToTestTheImport",$langs->transnoentitiesnoconv("RunSimulateImportFile")).'
';
- print '
';
- print '';
- print '';
- print '';
print '';
+ // Actions
+ print '';
+ if ($user->rights->import->run)
+ {
+ print ''.$langs->trans("RunSimulateImportFile").'';
+ }
+ else
+ {
+ print ''.$langs->trans("RunSimulateImportFile").'';
+ }
+ /*print '';*/
+ print '';
+
if ($mesg) print $mesg;
}
@@ -1196,7 +1205,7 @@ llxFooter('$Date$ - $Revision$');
/*
* Function to put the movable box of a source field
*/
-function show_elem($fieldssource,$i,$pos,$key,$var)
+function show_elem($fieldssource,$i,$pos,$key,$var,$nostyle='')
{
global $langs,$bc;
@@ -1204,27 +1213,31 @@ function show_elem($fieldssource,$i,$pos,$key,$var)
print ''."\n";
print '
'."\n";
- print '';
if ($pos && $pos > sizeof($fieldssource)) // NoFields
{
+ print '
';
print '| ';
print img_picto(($pos>0?$langs->trans("MoveField",$pos):''),'uparrow','class="boxhandle" style="cursor:move;"');
print ' | ';
print '';
print $langs->trans("NoFields");
print ' | ';
+ print '
';
}
elseif ($key == 'none')
{
+ print '';
print '| ';
print ' ';
print ' | ';
print '';
print ' ';
print ' | ';
+ print '
';
}
else // Print field of source file
{
+ print '';
//print '| '.img_file('','').' | ';
print '';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
@@ -1234,8 +1247,8 @@ function show_elem($fieldssource,$i,$pos,$key,$var)
print $langs->trans("Field").' '.$pos;
if (! empty($fieldssource[$pos]['example1'])) print ' ('.$fieldssource[$pos]['example1'].')';
print ' | ';
+ print '
';
}
- print '';
print "
\n";
diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php
index bbbe321166d..254cf44e826 100644
--- a/htdocs/imports/index.php
+++ b/htdocs/imports/index.php
@@ -117,11 +117,21 @@ else
print '
| '.$langs->trans("NoImportableData").' |
';
}
print '';
+print '
';
+print '
';
if (sizeof($import->array_import_code))
{
- print '';
+ //if ($user->rights->import->run)
+ //{
+ print ''.$langs->trans("NewImport").'';
+ //}
+ //else
+ //{
+ // print ''.$langs->trans("NewImport").'';
+ //}
}
+print '';
/*
// Affiche les profils d'exports