mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Added Bootstrap tabs to admin->administrator page and styled to match jquery-ui tabs.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -1399,7 +1399,7 @@ class e_userperms
|
||||
$a_id = $row['user_id'];
|
||||
$ad_name = $row['user_name'];
|
||||
$a_perms = $row['user_perms'];
|
||||
|
||||
/*
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."' id='myform'>
|
||||
<fieldset id='core-administrator-edit'>
|
||||
@@ -1411,36 +1411,73 @@ class e_userperms
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='label'>".ADMSLAN_16.": </td>
|
||||
<td class='control'>
|
||||
".$ad_name."
|
||||
<input type='hidden' name='ad_name' value='{$ad_name}' />
|
||||
<input type='hidden' name='a_id' value='{$a_id}' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='label'>".ADMSLAN_18."</td>
|
||||
<td class='control'>
|
||||
|
||||
|
||||
";
|
||||
*/
|
||||
|
||||
$text = "<form method='post' action='".e_SELF."' id='myform'>
|
||||
<fieldset id='core-administrator-edit'>
|
||||
<legend class='e-hideme'>".ADMSLAN_52."</legend>";
|
||||
|
||||
$text .= $this->renderPermTable('grouped',$a_perms);
|
||||
//XXX Bootstrap Tabs (as used below) should eventually be the default for all of the admin area.
|
||||
$text .= '
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab">'.$this->renderSectionDiz('core').'</a></li>
|
||||
<li><a href="#tab2" data-toggle="tab">'.$this->renderSectionDiz('plugin').'</a></li>
|
||||
<li><a href="#tab3" data-toggle="tab">'.$this->renderSectionDiz('language').'</a></li>
|
||||
<li><a href="#tab4" data-toggle="tab">'.$this->renderSectionDiz('main').'</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active " id="tab1">
|
||||
<div class="separator">
|
||||
'.$this->renderPermTable('core',$a_perms).'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
$text .= $this->renderCheckAllButtons()."
|
||||
<div class="tab-pane" id="tab2">
|
||||
<div class="separator">
|
||||
'.$this->renderPermTable('plugin',$a_perms).'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tab-pane" id="tab3">
|
||||
<div class="separator">
|
||||
'.$this->renderPermTable('language',$a_perms).'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab4">
|
||||
<div class="separator">
|
||||
'.$this->renderPermTable('main',$a_perms).'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>';
|
||||
|
||||
|
||||
// $text .= $this->renderPermTable('grouped',$a_perms);
|
||||
|
||||
|
||||
|
||||
$text .= $this->renderCheckAllButtons();
|
||||
|
||||
// $text .= "</td></tr></tbody></table>";
|
||||
|
||||
$text .= "
|
||||
".$this->renderSubmitButtons()."
|
||||
<input type='hidden' name='ad_name' value='{$ad_name}' />
|
||||
<input type='hidden' name='a_id' value='{$a_id}' />
|
||||
</fieldset>
|
||||
</form>
|
||||
";
|
||||
|
||||
$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<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='center' style='width:50px' />
|
||||
<col style='width:50px' />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>";
|
||||
// $text .= "<tr><td class='field-section' colspan='3'><h4>".$this->renderSectionDiz($type)."</h4></td></tr>"; //XXX Lan - General
|
||||
// $text .= "\t\t<div class='field-section'><h4>".$prm->renderSectionDiz($section)."</h4>"; //XXX Lan - General
|
||||
foreach($groupedList as $key=>$diz)
|
||||
{
|
||||
$text .= $this->checkb($key, $a_perms, $diz);
|
||||
}
|
||||
$text .= "</tbody>
|
||||
</table>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
$text = "";
|
||||
foreach($groupedList as $section=>$list)
|
||||
{
|
||||
$text .= "\t\t<table class='table adminlist'>
|
||||
|
@@ -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)");
|
||||
|
@@ -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); }
|
||||
|
Reference in New Issue
Block a user