Look: Uniformize pages look

This commit is contained in:
Laurent Destailleur 2009-03-02 19:07:12 +00:00
parent 61e2282cb1
commit 3dadf24d10
15 changed files with 180 additions and 178 deletions

View File

@ -710,7 +710,7 @@ if ($action == 'create')
$htmls = new Form($db); $htmls = new Form($db);
$adht = new AdherentType($db); $adht = new AdherentType($db);
print_titre($langs->trans("NewMember")); print_fiche_titre($langs->trans("NewMember"));
print '<form name="add" action="fiche.php" method="post" enctype="multipart/form-data">'; print '<form name="add" action="fiche.php" method="post" enctype="multipart/form-data">';
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';

View File

@ -95,8 +95,8 @@ if ($_POST["action"] == 'update' && $user->rights->categorie->creer)
llxHeader("","",$langs->trans("Categories")); llxHeader("","",$langs->trans("Categories"));
print_titre($langs->trans("ModifCat")); print_fiche_titre($langs->trans("ModifCat"));
print "<br>";
if ($mesg) if ($mesg)
{ {

View File

@ -814,7 +814,7 @@ $formorder = new FormOrder($db);
*********************************************************************/ *********************************************************************/
if ($_GET['action'] == 'create' && $user->rights->commande->creer) if ($_GET['action'] == 'create' && $user->rights->commande->creer)
{ {
print_titre($langs->trans('CreateOrder')); print_fiche_titre($langs->trans('CreateOrder'));
if ($mesg) print $mesg.'<br>'; if ($mesg) print $mesg.'<br>';

View File

@ -21,24 +21,22 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
/* // Security check
* Sécurité accés
*/
if (!$user->admin && $user->societe_id > 0) if (!$user->admin && $user->societe_id > 0)
accessforbidden(); accessforbidden();
/*
* View
*/
llxHeader(); llxHeader();
print_titre("Paiements"); print_fiche_titre("Payments");
/*
*
*
*/
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter('$Date$ - $Revision$');
?> ?>

View File

@ -365,7 +365,7 @@ llxHeader('','','');
// Mode creation // Mode creation
if ($_GET['action'] == 'create') if ($_GET['action'] == 'create')
{ {
print_titre($langs->trans('NewBill')); print_fiche_titre($langs->trans('NewBill'));
if ($mesg) { print $mesg.'<br>'; } if ($mesg) { print $mesg.'<br>'; }
@ -471,7 +471,7 @@ else
if ($_GET['action'] == 'edit') if ($_GET['action'] == 'edit')
{ {
print_titre($langs->trans('SupplierInvoice')); print_fiche_titre($langs->trans('SupplierInvoice'));
print '<form name="update" action="fiche.php?facid='.$fac->id.'" method="post">'; print '<form name="update" action="fiche.php?facid='.$fac->id.'" method="post">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';

View File

@ -39,7 +39,7 @@ if (!$user->rights->produit->lire) accessforbidden();
llxHeader("","",$langs->trans("ProductsAndServices")); llxHeader("","",$langs->trans("ProductsAndServices"));
print_titre($langs->trans("ProductsAndServicesArea")); print_fiche_titre($langs->trans("ProductsAndServicesArea"));
print '<table border="0" width="100%">'; print '<table border="0" width="100%">';

View File

@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/fourn/product/photos.php \file htdocs/fourn/product/photos.php
\ingroup product \ingroup product
\brief Page de la fiche produit \brief Page de la fiche produit
\version $Id$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php");
@ -37,13 +37,13 @@ if (!$user->rights->produit->lire) accessforbidden();
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
if ($_GET["id"]) if ($_GET["id"])
{ {
$product = new Product($db); $product = new Product($db);
$result = $product->fetch($_GET["id"]); $result = $product->fetch($_GET["id"]);
$product->add_photo($conf->produit->dir_output, $_FILES['photofile']); $product->add_photo($conf->produit->dir_output, $_FILES['photofile']);
} }
} }
/* /*
* *
@ -55,161 +55,161 @@ llxHeader("","",$langs->trans("CardProduct0"));
*/ */
if ($_GET["id"]) if ($_GET["id"])
{ {
$product = new Product($db); $product = new Product($db);
$result = $product->fetch($_GET["id"]); $result = $product->fetch($_GET["id"]);
if ( $result ) if ( $result )
{
/*
* En mode visu
*/
$h=0;
$head[$h][0] = DOL_URL_ROOT."/fourn/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Card");
$h++;
if ($conf->stock->enabled)
{ {
/*
* En mode visu
*/
$h=0;
$head[$h][0] = DOL_URL_ROOT."/fourn/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Card");
$h++;
if ($conf->stock->enabled)
{
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
$head[$h][1] = $langs->trans("Stock"); $head[$h][1] = $langs->trans("Stock");
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT."/fourn/product/photos.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/fourn/product/photos.php?id=".$product->id;
$head[$h][1] = $langs->trans("Photos"); $head[$h][1] = $langs->trans("Photos");
$hselected = $h; $hselected = $h;
$h++; $h++;
//Affichage onglet Catégories //Affichage onglet Catégories
if ($conf->categorie->enabled){ if ($conf->categorie->enabled){
$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id;
$head[$h][1] = $langs->trans('Categories'); $head[$h][1] = $langs->trans('Categories');
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("CommercialCard"); $head[$h][1] = $langs->trans("CommercialCard");
$h++; $h++;
dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
print($mesg); print($mesg);
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print "<tr>"; print "<tr>";
print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>'; print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
print '<td colspan="2">'; print '<td colspan="2">';
print $product->getLibStatut(2); print $product->getLibStatut(2);
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($product->price).'</td></tr>'; print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($product->price).'</td></tr>';
print "</table><br>\n"; print "</table><br>\n";
/* /*
* Ajouter une photo * Ajouter une photo
* *
*/ */
if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
print_titre($langs->trans("AddPhoto")); print_titre($langs->trans("AddPhoto"));
print '<form name="userfile" action="photos.php?id='.$product->id.'" enctype="multipart/form-data" METHOD="POST">'; print '<form name="userfile" action="photos.php?id='.$product->id.'" enctype="multipart/form-data" METHOD="POST">';
print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">'; print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">';
print '<table class="border" width="100%"><tr>'; print '<table class="border" width="100%"><tr>';
print '<td>'.$langs->trans("File").'</td>'; print '<td>'.$langs->trans("File").'</td>';
print '<td><input type="file" name="photofile"></td></tr>'; print '<td><input type="file" name="photofile"></td></tr>';
print '<tr><td colspan="4" align="center">'; print '<tr><td colspan="4" align="center">';
print '<input type="submit" name="sendit" value="'.$langs->trans("Save").'">&nbsp;'; print '<input type="submit" name="sendit" value="'.$langs->trans("Save").'">&nbsp;';
print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>'; print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
print '</table>'; print '</table>';
print '</form><br />'; print '</form><br />';
}
// Affiche photos
if ($_GET["action"] != 'ajout_photo')
{
$nbphoto=0;
$nbbyrow=5;
$pdir = get_exdir($product->id,2) . $product->id ."/photos/";
$dir = $conf->produit->dir_output . '/'. $pdir;
print '<br><table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
foreach ($product->liste_photos($dir) as $obj)
{
$nbphoto++;
// if ($nbbyrow && $nbphoto == 1) print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>';
if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
if ($obj['photo_vignette']) $filename=$obj['photo_vignette'];
else $filename=$obj['photo'];
print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">';
print '</a>';
print '<br>'.$langs->trans("File").': '.dol_trunc($filename,16);
if ($user->rights->produit->creer)
{
print '<br>'.'<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&amp;action=delete&amp;file='.urlencode($pdir.$filename).'">'.img_delete().'</a>';
}
if ($nbbyrow) print '</td>';
if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '</tr>';
}
// Ferme tableau
while ($nbphoto % $nbbyrow)
{
print '<td width="'.ceil(100/$nbbyrow).'%">&nbsp;</td>';
$nbphoto++;
}
if ($nbphoto < 1)
{
print '<tr align=center valign=middle border=1><td class="photo">';
print "<br>".$langs->trans("NoPhotoYet")."<br><br>";
print '</td></tr></table>';
}
print '</table>';
}
print "</div>\n";
} }
print "\n<div class=\"tabsAction\">\n";
// Affiche photos if ($_GET["action"] == '')
if ($_GET["action"] != 'ajout_photo')
{
$nbphoto=0;
$nbbyrow=5;
$pdir = get_exdir($product->id,2) . $product->id ."/photos/";
$dir = $conf->produit->dir_output . '/'. $pdir;
print '<br><table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
foreach ($product->liste_photos($dir) as $obj)
{
$nbphoto++;
// if ($nbbyrow && $nbphoto == 1) print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>';
if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
if ($obj['photo_vignette']) $filename=$obj['photo_vignette'];
else $filename=$obj['photo'];
print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">';
print '</a>';
print '<br>'.$langs->trans("File").': '.dol_trunc($filename,16);
if ($user->rights->produit->creer)
{
print '<br>'.'<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&amp;action=delete&amp;file='.urlencode($pdir.$filename).'">'.img_delete().'</a>';
}
if ($nbbyrow) print '</td>';
if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '</tr>';
}
// Ferme tableau
while ($nbphoto % $nbbyrow)
{
print '<td width="'.ceil(100/$nbbyrow).'%">&nbsp;</td>';
$nbphoto++;
}
if ($nbphoto < 1)
{
print '<tr align=center valign=middle border=1><td class="photo">';
print "<br>".$langs->trans("NoPhotoYet")."<br><br>";
print '</td></tr></table>';
}
print '</table>';
}
print "</div>\n";
}
print "\n<div class=\"tabsAction\">\n";
if ($_GET["action"] == '')
{
if ( $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
if ( $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
print '<a class="butAction" href="photos.php?action=ajout_photo&amp;id='.$product->id.'">'; print '<a class="butAction" href="photos.php?action=ajout_photo&amp;id='.$product->id.'">';
print $langs->trans("AddPhoto").'</a>'; print $langs->trans("AddPhoto").'</a>';
}
} }
}
print "\n</div>\n"; print "\n</div>\n";
} }
else else
{ {
print $langs->trans("ErrorUnknown"); print $langs->trans("ErrorUnknown");
} }

View File

@ -175,7 +175,7 @@ $formfile = new FormFile($db);
if ($_GET["action"] == 'create') if ($_GET["action"] == 'create')
{ {
print_titre($langs->trans("CreateADeliveryOrder")); print_fiche_titre($langs->trans("CreateADeliveryOrder"));
if ($mesg) if ($mesg)
{ {

View File

@ -345,7 +345,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
$soc->pays=$obj->libelle; $soc->pays=$obj->libelle;
} }
print_titre($langs->trans("NewCompany")); print_fiche_titre($langs->trans("NewCompany"));
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {

View File

@ -401,7 +401,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
print_titre($langs->trans("NewUser")); print_fiche_titre($langs->trans("NewUser"));
print "<br>"; print "<br>";
print $langs->trans("CreateInternalUserDesc"); print $langs->trans("CreateInternalUserDesc");

View File

@ -162,7 +162,7 @@ llxHeader('',$langs->trans("GroupCard"));
if ($action == 'create') if ($action == 'create')
{ {
print_titre($langs->trans("NewGroup")); print_fiche_titre($langs->trans("NewGroup"));
print "<br>"; print "<br>";
if ($message) { print $message."<br>"; } if ($message) { print $message."<br>"; }

View File

@ -46,9 +46,13 @@ if (! $sortfield) $sortfield="g.nom";
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
/*
* View
*/
llxHeader(); llxHeader();
print_titre($langs->trans("ListOfGroups")); print_fiche_titre($langs->trans("ListOfGroups"));
$sql = "SELECT g.rowid, g.nom, ".$db->pdate("g.datec")." as datec"; $sql = "SELECT g.rowid, g.nom, ".$db->pdate("g.datec")." as datec";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";

View File

@ -52,7 +52,7 @@ $userstatic=new User($db);
llxHeader(); llxHeader();
print_titre($langs->trans("ListOfUsers")); print_fiche_titre($langs->trans("ListOfUsers"));
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.fk_societe, u.login,"; $sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.fk_societe, u.login,";
$sql.= " ".$db->pdate("u.datec")." as datec,"; $sql.= " ".$db->pdate("u.datec")." as datec,";