mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Fix for front page case when no left column
This commit is contained in:
parent
9ab327d6f7
commit
670fddf176
2 changed files with 81 additions and 76 deletions
|
@ -504,7 +504,7 @@ function print_side_block($heading="", $list=NULL, $footer="", $icons=NULL, $wid
|
|||
echo "</TABLE><BR>\n\n";
|
||||
}
|
||||
|
||||
function print_admin_links ($siteid, $width=190) {
|
||||
function print_admin_links ($siteid, $width=180) {
|
||||
global $THEME, $CFG;
|
||||
|
||||
print_simple_box(get_string("administration"), $align="CENTER", $width, $color="$THEME->cellheading");
|
||||
|
|
33
index.php
33
index.php
|
@ -26,22 +26,20 @@
|
|||
"<META NAME=\"Description\" CONTENT=\"".stripslashes(strip_tags($site->summary))."\">",
|
||||
true, $headerbutton);
|
||||
|
||||
|
||||
$side = 180;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
|
||||
<TR>
|
||||
<TD WIDTH=<?=$side?> VALIGN="TOP" NOWRAP>
|
||||
<?
|
||||
|
||||
$sections = get_all_sections($site->id);
|
||||
|
||||
if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id)) {
|
||||
|
||||
echo "<TD WIDTH=\"$side\" VALIGN=TOP NOWRAP>"; $firstcolumn=true;
|
||||
|
||||
if ($sections[0]->sequence or isediting($site->id)) {
|
||||
get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
print_simple_box(get_string("mainmenu"), "CENTER", $side, "$THEME->cellheading");
|
||||
|
@ -66,14 +64,20 @@
|
|||
}
|
||||
|
||||
if (isadmin()) {
|
||||
print_admin_links($site->id);
|
||||
if (!$firstcolumn) {
|
||||
echo "<TD WIDTH=\"$side\" VALIGN=TOP NOWRAP>"; $firstcolumn=true;
|
||||
}
|
||||
print_admin_links($site->id, $side);
|
||||
}
|
||||
?>
|
||||
|
||||
</TD>
|
||||
if ($firstcolumn) {
|
||||
echo "</TD>";
|
||||
echo "<TD WIDTH=70% VALIGN=TOP>";
|
||||
} else {
|
||||
echo "<TD WIDTH=100% VALIGN=TOP>";
|
||||
}
|
||||
|
||||
<TD WIDTH="70%" VALIGN="TOP">
|
||||
<? if ($site->newsitems == 0 ) {
|
||||
if ($site->newsitems == 0 ) {
|
||||
print_simple_box(get_string("availablecourses"), "CENTER", "100%", "$THEME->cellheading");
|
||||
print_spacer(8,1);
|
||||
print_all_courses();
|
||||
|
@ -103,18 +107,19 @@
|
|||
print_spacer(8,1);
|
||||
forum_print_latest_discussions($newsforum->id, $site->newsitems);
|
||||
}
|
||||
?>
|
||||
|
||||
</TD>
|
||||
<TD WIDTH="30%" VALIGN="TOP">
|
||||
<?
|
||||
echo "</TD>";
|
||||
echo "<TD WIDTH=30% VALIGN=TOP>";
|
||||
|
||||
if (isediting($site->id)) {
|
||||
$site->summary .= "<BR><CENTER><A HREF=\"admin/site.php\"><IMG SRC=\"pix/i/edit.gif\" BORDER=0></A>";
|
||||
}
|
||||
|
||||
print_simple_box($site->summary, "", "100%", $THEME->cellheading);
|
||||
print_spacer(1,$side);
|
||||
echo "</TD>";
|
||||
?>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue