diff --git a/e107_admin/administrator.php b/e107_admin/administrator.php index cf92ed9c3..cc73db54c 100644 --- a/e107_admin/administrator.php +++ b/e107_admin/administrator.php @@ -50,6 +50,17 @@ if (e_QUERY) unset($tmp); } +if(deftrue('e_DEMOMODE') && varset($_POST['update_admin'])) +{ + + $mes = e107::getMessage(); + $ns = e107::getRender(); + $mes->addWarning(LAN_DEMO_FORBIDDEN); + $ns->tablerender("Forbidden",$mes->render()); + require_once("footer.php"); + exit; + +} if (isset($_POST['update_admin'])) // Permissions updated { diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php index b45cbf4df..9b797f113 100644 --- a/e107_handlers/user_handler.php +++ b/e107_handlers/user_handler.php @@ -1399,7 +1399,7 @@ class e_userperms $a_id = $row['user_id']; $ad_name = $row['user_name']; $a_perms = $row['user_perms']; - + /* $text = "
@@ -1411,36 +1411,73 @@ class e_userperms - ".ADMSLAN_16.": - - ".$ad_name." - - - - - - ".ADMSLAN_18." "; + */ + + $text = " +
+ ".ADMSLAN_52.""; - $text .= $this->renderPermTable('grouped',$a_perms); + //XXX Bootstrap Tabs (as used below) should eventually be the default for all of the admin area. + $text .= ' + + +
+
+
+ '.$this->renderPermTable('core',$a_perms).' +
+
- - $text .= $this->renderCheckAllButtons()." +
+
+ '.$this->renderPermTable('plugin',$a_perms).' +
+
- - - - +
+
+ '.$this->renderPermTable('language',$a_perms).' +
+
+ +
+
+ '.$this->renderPermTable('main',$a_perms).' +
+
+ +
'; + + + // $text .= $this->renderPermTable('grouped',$a_perms); + + + + $text .= $this->renderCheckAllButtons(); + + // $text .= ""; + + $text .= " ".$this->renderSubmitButtons()." + +
"; - $ns->tablerender(ADMSLAN_52, $text); + // $text .= $this->renderPermTable('core',$a_perms); + + $ns->tablerender(ADMSLAN_52.SEP.$ad_name, $text); } function renderCheckAllButtons() @@ -1468,8 +1505,29 @@ class e_userperms function renderPermTable($type,$a_perms='') { $groupedList = $this->getPermList($type); - $text = ""; + + if($type != 'grouped') + { + $text = "\t\t + + + + + + "; + // $text .= ""; //XXX Lan - General + // $text .= "\t\t

".$prm->renderSectionDiz($section)."

"; //XXX Lan - General + foreach($groupedList as $key=>$diz) + { + $text .= $this->checkb($key, $a_perms, $diz); + } + $text .= "
+

".$this->renderSectionDiz($type)."

"; + + return $text; + } + $text = ""; foreach($groupedList as $section=>$list) { $text .= "\t\t diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 168607e29..f71a52085 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -335,6 +335,7 @@ define("LAN_IMAGE","Image"); define("LAN_TEMPLATE","Template"); define("LAN_TYPE", "Type"); define("LAN_CATEGORIES", "Categories"); +define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode."); define("LAN_SECURITYL_0", "Looking for trouble (none)"); diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index 0c70eb0c6..1550a9d6d 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -712,7 +712,30 @@ i.searchquery { background-color:white; } - +/********************* Make Bootstrap Tabs more like Jquery-ui **********************/ + +.nav-tabs { border-bottom: 1px solid rgb(221, 221, 221); margin-bottom:0px;} +.nav-tabs li { margin-right: 2px; } +.nav-tabs li a { cursor: pointer; background-color: rgb(230, 230, 230); color: rgb(153, 153, 153); margin-bottom:-1px; + padding: 0px 15px; line-height: 34px; border-bottom: 1px solid rgb(221, 221, 221); + } +.nav-tabs li a:hover { background-color: rgb(255, 255, 255); color: rgb(0, 67, 138); } + +.nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus +{ + background-color: rgb(255, 255, 255); + cursor: text; +} + +.tab-pane { background-color: #F6F6F6; } +.tab-pane table.adminform { border-top:0px} +.tab-pane table.adminform td { border-top:0px} +.tab-pane table.adminform tr { border-bottom:1px solid #DDDDDD} + +/****************************************************************/ + + + /* body { background-color: rgb(68, 68, 68); }