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
|
@ -41,7 +41,7 @@ $THEME->name = 'canvas';
|
|||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->parents = array(
|
||||
'base',
|
||||
'base',
|
||||
);
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
@ -55,16 +55,16 @@ $THEME->parents = array(
|
|||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->sheets = array(
|
||||
'pagelayout',
|
||||
'text',
|
||||
'core',
|
||||
'course',
|
||||
'mods',
|
||||
'blocks',
|
||||
'tabs',
|
||||
'admin',
|
||||
'tables',
|
||||
'popups',
|
||||
'pagelayout',
|
||||
'text',
|
||||
'core',
|
||||
'course',
|
||||
'mods',
|
||||
'blocks',
|
||||
'tabs',
|
||||
'admin',
|
||||
'tables',
|
||||
'popups',
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -73,10 +73,10 @@ $THEME->sheets = array(
|
|||
////////////////////////////////////////////////////
|
||||
|
||||
$THEME->parents_exclude_sheets = array(
|
||||
'base'=>array(
|
||||
'navigation',
|
||||
'browser',
|
||||
),
|
||||
'base'=>array(
|
||||
'navigation',
|
||||
'browser',
|
||||
),
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -168,6 +168,11 @@ $THEME->layouts = array(
|
|||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>true),
|
||||
),
|
||||
'report' => array(
|
||||
'file' => 'report.php',
|
||||
'regions' => array('side-pre'),
|
||||
'defaultregion' => 'side-pre',
|
||||
)
|
||||
);
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,29 +26,29 @@ echo $OUTPUT->doctype() ?>
|
|||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
|
||||
<div id="page">
|
||||
|
||||
|
||||
<!-- START OF HEADER -->
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="wrapper" class="clearfix">
|
||||
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
|
||||
<div class="headermenu">
|
||||
<?php
|
||||
echo $OUTPUT->login_info();
|
||||
if (!empty($PAGE->layout_options['langmenu'])) {
|
||||
echo $OUTPUT->lang_menu();
|
||||
}
|
||||
echo $PAGE->headingmenu;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="wrapper" class="clearfix">
|
||||
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
|
||||
<div class="headermenu">
|
||||
<?php
|
||||
echo $OUTPUT->login_info();
|
||||
if (!empty($PAGE->layout_options['langmenu'])) {
|
||||
echo $OUTPUT->lang_menu();
|
||||
}
|
||||
echo $PAGE->headingmenu;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hasnavbar) { ?>
|
||||
<div class="navbar clearfix">
|
||||
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
|
||||
|
@ -62,57 +62,57 @@ echo $OUTPUT->doctype() ?>
|
|||
|
||||
<!-- START OF CONTENT -->
|
||||
|
||||
<div id="page-content-wrapper" class="clearfix">
|
||||
<div id="page-content">
|
||||
<div id="region-main-box">
|
||||
<div id="region-post-box">
|
||||
<div id="page-content-wrapper" class="clearfix">
|
||||
<div id="page-content">
|
||||
<div id="region-main-box">
|
||||
<div id="region-post-box">
|
||||
|
||||
<div id="region-main-wrap">
|
||||
<div id="region-main">
|
||||
<div class="region-content">
|
||||
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="region-main-wrap">
|
||||
<div id="region-main">
|
||||
<div class="region-content">
|
||||
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="region-pre">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($hassidepre) { ?>
|
||||
<div id="region-pre">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($hassidepost) { ?>
|
||||
<div id="region-post">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($hassidepost) { ?>
|
||||
<div id="region-post">
|
||||
<div class="region-content">
|
||||
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END OF CONTENT -->
|
||||
|
||||
<!-- START OF FOOTER -->
|
||||
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer" class="clearfix">
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
</div> <!-- END #wrapper -->
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer" class="clearfix">
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
</div> <!-- END #wrapper -->
|
||||
<?php } ?>
|
||||
|
||||
</div> <!-- END #page -->
|
||||
|
|
109
theme/canvas/layout/report.php
Normal file
109
theme/canvas/layout/report.php
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?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);
|
||||
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
|
||||
|
||||
$bodyclasses = array();
|
||||
if ($hassidepre && !$hassidepost) {
|
||||
$bodyclasses[] = 'side-pre-only';
|
||||
} else if ($hassidepost && !$hassidepre) {
|
||||
$bodyclasses[] = 'side-post-only';
|
||||
} else if (!$hassidepost && !$hassidepre) {
|
||||
$bodyclasses[] = 'content-only';
|
||||
}
|
||||
|
||||
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')?>" />
|
||||
<?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">
|
||||
|
||||
<!-- START OF HEADER -->
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
<div id="wrapper" class="clearfix">
|
||||
|
||||
<div id="page-header">
|
||||
<div id="page-header-wrapper" class="clearfix">
|
||||
<?php if ($hasheading) { ?>
|
||||
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
|
||||
<div class="headermenu">
|
||||
<?php
|
||||
echo $OUTPUT->login_info();
|
||||
if (!empty($PAGE->layout_options['langmenu'])) {
|
||||
echo $OUTPUT->lang_menu();
|
||||
}
|
||||
echo $PAGE->headingmenu;
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($hasnavbar) { ?>
|
||||
<div class="navbar clearfix">
|
||||
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
|
||||
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<!-- END OF HEADER -->
|
||||
|
||||
<!-- START OF CONTENT -->
|
||||
|
||||
|
||||
<div id="page-content-wrapper" class="clearfix">
|
||||
<div id="page-content">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END OF CONTENT -->
|
||||
|
||||
<!-- START OF FOOTER -->
|
||||
|
||||
<?php if ($hasfooter) { ?>
|
||||
<div id="page-footer" class="clearfix">
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($hasheading || $hasnavbar) { ?>
|
||||
</div> <!-- END #wrapper -->
|
||||
<?php } ?>
|
||||
|
||||
</div> <!-- END #page -->
|
||||
|
||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||
</body>
|
||||
</html>
|
|
@ -1,21 +1,19 @@
|
|||
#page-content #region-main-box {
|
||||
left: 210px;
|
||||
/
|
||||
|
||||
* Width of left sideblock */
|
||||
left: 210px;
|
||||
/* Width of left sideblock */
|
||||
}
|
||||
|
||||
#page-content #region-main-box #region-post-box {
|
||||
margin-left: -420px;
|
||||
|
||||
#page-content #region-post-box {
|
||||
margin-left: -420px;
|
||||
|
||||
|
||||
/* Twice width of left sideblock */
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
|
||||
margin-left: 420px;
|
||||
|
||||
#page-content #region-main {
|
||||
margin-left: 420px;
|
||||
|
||||
|
||||
/* Twice width of left sideblock */
|
||||
padding: 0 15px;
|
||||
|
@ -24,9 +22,9 @@
|
|||
/* Padding around middle column */
|
||||
}
|
||||
|
||||
#page-content #region-main-box #region-post-box #region-pre {
|
||||
left: 210px;
|
||||
|
||||
#page-content #region-pre {
|
||||
left: 210px;
|
||||
|
||||
|
||||
/* Width of left sideblock */
|
||||
width: 210px;
|
||||
|
@ -35,37 +33,35 @@
|
|||
/* Width of left sideblock */
|
||||
}
|
||||
|
||||
#page-content #region-main-box #region-post-box #region-post {
|
||||
width: 210px;
|
||||
/
|
||||
|
||||
* Width of right sideblock */
|
||||
#page-content #region-post {
|
||||
width: 210px;
|
||||
/* Width of right sideblock */
|
||||
}
|
||||
|
||||
#page-content #region-main-box .region-content {
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/** Only side pre **/
|
||||
|
||||
.side-pre-only #page-content #region-main-box #region-post-box {
|
||||
margin-left: -210px;
|
||||
margin-left: -210px;
|
||||
}
|
||||
|
||||
.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
|
||||
margin-left: 210px;
|
||||
margin-left: 210px;
|
||||
}
|
||||
|
||||
/** Only side post **/
|
||||
|
||||
.side-post-only #page-content #region-main-box #region-post-box {
|
||||
margin-left: -210px;
|
||||
margin-left: -210px;
|
||||
}
|
||||
|
||||
.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
|
||||
margin-left: 210px;
|
||||
margin-left: 210px;
|
||||
}
|
||||
|
||||
.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
|
||||
margin-left: 210px;
|
||||
margin-left: 210px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue