Commit db7d4220 authored by Loïc DAYOT's avatar Loïc DAYOT
Browse files

fix(): hide context menu when not admin

Hide localgroup management links.
parent b329f1e0
...@@ -52,6 +52,19 @@ $region_id = get_safe_integer('region', 0); ...@@ -52,6 +52,19 @@ $region_id = get_safe_integer('region', 0);
* *
*/ */
// context links
if ($user->is_admin()) {
echo "<div id=\"localgroup-list\">";
echo "<h1>Actions</h1>\n";
echo "<br/><a href=\"moderatelocalgroups.php\"><i class='fa fa-gavel'></i> ". $adl_localgroups_acronym. " ".
_("en attente de mod&eacute;ration"). "</a>".
"<br/><a href=\"moderatelocalgroups.php?op=list\"><i class='fa fa-list-ul'></i> ".
_("Liste des"). " {$adl_localgroups_acronym}</a>".
"<br/><a href=\"moderatelocalgroups.php?op=new\"><i class='fa fa-plus-square-o'></i> ".
_("Nouveau"). " {$adl_localgroups_acronym}</a></p>\n";
echo "</div>\n";
}
switch ($op) // compute switch ($op) // compute
{ {
...@@ -287,14 +300,6 @@ switch ($op) // display ...@@ -287,14 +300,6 @@ switch ($op) // display
} // end switch display } // end switch display
// context links
echo "<hr/><p>". ucfirst($adl_localgroups).
" <a href=\"moderatelocalgroups.php\"><i class='fa fa-gavel'></i> ".
_("en attente de mod&eacute;ration"). "</a>".
" - <a href=\"moderatelocalgroups.php?op=list\"><i class='fa fa-list-ul'></i> ".
_("liste"). "</a>".
" - <a href=\"moderatelocalgroups.php?op=new\"><i class='fa fa-plus-square-o'></i> ".
_("nouveau"). "</a></p>\n";
put_footer(); put_footer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment