diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index b048d6ed551..f71a22ff5b8 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -344,6 +344,12 @@ if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs- if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); +$newcardbutton=''; +if ($user->rights->adherent->creer) +{ + $newcardbutton=''.$langs->trans('NewMember').''; +} + print '
'; if ($optioncss != '') print ''; print ''; @@ -354,7 +360,7 @@ print ''; print ''; print ''; -print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); +print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="member"; diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 1ed0b9a5c50..2a6c4fe2d71 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -181,6 +181,8 @@ if ($result) if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); + $newcardbutton=''.$langs->trans('NewSubscription').''; + print ''; if ($optioncss != '') print ''; print ''; @@ -191,7 +193,7 @@ if ($result) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="subscription"; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 48df382181d..929dc706042 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -228,6 +228,12 @@ if (! $rowid && $action != 'create' && $action != 'edit') $param = ''; + $newcardbutton=''; + if ($user->rights->adherent->configurer) + { + $newcardbutton=''.$langs->trans('NewMemberType').''; + } + print ''; if ($optioncss != '') print ''; print ''; @@ -237,7 +243,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; - print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); + print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); $moreforfilter = ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 2aa3024920f..b1262b7a554 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -81,7 +81,9 @@ $userstatic=new User($db); llxHeader('', $langs->trans("ListOfBookmarks")); -print load_fiche_titre($langs->trans("ListOfBookmarks")); +$newcardbutton=''.$langs->trans('NewBookmark').''; + +print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); $sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; @@ -204,16 +206,6 @@ else } - -print "
\n"; - -if ($user->rights->bookmark->creer) -{ - print ''.$langs->trans("NewBookmark").''; -} - -print '
'; - llxFooter(); $db->close(); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index f2491b09336..4b01ddfaba8 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -103,7 +103,10 @@ if ($result) $title=$langs->trans("ListOfEMailings"); if ($filteremail) $title.=' ('.$langs->trans("SentTo",$filteremail).')'; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,"",$num); + + $newcardbutton=''.$langs->trans('NewMailing').''; + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '',$num, '', 'title_generic.png', 0, $newcardbutton); $i = 0; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index a2bf0b106ed..051028c8f19 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -79,7 +79,13 @@ llxHeader('', $langs->trans("OpenSurveyArea")); $param=''; $fieldtosortuser=empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?'firstname':'lastname'; -print load_fiche_titre($langs->trans("OpenSurveyArea")); +$newcardbutton=''; +if ($user->rights->opensurvey->read) +{ + $newcardbutton=''.$langs->trans('NewSurvey').''; +} + +print_barre_liste($langs->trans("OpenSurveyArea"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); // List of surveys into database diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 190659628f2..5697dee3b7b 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -196,7 +196,13 @@ if($ret == -1) { dol_print_error($db,$object->error); exit; } else { - print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords,'title_generic.png', 0, '', '', $limit); + $newcardbutton=''; + if ($user->rights->resource->write) + { + $newcardbutton=''.$langs->trans('MenuResourceAdd').''; + } + + print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords,'title_generic.png', 0, $newcardbutton, '', $limit); } $moreforfilter = '';