Implémentation permission adhérents
This commit is contained in:
parent
be2943aba5
commit
23f09b5554
@ -220,11 +220,13 @@ print "</div>\n";
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
// Lien nouvelle cotisation si non brouillon et non résilié
|
// Lien nouvelle cotisation si non brouillon et non résilié
|
||||||
|
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')
|
|||||||
*/
|
*/
|
||||||
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)
|
||||||
|
{
|
||||||
// Réactiver
|
// Réactiver
|
||||||
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)
|
||||||
|
{
|
||||||
// Résilier
|
// Résilier
|
||||||
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.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
print '<a class="tabAction" href="fiche.php?rowid='.$adh->id.'&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
|
|||||||
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 @@
|
|||||||
|
|
||||||
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)
|
|||||||
$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");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user