Skip to content
Snippets Groups Projects
Commit 23f09b55 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Implémentation permission adhérents

parent be2943ab
Branches
Tags
No related merge requests found
...@@ -220,11 +220,13 @@ print "</div>\n"; ...@@ -220,11 +220,13 @@ print "</div>\n";
print '<div class="tabsAction">'; print '<div class="tabsAction">';
// Lien nouvelle cotisation si non brouillon et non rsili // Lien nouvelle cotisation si non brouillon et non rsili
if ($user->rights->adherent->cotisation->creer)
{
if ($action != 'addsubscription' && $adh->statut > 0) if ($action != 'addsubscription' && $adh->statut > 0)
{ {
print "<a class=\"butAction\" href=\"card_subscriptions.php?rowid=$rowid&action=addsubscription\">".$langs->trans("NewSubscription")."</a>"; print "<a class=\"butAction\" href=\"card_subscriptions.php?rowid=$rowid&action=addsubscription\">".$langs->trans("NewSubscription")."</a>";
} }
}
print '</div>'; print '</div>';
print "<br>\n"; print "<br>\n";
......
...@@ -978,41 +978,58 @@ if ($rowid && $action != 'edit') ...@@ -978,41 +978,58 @@ if ($rowid && $action != 'edit')
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
if ($user->rights->adherent->creer)
{
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=edit\">".$langs->trans("Edit")."</a>"; print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=edit\">".$langs->trans("Edit")."</a>";
}
if ($user->rights->adherent->creer)
{
// Valider // Valider
if ($adh->statut == -1) if ($adh->statut == -1)
{ {
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Validate")."</a>\n"; print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Validate")."</a>\n";
} }
}
if ($user->rights->adherent->creer)
{
// Ractiver // Ractiver
if ($adh->statut == 0) if ($adh->statut == 0)
{ {
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Reenable")."</a>\n"; print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Reenable")."</a>\n";
} }
}
if ($user->rights->adherent->creer)
{
// Envoi fiche par mail // Envoi fiche par mail
if ($adh->statut >= 1 && $adh->email) if ($adh->statut >= 1 && $adh->email)
{ {
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n"; print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
} }
}
if ($user->rights->adherent->supprimer)
{
// Rsilier // Rsilier
if ($adh->statut == 1) if ($adh->statut == 1)
{ {
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=resign\">".$langs->trans("Resiliate")."</a>\n"; print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=resign\">".$langs->trans("Resiliate")."</a>\n";
} }
}
// Barre d'actions // Barre d'actions
if ($user->rights->user->user->creer)
{
if (! $user->societe_id) if (! $user->societe_id)
{ {
if (! $adh->user_id && $user->rights->user->user->creer) if (! $adh->user_id)
{ {
print '<a class="tabAction" href="fiche.php?rowid='.$adh->id.'&amp;action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>'; print '<a class="tabAction" href="fiche.php?rowid='.$adh->id.'&amp;action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
} }
} }
}
// Supprimer // Supprimer
if ($user->rights->adherent->supprimer) if ($user->rights->adherent->supprimer)
......
...@@ -819,12 +819,12 @@ class Form ...@@ -819,12 +819,12 @@ class Form
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT) if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
{ {
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" width="30" nowrap="nowrap">'; print '<td class="nobordernopadding" width="80" nowrap="nowrap">';
print $langs->trans("RefOrLabel").':</td>'; print $langs->trans("RefOrLabel").':</td>';
print '<td class="nobordernopadding" align="left" width="16">'; print '<td class="nobordernopadding" align="left" width="16">';
print ajax_updater_indicator($htmlname,'working'); print ajax_updater_indicator($htmlname,'working');
print '</td>'; print '</td>';
print '<td><input type="text" size="16" name="keysearch'.$htmlname.'" id="keysearch'.$htmlname.'">'; print '<td align="left"><input type="text" size="16" name="keysearch'.$htmlname.'" id="keysearch'.$htmlname.'"> ';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr class="nocellnopadd">'; print '<tr class="nocellnopadd">';
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
function member_prepare_head($member) function member_prepare_head($member)
{ {
global $langs, $conf; global $langs, $conf, $user;
$h = 0; $h = 0;
$head = array(); $head = array();
...@@ -50,15 +50,18 @@ function member_prepare_head($member) ...@@ -50,15 +50,18 @@ function member_prepare_head($member)
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$member->id; if ($user->rights->adherent->cotisation->lire)
$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][0] = DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$member->id;
$head[$h][1] = $langs->trans("Subscriptions"); $head[$h][1] = $langs->trans("Subscriptions");
$head[$h][2] = 'subscription'; $head[$h][2] = 'subscription';
$h++; $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/info.php?id='.$member->id; $head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$member->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment