New: Les notes de l'adhrent sont mise sur un onglet note

This commit is contained in:
Laurent Destailleur 2007-05-20 22:53:11 +00:00
parent b6ee8c0a1f
commit 0d9802a9ac
4 changed files with 37 additions and 3 deletions

View File

@ -70,7 +70,7 @@ class Adherent
var $morphy;
var $public;
var $commentaire;
var $commentaire; // Note
var $statut; // -1=brouillon, 0=résilié, 1=validé,payé
var $photo;
@ -410,6 +410,35 @@ class Adherent
}
/**
\brief Fonction qui met à jour le commentaire d'un adhérent
\param note Note
\param user Utilisateur qui réalise la mise a jour
\return int <0 si KO, >0 si OK
*/
function update_note($note,$user)
{
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " note='".addslashes($note)."'";
$sql.= " WHERE rowid = ".$this->id;
dolibarr_syslog("Adherent::update_note sql=$sql");
$result = $this->db->query($sql);
if (! $result)
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
$this->commentaire = $note;
$this->db->commit();
return 1;
}
/**
\brief Fonction qui met à jour l'adhérent
\param user Utilisateur qui réalise la mise a jour

View File

@ -586,7 +586,7 @@ if ($action == 'edit')
print '</tr>';
// Prenom
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td width="35%"><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
print '<tr><td width="20%">'.$langs->trans("Firstname").'</td><td width="35%"><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
print '</tr>';
// Login

View File

@ -114,7 +114,7 @@ if ($id)
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$adh->login.'&nbsp;</td></tr>';
// Note
print '<tr><td valign="top">'.$langs->trans("Note").' :</td>';
print '<tr><td valign="top">'.$langs->trans("Note").'</td>';
print '<td valign="top" colspan="3">';
if ($action == 'edit' && $user->rights->adherent->creer)
{

View File

@ -50,6 +50,11 @@ function member_prepare_head($member)
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$member->id;
$head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$member->id;
$head[$h][1] = $langs->trans("Subscriptions");
$head[$h][2] = 'subscription';