mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
themes lib MDL-24895 Multiple fixes to better handle overflow.
Major tasks undertaken in this patch: * New format_text argument, overflowdiv. * New page layout Report. * Review of all format_text calls. * Added support for the report layout to all themes. * Changed forum post display from tables to divs.
This commit is contained in:
parent
2412f8b882
commit
367a75fae4
125 changed files with 3366 additions and 2062 deletions
|
@ -126,7 +126,7 @@ $THEME->layouts = array(
|
|||
),
|
||||
// Embeded pages, like iframe embeded in moodleform
|
||||
'embedded' => array(
|
||||
'theme' => 'canvas',
|
||||
'theme' => 'canvas',
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>true),
|
||||
|
@ -145,6 +145,11 @@ $THEME->layouts = array(
|
|||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
|
||||
),
|
||||
'report' => array(
|
||||
'file' => 'report.php',
|
||||
'regions' => array('side-pre'),
|
||||
'defaultregion' => 'side-pre'
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
|
149
theme/splash/layout/report.php
Normal file
149
theme/splash/layout/report.php
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?php
|
||||
|
||||
$hasheading = ($PAGE->heading);
|
||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$hasfooter = (empty($PAGE->layout_options['nofooter']));
|
||||
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
|
||||
|
||||
$custommenu = $OUTPUT->custom_menu();
|
||||
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
|
||||
|
||||
splash_check_colourswitch();
|
||||
splash_initialise_colourswitcher($PAGE);
|
||||
|
||||
$bodyclasses = array();
|
||||
$bodyclasses[] = 'splash-'.splash_get_colour();
|
||||
if (!$hassidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
||||
$haslogo = (!empty($PAGE->theme->settings->logo));
|
||||
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
|
||||
$hidetagline = (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1);
|
||||
|
||||
if (!empty($PAGE->theme->settings->tagline)) {
|
||||
$tagline = $PAGE->theme->settings->tagline;
|
||||
} else {
|
||||
$tagline = get_string('defaulttagline', 'theme_splash');
|
||||
}
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
<title><?php echo $PAGE->title ?></title>
|
||||
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
|
||||
<meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
|
||||
<?php echo $OUTPUT->standard_head_html() ?>
|
||||
</head>
|
||||
<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
|
||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
<div id="page">
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="wrapper clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
<div id="headermenu">
|
||||
<?php if (isloggedin()) {
|
||||
echo html_writer::start_tag('div', array('id'=>'userdetails'));
|
||||
echo html_writer::tag('h1', get_string('usergreeting', 'theme_splash', $USER->firstname));
|
||||
echo html_writer::start_tag('p', array('class'=>'prolog'));
|
||||
echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | ';
|
||||
echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout'));
|
||||
echo html_writer::end_tag('p');
|
||||
echo html_writer::end_tag('div');
|
||||
echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg'));
|
||||
} else {
|
||||
echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout'));
|
||||
$loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_splash'));
|
||||
echo html_writer::tag('h1', get_string('welcome', 'theme_splash', $loginlink));
|
||||
echo html_writer::end_tag('div');;
|
||||
} ?>
|
||||
<div class="clearer"></div>
|
||||
<div id="colourswitcher">
|
||||
<ul>
|
||||
<li><img src="<?php echo $OUTPUT->pix_url('colour', 'theme'); ?>" alt="colour" /></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'red')); ?>" class="styleswitch colour-red"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" alt="red" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'green')); ?>" class="styleswitch colour-green"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" alt="green" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'blue')); ?>" class="styleswitch colour-blue"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" alt="blue" /></a></li>
|
||||
<li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'orange')); ?>" class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" alt="orange" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php echo $OUTPUT->lang_menu();?>
|
||||
</div>
|
||||
<div id="logobox">
|
||||
<?php if ($haslogo) {
|
||||
echo html_writer::link(new moodle_url('/'), "<img src='".$PAGE->theme->settings->logo."' alt='logo' />");
|
||||
} else {
|
||||
echo html_writer::link(new moodle_url('/'), $PAGE->heading, array('class'=>'nologoimage'));
|
||||
} ?>
|
||||
<?php if (!$hidetagline) { ?>
|
||||
<h4><?php echo $tagline ?></h4>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
<?php if ($haslogo) { ?>
|
||||
<h4 class="headermain inside"> </h4>
|
||||
<?php } else { ?>
|
||||
<h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
|
||||
<?php } ?>
|
||||
<?php } // End of if ($hasheading)?>
|
||||
<!-- DROP DOWN MENU -->
|
||||
<div class="clearer"></div>
|
||||
<div id="dropdownmenu">
|
||||
<?php if ($hascustommenu) { ?>
|
||||
<div id="custommenu"><?php echo $custommenu; ?></div>
|
||||
<?php } ?>
|
||||
<div class="navbar">
|
||||
<div class="wrapper clearfix">
|
||||
<div class="breadcrumb"><?php if ($hasnavbar) echo $OUTPUT->navbar(); ?></div>
|
||||
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END DROP DOWN MENU -->
|
||||
</div>
|
||||
</div>
|
||||
<?php } // if ($hasheading || $hasnavbar) ?>
|
||||
<!-- END OF HEADER -->
|
||||
<!-- START OF CONTENT -->
|
||||
|
||||
<div id="page-content" class="clearfix">
|
||||
<div id="report-main-content">
|
||||
<div class="region-content">
|
||||
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="report-region-wrap">
|
||||
<div id="report-region-pre" class="block-region">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<!-- END OF CONTENT -->
|
||||
<div class="clearfix"></div>
|
||||
<!-- END OF #Page -->
|
||||
</div>
|
||||
<!-- START OF FOOTER -->
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer">
|
||||
<div id="footer-wrapper">
|
||||
<?php if ($hasfootnote) { ?>
|
||||
<div id="footnote"><?php echo $PAGE->theme->settings->footnote; ?></div>
|
||||
<?php } ?>
|
||||
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
|
||||
<?php
|
||||
echo $OUTPUT->login_info();
|
||||
echo $OUTPUT->home_link();
|
||||
echo $OUTPUT->standard_footer_html();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||
</body>
|
||||
</html>
|
|
@ -20,7 +20,6 @@ body { /* Define margins and background colour/image */
|
|||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
|
||||
body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { /* Set fonttype for site */
|
||||
|
@ -428,44 +427,23 @@ div.summary {
|
|||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#region-pre {
|
||||
.block-region {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#region-post {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#region-pre .block .header { /*-- right block header --*/
|
||||
.block-region .block .header { /*-- right block header --*/
|
||||
background: url([[pix:theme|sbheaderbg2]]) center no-repeat;
|
||||
height: 25px;
|
||||
color: #fff;
|
||||
padding: 12px 5px 5px 5px;
|
||||
}
|
||||
|
||||
#region-pre .block .header h2{ /*-- right block text --*/
|
||||
.block-region .block .header h2{ /*-- right block text --*/
|
||||
color: #333;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
#region-pre .block .content { /*-- right block content --*/
|
||||
background: #f2f2f2;
|
||||
padding: 4px 5px 5px;
|
||||
}
|
||||
|
||||
#region-post .block .header { /*-- left block header --*/
|
||||
background: url([[pix:theme|sbheaderbg2]]) center no-repeat;
|
||||
height: 25px;
|
||||
color: #fff;
|
||||
padding: 12px 5px 5px 5px;
|
||||
}
|
||||
|
||||
#region-post .block .header h2{ /*-- left block text --*/
|
||||
color: #333;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
#region-post .block .content { /*-- left block content --*/
|
||||
.block-region .block .content { /*-- right block content --*/
|
||||
background: #f2f2f2;
|
||||
padding: 4px 5px 5px;
|
||||
}
|
||||
|
@ -639,6 +617,11 @@ ul.topics li#section-0, ul.weeks li#section-0 {
|
|||
.pagelayout-redirect {background-position:0 0;border-top:1px solid #853650;}
|
||||
.pagelayout-redirect #content {margin-top:150px;}
|
||||
|
||||
.pagelayout-report #page #page-header {
|
||||
width:960px;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
/* Splash Theme Specific settings for Administrators to customise css.
|
||||
---------------------------*/
|
||||
[[setting:customcss]]
|
Loading…
Add table
Add a link
Reference in a new issue