diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php
index 3338e9f4740..17f40258b81 100644
--- a/htdocs/projet/fiche.php
+++ b/htdocs/projet/fiche.php
@@ -33,6 +33,10 @@ require("../facture.class.php");
require("../commande/commande.class.php");
$langs->load("projects");
+$langs->load("companies");
+$langs->load("bills");
+$langs->load("orders");
+
$user->getrights('projet');
@@ -65,7 +69,7 @@ if ($_POST["action"] == 'update' && $user->rights->projet->creer)
$_GET["id"]=$projet->id; // On retourne sur la fiche projet
}
-if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes)
+if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes")
{
$projet = new Project($db);
$projet->id = $_GET["id"];
@@ -73,54 +77,38 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes)
Header("Location: index.php");
}
-llxHeader("","Projet","Projet");
+llxHeader("",$langs->trans("Project"),"Projet");
if ($_GET["action"] == 'delete')
{
-
- print '
\n";
+ $htmls->form_confirm("fiche.php?id=$id","Supprimer un projet","Etes-vous sur de vouloir supprimer cet projet ?","confirm_delete");
}
if ($_GET["action"] == 'create' && $user->rights->projet->creer)
{
- print_titre("Nouveau projet");
+ print_titre($langs->trans("NewProject"));
print '
- ';
+
+ print '| '.$langs->trans("Author").' | '.$user->fullname.' |
';
+
+ print '| '.$langs->trans("Ref").' | |
';
+ print '| '.$langs->trans("Title").' | |
';
+ print ' |
';
+ print '';
+ print '';
} else {
/*
@@ -146,13 +134,13 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
if ($conf->commande->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id;
- $head[$h][1] = 'Commandes';
+ $head[$h][1] = $langs->trans("Orders");
$h++;
}
if ($conf->facture->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id;
- $head[$h][1] = 'Factures';
+ $head[$h][1] = $langs->trans("Bills");
$h++;
}
@@ -164,8 +152,8 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print '';
print '';
- print '';
- print '| Société | '.$projet->societe->nom.' |
';
+ print '';
@@ -174,16 +162,20 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
}
else
{
- print '';
+ print '';
print '| '.$langs->trans("Title").' | '.$projet->title.' | ';
print ''.$langs->trans("Ref").' | '.$projet->ref.' |
';
- print '| Société | '.$projet->societe->nom_url.' |
';
+ print '| '.$langs->trans("Company").' | '.$projet->societe->nom_url.' |
';
print '
';
print '
';
}
print '';
+
+ /*
+ * Boutons actions
+ */
if ($user->rights->projet->creer == 1)
{
print '';
@@ -202,6 +194,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
}
}
+
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");