forked from science-ation/science-ation
Oops sort the menu's correctly, and restrict the editor to one less level than before (as per TUAG request)
This commit is contained in:
parent
358d413365
commit
56707e4941
@ -250,7 +250,7 @@ if(is_array($nav)) {
|
||||
if(is_array($_SESSION['roles'])) {
|
||||
foreach($_SESSION['roles'] AS $roletype) {
|
||||
$roleid=$roles[$roletype]['id'];
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE roles_id='$roleid' AND pid=0 AND conferencetype='{$conference['type']}' ORDER BY task");
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE roles_id='$roleid' AND pid=0 AND conferencetype='{$conference['type']}' ORDER BY ord,task");
|
||||
if(mysql_num_rows($q)==1) {
|
||||
$setPrimaryNav=true;
|
||||
}
|
||||
|
13
nav.php
13
nav.php
@ -34,7 +34,8 @@
|
||||
unset($_SESSION['nav']['secondary']);
|
||||
unset($_SESSION['nav']['tertiary']);
|
||||
unset($_SESSION['nav']['tertiarylink']);
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=1 ORDER By ord,task");
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=1 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
||||
echo mysql_error();
|
||||
echo "<ul class=\"secondarynav\">";
|
||||
$cl="";
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
@ -54,19 +55,25 @@
|
||||
$_SESSION['nav']['secondary']=$id;
|
||||
unset($_SESSION['nav']['tertiary']);
|
||||
unset($_SESSION['nav']['tertiarylink']);
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=2 ORDER By ord,task");
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=2 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
||||
echo "<ul class=\"tertiary_nav\">";
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
echo "<li id=\"tertiarylink_nav_{$r->id}\"><a href=\"".$config['SFIABDIRECTORY']."$r->link\">".i18n($r->task)."</a></li>\n";
|
||||
/*
|
||||
if($r->link) {
|
||||
echo "<h3 id=\"tertiary_nav_{$r->id}\"><a href=\"{$config['SFIABDIRECTORY']}$r->link\">".i18n("$r->task")."</a></h3>\n";
|
||||
} else {
|
||||
echo "<h3 id=\"tertiary_nav_{$r->id}\">".i18n("$r->task")."</h3>\n";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
echo "<ul class=\"tertiary_nav\">";
|
||||
$q2=mysql_query("SELECT * FROM rolestasks WHERE pid='$r->id' AND level=3 ORDER BY ord,task");
|
||||
$q2=mysql_query("SELECT * FROM rolestasks WHERE pid='$r->id' AND level=3 AND conferencetype='{$conference['type']}' ORDER BY ord,task");
|
||||
while($r2=mysql_fetch_object($q2)) {
|
||||
echo "<li id=\"tertiarylink_nav_{$r2->id}\"><a href=\"".$config['SFIABDIRECTORY']."$r2->link\">".i18n($r2->task)."</a></li>\n";
|
||||
}
|
||||
echo "</ul>";
|
||||
*/
|
||||
}
|
||||
echo "</ul>\n";
|
||||
break;
|
||||
|
@ -60,7 +60,7 @@ function doTree($id,$roleid,$ctype) {
|
||||
doTree($r->id,$roleid,$ctype);
|
||||
}
|
||||
$level--;
|
||||
if($level<4) {
|
||||
if($level<3) {
|
||||
echo "<li class=\"roletask\" id=\"emptytasks_{$id}\"><form onsubmit=\"return addTask($id)\">";
|
||||
echo "<input type=\"text\" name=\"newtask[$id]\" id=\"newtask_{$id}\">";
|
||||
echo "<input type=\"submit\" value=\"Add\">";
|
||||
|
Loading…
Reference in New Issue
Block a user