N'affiche pas onglet apercu propal si option MAIN_USE_PREVIEW_TABLE mis à 0

This commit is contained in:
Laurent Destailleur 2005-09-16 01:23:29 +00:00
parent ed0b632eeb
commit d4f43f1fed
8 changed files with 86 additions and 69 deletions

View File

@ -382,9 +382,12 @@ 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');

View File

@ -20,7 +20,6 @@
* *
* $Id$ * $Id$
* $Source$ * $Source$
*
*/ */
/** /**
@ -85,10 +84,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");
$hselected=$h; $hselected=$h;
$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');

View File

@ -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,9 +106,12 @@ if ($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');
@ -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,13 +141,10 @@ if ($propalid > 0)
clearstatcache(); clearstatcache();
$errorlevel=error_reporting(); if (is_dir($upload_dir))
error_reporting(0); {
$handle=opendir($upload_dir); $handle=opendir($upload_dir);
error_reporting($errorlevel);
print '<table width="100%" class="noborder">';
if ($handle) if ($handle)
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -169,7 +172,7 @@ if ($propalid > 0)
} }
else else
{ {
echo '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?propalid='.$propal->id.'&action=delete&urlfile='.urlencode($file).'">'.$langs->trans('Delete').'</a>'; 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"; print "</td></tr>\n";
} }
@ -180,6 +183,8 @@ if ($propalid > 0)
{ {
print '<div class="error">'.$langs->trans('ErrorCantOpenDir').'<b> '.$upload_dir.'</b></div>'; print '<div class="error">'.$langs->trans('ErrorCantOpenDir').'<b> '.$upload_dir.'</b></div>';
} }
}
print '</table>'; print '</table>';
print '</div>'; print '</div>';

View File

@ -65,9 +65,12 @@ if ($_GET['propalid'])
$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');

View File

@ -84,9 +84,12 @@ if ($_GET['propalid'])
$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');

View File

@ -109,9 +109,12 @@ 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');

View File

@ -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';");
} }

View File

@ -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; }