N'affiche pas onglet apercu propal si option MAIN_USE_PREVIEW_TABLE mis à 0
This commit is contained in:
parent
ed0b632eeb
commit
d4f43f1fed
@ -382,10 +382,13 @@ if ($_GET['propalid'] > 0)
|
|||||||
$head[$h][1] = $langs->trans('AccountancyCard');
|
$head[$h][1] = $langs->trans('AccountancyCard');
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
if ($conf->use_preview_tabs)
|
||||||
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
$h++;
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,11 +84,14 @@ if ($_GET["propalid"] > 0) {
|
|||||||
$head[$h][1] = $langs->trans('AccountancyCard');
|
$head[$h][1] = $langs->trans('AccountancyCard');
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
if ($conf->use_preview_tabs)
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
{
|
||||||
$hselected=$h;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
$h++;
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
|
$hselected=$h;
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -76,6 +76,7 @@ if ($propalid > 0)
|
|||||||
{
|
{
|
||||||
$propref = sanitize_string($propal->ref);
|
$propref = sanitize_string($propal->ref);
|
||||||
$upload_dir = $conf->propal->dir_output.'/'.$propref;
|
$upload_dir = $conf->propal->dir_output.'/'.$propref;
|
||||||
|
|
||||||
if ( $error_msg )
|
if ( $error_msg )
|
||||||
{
|
{
|
||||||
echo '<B>'.$error_msg.'</B><BR><BR>';
|
echo '<B>'.$error_msg.'</B><BR><BR>';
|
||||||
@ -105,10 +106,13 @@ if ($propalid > 0)
|
|||||||
$head[$h][1] = $langs->trans('AccountancyCard');
|
$head[$h][1] = $langs->trans('AccountancyCard');
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
if ($conf->use_preview_tabs)
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
{
|
||||||
$h++;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$h++;
|
$h++;
|
||||||
@ -126,6 +130,8 @@ if ($propalid > 0)
|
|||||||
|
|
||||||
print_titre($langs->trans('AssociatedDocuments').' '.$propal->ref_url);
|
print_titre($langs->trans('AssociatedDocuments').' '.$propal->ref_url);
|
||||||
|
|
||||||
|
print '<table width="100%" class="noborder">';
|
||||||
|
|
||||||
print '<form name="userfile" action="document.php?propalid='.$propal->id.'" enctype="multipart/form-data" method="POST">';
|
print '<form name="userfile" action="document.php?propalid='.$propal->id.'" enctype="multipart/form-data" method="POST">';
|
||||||
print '<input type="hidden" name="max_file_size" value="2000000">';
|
print '<input type="hidden" name="max_file_size" value="2000000">';
|
||||||
print '<input type="file" name="userfile" size="40" maxlength="80" class="flat"><br>';
|
print '<input type="file" name="userfile" size="40" maxlength="80" class="flat"><br>';
|
||||||
@ -135,51 +141,50 @@ if ($propalid > 0)
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$errorlevel=error_reporting();
|
if (is_dir($upload_dir))
|
||||||
error_reporting(0);
|
{
|
||||||
$handle=opendir($upload_dir);
|
|
||||||
error_reporting($errorlevel);
|
$handle=opendir($upload_dir);
|
||||||
|
if ($handle)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans('Document').'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans('Size').'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
$var=true;
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td>';
|
||||||
|
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=propal&file='.$propref.'/'.urlencode($file).'">'.$file.'</a>';
|
||||||
|
print "</td>\n";
|
||||||
|
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
|
||||||
|
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
if ($file == $propref . '.pdf')
|
||||||
|
{
|
||||||
|
echo '-';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?propalid='.$propal->id.'&action=delete&urlfile='.urlencode($file).'">'.img_delete($langs->trans('Delete')).'</a>';
|
||||||
|
}
|
||||||
|
print "</td></tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<div class="error">'.$langs->trans('ErrorCantOpenDir').'<b> '.$upload_dir.'</b></div>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<table width="100%" class="noborder">';
|
}
|
||||||
|
|
||||||
if ($handle)
|
|
||||||
{
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td>'.$langs->trans('Document').'</td>';
|
|
||||||
print '<td align="right">'.$langs->trans('Size').'</td>';
|
|
||||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
|
||||||
print '<td> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
$var=true;
|
|
||||||
while (($file = readdir($handle))!==false)
|
|
||||||
{
|
|
||||||
if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
|
||||||
{
|
|
||||||
$var=!$var;
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print '<td>';
|
|
||||||
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=propal&file='.$propref.'/'.urlencode($file).'">'.$file.'</a>';
|
|
||||||
print "</td>\n";
|
|
||||||
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
|
|
||||||
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
|
|
||||||
print '<td align="center">';
|
|
||||||
if ($file == $propref . '.pdf')
|
|
||||||
{
|
|
||||||
echo '-';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?propalid='.$propal->id.'&action=delete&urlfile='.urlencode($file).'">'.$langs->trans('Delete').'</a>';
|
|
||||||
}
|
|
||||||
print "</td></tr>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<div class="error">'.$langs->trans('ErrorCantOpenDir').'<b> '.$upload_dir.'</b></div>';
|
|
||||||
}
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -65,10 +65,13 @@ if ($_GET['propalid'])
|
|||||||
$head[$h][1] = $langs->trans('AccountancyCard');
|
$head[$h][1] = $langs->trans('AccountancyCard');
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
if ($conf->use_preview_tabs)
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
{
|
||||||
$h++;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -84,10 +84,13 @@ if ($_GET['propalid'])
|
|||||||
$head[$h][1] = $langs->trans('AccountancyCard');
|
$head[$h][1] = $langs->trans('AccountancyCard');
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
if ($conf->use_preview_tabs)
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
{
|
||||||
$h++;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$hselected=$h;
|
$hselected=$h;
|
||||||
|
|||||||
@ -109,10 +109,13 @@ if ($_GET["propalid"])
|
|||||||
$hselected=$h;
|
$hselected=$h;
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
if ($conf->use_preview_tabs)
|
||||||
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
$h++;
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id;
|
||||||
$head[$h][1] = $langs->trans('Note');
|
$head[$h][1] = $langs->trans('Note');
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -115,10 +115,8 @@ if ($_POST["action"] == "set")
|
|||||||
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
|
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
|
||||||
|
|
||||||
// Si install non Français, on configure pour fonctionner en mode internationnal
|
// Si install non Français, on configure pour fonctionner en mode internationnal
|
||||||
if ($langs->defaultlang != "fr_FR") {
|
if ($langs->defaultlang != "fr_FR")
|
||||||
|
{
|
||||||
$db->query("INSERT INTO llx_const(name,value,type,visible) values ('COMPANY_CREATE_TWO_STEPS','1','yesno',0)");
|
|
||||||
|
|
||||||
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRETOP';");
|
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRETOP';");
|
||||||
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRELEFT';");
|
$db->query("UPDATE llx_const set value='eldy.php' WHERE name='MAIN_MENU_BARRELEFT';");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -150,7 +150,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
|||||||
if ($user->rights->societe->creer)
|
if ($user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Fiche societe en mode création (Creation en 1 ou 2 temps selon COMPANY_CREATE_TWO_STEPS)
|
* Fiche societe en mode création
|
||||||
*/
|
*/
|
||||||
$soc->fournisseur=0;
|
$soc->fournisseur=0;
|
||||||
if ($_GET["type"]=='f') { $soc->fournisseur=1; }
|
if ($_GET["type"]=='f') { $soc->fournisseur=1; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user