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);
$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 '<input type="hidden" name="action" value="add">';

View File

@ -32,9 +32,9 @@ require "./pre.inc.php";
if (!$user->rights->categorie->lire)
accessforbidden();
$type=$_REQUEST['type'];
// If socid provided by ajax company selector
if (! empty($_POST['socid_id']))
{
@ -47,17 +47,17 @@ if ($_POST["action"] == 'update' && $user->rights->categorie->creer)
{
$categorie = new Categorie ($db);
$result=$categorie->fetch($_REQUEST['id']);
$categorie->label = $_POST["nom"];
$categorie->description = $_POST["description"];
$categorie->socid = ($_POST["socid"] ? $_POST["socid"] : 'null');
$categorie->visible = $_POST["visible"];
if($_POST['catMere'] != "-1")
$categorie->id_mere = $_POST['catMere'];
else
$categorie->id_mere = "";
if (! $categorie->label)
{
@ -95,8 +95,8 @@ if ($_POST["action"] == 'update' && $user->rights->categorie->creer)
llxHeader("","",$langs->trans("Categories"));
print_titre($langs->trans("ModifCat"));
print "<br>";
print_fiche_titre($langs->trans("ModifCat"));
if ($mesg)
{
@ -156,13 +156,13 @@ else
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print $html->select_all_categories($categorie->type,$categorie->id_mere);
print '</td></tr>';
print '<tr><td>'.$langs->trans("ContentsVisibleByAll").'</td><td>';
print $html->selectyesno("visible",$categorie->visible,1);
print '</td></tr>';
print '<input type="hidden" name="socid" value="'.$categorie->socid.'">';
}
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</td></tr>';
print '</table></form>';

View File

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

View File

@ -21,24 +21,22 @@
*/
require("./pre.inc.php");
/*
* Sécurité accés
*/
// Security check
if (!$user->admin && $user->societe_id > 0)
accessforbidden();
/*
* View
*/
llxHeader();
print_titre("Paiements");
/*
*
*
*/
print_fiche_titre("Payments");
$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
if ($_GET['action'] == 'create')
{
print_titre($langs->trans('NewBill'));
print_fiche_titre($langs->trans('NewBill'));
if ($mesg) { print $mesg.'<br>'; }
@ -471,7 +471,7 @@ else
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 '<input type="hidden" name="action" value="update">';

View File

@ -39,7 +39,7 @@ if (!$user->rights->produit->lire) accessforbidden();
llxHeader("","",$langs->trans("ProductsAndServices"));
print_titre($langs->trans("ProductsAndServicesArea"));
print_fiche_titre($langs->trans("ProductsAndServicesArea"));
print '<table border="0" width="100%">';
@ -117,7 +117,7 @@ if ($resql)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastProducts").'</td></tr>';
$var=True;
while ($i < $num)
{

View File

@ -18,11 +18,11 @@
*/
/**
\file htdocs/fourn/product/photos.php
\ingroup product
\brief Page de la fiche produit
\version $Id$
*/
\file htdocs/fourn/product/photos.php
\ingroup product
\brief Page de la fiche produit
\version $Id$
*/
require("./pre.inc.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 ($_GET["id"])
{
$product = new Product($db);
$result = $product->fetch($_GET["id"]);
if ($_GET["id"])
{
$product = new Product($db);
$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"])
{
$product = new Product($db);
$result = $product->fetch($_GET["id"]);
$product = new Product($db);
$result = $product->fetch($_GET["id"]);
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)
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)
{
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
$head[$h][1] = $langs->trans("Stock");
$h++;
}
$head[$h][0] = DOL_URL_ROOT."/fourn/product/photos.php?id=".$product->id;
$head[$h][1] = $langs->trans("Photos");
$hselected = $h;
$h++;
}
//Affichage onglet Catégories
if ($conf->categorie->enabled){
$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id;
$head[$h][1] = $langs->trans('Categories');
$h++;
}
$head[$h][0] = DOL_URL_ROOT."/fourn/product/photos.php?id=".$product->id;
$head[$h][1] = $langs->trans("Photos");
$hselected = $h;
$h++;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("CommercialCard");
$h++;
dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
//Affichage onglet Catégories
if ($conf->categorie->enabled){
$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id;
$head[$h][1] = $langs->trans('Categories');
$h++;
}
print($mesg);
print '<table class="border" width="100%">';
print "<tr>";
print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
print '<td colspan="2">';
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("CommercialCard");
$h++;
dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
print($mesg);
print '<table class="border" width="100%">';
print "<tr>";
print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
print '<td colspan="2">';
print $product->getLibStatut(2);
print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($product->price).'</td></tr>';
print "</table><br>\n";
print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($product->price).'</td></tr>';
print "</table><br>\n";
/*
* Ajouter une photo
*
*/
if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
print_titre($langs->trans("AddPhoto"));
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 '<table class="border" width="100%"><tr>';
print '<td>'.$langs->trans("File").'</td>';
print '<td><input type="file" name="photofile"></td></tr>';
print '<tr><td colspan="4" align="center">';
print '<input type="submit" name="sendit" value="'.$langs->trans("Save").'">&nbsp;';
print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
print '</table>';
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";
/*
* Ajouter une photo
*
*/
if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
print_titre($langs->trans("AddPhoto"));
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 '<table class="border" width="100%"><tr>';
print '<td>'.$langs->trans("File").'</td>';
print '<td><input type="file" name="photofile"></td></tr>';
print '<tr><td colspan="4" align="center">';
print '<input type="submit" name="sendit" value="'.$langs->trans("Save").'">&nbsp;';
print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
print '</table>';
print '</form><br />';
}
print "\n<div class=\"tabsAction\">\n";
// 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";
if ($_GET["action"] == '')
{
if ( $user->rights->produit->creer && ! empty($conf->global->MAIN_UPLOAD_DOC))
if ($_GET["action"] == '')
{
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 $langs->trans("AddPhoto").'</a>';
}
}
}
}
print "\n</div>\n";
print "\n</div>\n";
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("ErrorUnknown");
}

View File

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

View File

@ -345,7 +345,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
$soc->pays=$obj->libelle;
}
print_titre($langs->trans("NewCompany"));
print_fiche_titre($langs->trans("NewCompany"));
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 $langs->trans("CreateInternalUserDesc");

View File

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

View File

@ -18,7 +18,7 @@
*
* $Id$
*/
/**
\file htdocs/user/group/index.php
\brief Page d'accueil de la gestion des groupes
@ -41,14 +41,18 @@ if ($page < 0) $page = 0;
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortfield) $sortfield="g.nom";
if (! $sortorder) $sortorder="ASC";
/*
* View
*/
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 .= " FROM ".MAIN_DB_PREFIX."usergroup as g";

View File

@ -128,7 +128,7 @@ if ($result > 0)
{
if (! is_array($records))
{
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
}
else
{

View File

@ -52,7 +52,7 @@ $userstatic=new User($db);
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.= " ".$db->pdate("u.datec")." as datec,";

View File

@ -208,7 +208,7 @@ if ($result > 0)
{
if (! is_array($records))
{
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
}
else
{