diff --git a/admin/styles/default/adminstyle.css b/admin/styles/default/adminstyle.css index 15e7e565cb3..6da02a4f455 100644 --- a/admin/styles/default/adminstyle.css +++ b/admin/styles/default/adminstyle.css @@ -227,6 +227,32 @@ table.form2columns td:first-child { table.form2columns td.centered { text-align: center; } +/* Added by evan to help usability on the user template rights form in useradmin/userrighthandling.php */ +table#user-template-rights +{ + width: 50%; + border: none; + border-collapse: collapse +} +table#user-template-rights tr.row_odd +{ + background-color: #EBF2FA; +} +table#user-template-rights tr:hover +{ + background-color: #D1D1DF; +} + table#user-template-rights tr td +,table#user-template-rights tr th +,table#user-template-rights tfoot tr td +{ + border: none; + text-align: center; +} +table#user-template-rights tbody tr td:first-child +{ + text-align: left; +} .outlinetable { border: 1px solid #111; @@ -904,4 +930,4 @@ div.loader { #help { float:right; -} \ No newline at end of file +} diff --git a/admin/userrighthandling.php b/admin/userrighthandling.php index 654f9a18e8b..f8e2f701c95 100644 --- a/admin/userrighthandling.php +++ b/admin/userrighthandling.php @@ -114,46 +114,62 @@ if ($action == "setusertemplates") { - refreshtemplates(); - $usersummary = "\n\n"; - - $userlist = getuserlist(); - foreach ($userlist as $usr) - { - if ($usr['uid'] == $postuserid) - { - $templaterights = array(); - $squery = 'SELECT '.db_quote_id('folder').','.db_quote_id('use')." FROM {$dbprefix}templates_rights WHERE uid={$usr['uid']}"; - $sresult = db_execute_assoc($squery) or safe_die($connect->ErrorMsg());//Checked - while ($srow = $sresult->FetchRow()) { - $templaterights[$srow["folder"]] = array("use"=>$srow["use"]); - } - - $usersummary .= "\n" - ."" - ."\n"; - - $tquery = "SELECT * FROM ".$dbprefix."templates"; - $tresult = db_execute_assoc($tquery) or safe_die($connect->ErrorMsg()); //Checked - while ($trow = $tresult->FetchRow()) { - $usersummary .= ""; - - $usersummary .= "" - ."" - . "
\n" - . "".$clang->gT("Set templates that this user may access").": ".$_POST['user']."
".$clang->gT("Template Name")."".$clang->gT("Allowed")."
{$trow["folder"]}" - ."" - ."" - ."
\n"; - continue; + refreshtemplates(); + $usersummary = "\n
\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n"; + + $userlist = getuserlist(); + foreach ($userlist as $usr) + { + if ($usr['uid'] == $postuserid) + { + $templaterights = array(); + $squery = 'SELECT '.db_quote_id('folder').','.db_quote_id('use')." FROM {$dbprefix}templates_rights WHERE uid={$usr['uid']}"; + $sresult = db_execute_assoc($squery) or safe_die($connect->ErrorMsg());//Checked + while ($srow = $sresult->FetchRow()) + { + $templaterights[$srow["folder"]] = array("use"=>$srow["use"]); + } + + $usersummary .= "\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n" + ."\t\n\n\n"; + + $tquery = "SELECT * FROM ".$dbprefix."templates"; + $tresult = db_execute_assoc($tquery) or safe_die($connect->ErrorMsg()); //Checked + $table_row_odd_even = 'odd'; + while ($trow = $tresult->FetchRow()) + { + if($table_row_odd_even == 'odd' ) + { + $row_class = ' class="row_odd"'; + $table_row_odd_even = 'even'; + } + else + { + $row_class = ' class="row_even"'; + $table_row_odd_even = 'odd'; + }; + $usersummary .= "\t\t\t\n\t\t\t\t\n"; + + $usersummary .= "\t\t\t\t\n\t\t\t\n\t\t\n" + ."\t
\n" + . $clang->gT('Set templates that this user may access').': '.$_POST['user']."
" + .$clang->gT('Template Name') + ."" + .$clang->gT('Allowed') + ."
{$trow["folder"]}gT('Save Settings')."\" />\n" + ."\t\t\t\t\t\n" + ."\t\t\t\t\t\n\t\t\t\t
\n" + ."
\n"; + continue; } } }