Пример #1
0
Файл: lib.php Проект: JOANMM/bcu
function theme_bcu_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG;
    $return = new stdClass();
    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }
    if (!empty($page->theme->settings->logo)) {
        $return->heading = html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
    } else {
        $return->heading = $output->page_heading();
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote">' . $page->theme->settings->footnote . '</div>';
    }
    return $return;
}
Пример #2
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add Clean specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page) {
    global $CFG;
    $return = new stdClass;

    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }

    if (!empty($page->theme->settings->logo)) {
        $return->heading = html_writer::tag('div', '', array('class' => 'logo'));
    } else {
        $return->heading = $output->page_heading();
    }

    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
    }

    return $return;
}
Пример #3
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add Clean specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page) {
    global $CFG,$USER;
    $return = new stdClass;

    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }

    if(isloggedin()){
        $display_blocks = html_writer::empty_tag('img', array('src' => $CFG->wwwroot.'/theme/clean/pix/block_slider.jpg', 'class' => 'display_blocks'));
		
    }else{
        $display_blocks = '';
    }
    if (!empty($page->theme->settings->logo)) {
        $return->heading = $display_blocks.html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
    } else {
        $return->heading = $display_blocks.$output->page_heading();
    }

    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
    }
    
    //added code for disclaimer and browser support by rajesh
    $return->browsersupport = '';
    if (!empty($page->theme->settings->browsersupport)) {
        $return->browsersupport = '<div>'.format_text($page->theme->settings->browsersupport).'</div>';
    } else {
        $return->browsersupport = '';
    }

     $return->disclaimer = '';
    if (!empty($page->theme->settings->disclaimer)) {
        $return->disclaimer = '<div>'.format_text($page->theme->settings->disclaimer).'</div>';
    } else {
        $return->disclaimer = '';
    }
    /*code change ends here*/

    return $return;
}
Пример #4
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add Clean specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG;
    $return = new stdClass();
    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }
    // Only display the logo on the front page and login page, if one is defined.
    if (!empty($page->theme->settings->logo) && ($page->pagelayout == 'frontpage' || $page->pagelayout == 'login')) {
        $return->heading = html_writer::tag('div', '', array('class' => 'logo'));
    } else {
        $return->heading = $output->page_heading();
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
    }
    return $return;
}
Пример #5
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_warwickclean_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG;
    $return = new stdClass();
    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }
    if (!empty($page->theme->settings->logo)) {
        $return->heading = html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
    } else {
        $return->heading = $output->page_heading();
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
    }
    $return->warningcolor = '';
    if (!empty($page->theme->settings->warningcolor)) {
        $return->warningcolor = $page->theme->settings->warningcolor;
    }
    $return->warningmessage = '';
    if (!empty($page->theme->settings->warningmessage)) {
        //$return->warningmessage = '<div class="warning-message text-center mdl_alert_'.$return->warningcolor.'">'.$page->theme->settings->warningmessage.'</div>';
        $return->warningmessage = html_writer::tag('div', $page->theme->settings->warningmessage, array('class' => 'warning-message text-center mdl_alert_' . $return->warningcolor));
    }
    return $return;
}
Пример #6
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add roshnilite specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_roshnilite_get_html_for_settings(renderer_base $output, moodle_page $page) {
    global $CFG, $USER;
    $return = new stdClass;

    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }

    if (!empty($page->theme->settings->logo)) {
        $return->heading = html_writer::tag('div', '', array('class' => 'logo'));
    } else {
        $return->heading = $output->page_heading();
    }

    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
    }
    /*-----------------------for contact*--------------------------*/
    if (!empty($page->theme->settings->addressfontawesomeicon)) {
        $return->addressfontawesomeicon = $page->theme->settings->addressfontawesomeicon;
    }
    if (!empty($page->theme->settings->emailfontawesomeicon)) {
        $return->emailfontawesomeicon = $page->theme->settings->emailfontawesomeicon;
    }
    if (!empty($page->theme->settings->phonefontawesomeicon)) {
        $return->phonefontawesomeicon = $page->theme->settings->phonefontawesomeicon;
    }
    if (!empty($page->theme->settings->address)) {
        $return->address = $page->theme->settings->address;
    }
    if (!empty($page->theme->settings->phone)) {
        $return->phone = $page->theme->settings->phone;
    }
    if (!empty($page->theme->settings->email)) {
        $return->email = $page->theme->settings->email;
    }
    /*-----------------------for social contact*--------------------------*/
    if (!empty($page->theme->settings->socialheading)) {
        $return->socialheading = $page->theme->settings->socialheading;
    }
    if (!empty($page->theme->settings->masonrysubheading)) {
        $return->masonrysubheading = $page->theme->settings->masonrysubheading;
    }
    if (!empty($page->theme->settings->socialfontawesomeicon1)) {
        $return->socialfontawesomeicon1 = $page->theme->settings->socialfontawesomeicon1;
    }
    if (!empty($page->theme->settings->socialicon1)) {
        $return->socialicon1 = $page->theme->settings->socialicon1;
    }
    if (!empty($page->theme->settings->socialfontawesomeicon2)) {
        $return->socialfontawesomeicon2 = $page->theme->settings->socialfontawesomeicon2;
    }
    if (!empty($page->theme->settings->socialicon2)) {
        $return->socialicon2 = $page->theme->settings->socialicon2;
    }
    if (!empty($page->theme->settings->socialfontawesomeicon3)) {
        $return->socialfontawesomeicon3 = $page->theme->settings->socialfontawesomeicon3;
    }
    if (!empty($page->theme->settings->socialicon3)) {
        $return->socialicon3 = $page->theme->settings->socialicon3;
    }
    if (!empty($page->theme->settings->socialfontawesomeicon4)) {
        $return->socialfontawesomeicon4 = $page->theme->settings->socialfontawesomeicon4;
    }
    if (!empty($page->theme->settings->socialicon4)) {
        $return->socialicon4 = $page->theme->settings->socialicon4;
    }
    /*--------------------for masonry--------------------------------*/
    if (!empty($page->theme->settings->masonryheading)) {
        $return->masonryheading = $page->theme->settings->masonryheading;
    }
    if (!empty($page->theme->settings->masonrysubheading)) {
        $return->masonrysubheading = $page->theme->settings->masonrysubheading;
    }
    if (!empty($page->theme->settings->masonrytext1)) {
        $return->masonrytext1 = $page->theme->settings->masonrytext1;
    }
    if (!empty($page->theme->settings->masonrysubtext1)) {
        $return->masonrysubtext1 = $page->theme->settings->masonrysubtext1;
    }
    if (!empty($page->theme->settings->masonryrurl1)) {
        $return->masonryurl1 = $page->theme->settings->masonryrurl1;
    }

    if (!empty($page->theme->settings->masonrytext2)) {
        $return->masonrytext2 = $page->theme->settings->masonrytext2;
    }
    if (!empty($page->theme->settings->masonrysubtext2)) {
        $return->masonrysubtext2 = $page->theme->settings->masonrysubtext2;
    }
    if (!empty($page->theme->settings->masonryrurl2)) {
        $return->masonryurl2 = $page->theme->settings->masonryrurl2;
    }

    if (!empty($page->theme->settings->masonrytext3)) {
        $return->masonrytext3 = $page->theme->settings->masonrytext3;
    }
    if (!empty($page->theme->settings->masonrysubtext3)) {
        $return->masonrysubtext3 = $page->theme->settings->masonrysubtext3;
    }
    if (!empty($page->theme->settings->masonryrurl3)) {
        $return->masonryurl3 = $page->theme->settings->masonryrurl3;
    }

    if (!empty($page->theme->settings->masonrytext4)) {
        $return->masonrytext4 = $page->theme->settings->masonrytext4;
    }
    if (!empty($page->theme->settings->masonrysubtext4)) {
        $return->masonrysubtext4 = $page->theme->settings->masonrysubtext4;
    }
    if (!empty($page->theme->settings->masonryrurl4)) {
        $return->masonryurl4 = $page->theme->settings->masonryrurl4;
    }

    if (!empty($page->theme->settings->masonrytext5)) {
        $return->masonrytext5 = $page->theme->settings->masonrytext5;
    }
    if (!empty($page->theme->settings->masonrysubtext5)) {
        $return->masonrysubtext5 = $page->theme->settings->masonrysubtext5;
    }
    if (!empty($page->theme->settings->masonryrurl5)) {
        $return->masonryurl5 = $page->theme->settings->masonryrurl5;
    }

    if (!empty($page->theme->settings->masonrytext6)) {
        $return->masonrytext6 = $page->theme->settings->masonrytext6;
    }
    if (!empty($page->theme->settings->masonrysubtext6)) {
        $return->masonrysubtext6 = $page->theme->settings->masonrysubtext6;
    }
    if (!empty($page->theme->settings->masonryrurl6)) {
        $return->masonryurl6 = $page->theme->settings->masonryrurl6;
    }

    if (!empty($page->theme->settings->masonrytext7)) {
        $return->masonrytext7 = $page->theme->settings->masonrytext7;
    }
    if (!empty($page->theme->settings->masonrysubtext7)) {
        $return->masonrysubtext7 = $page->theme->settings->masonrysubtext7;
    }
    if (!empty($page->theme->settings->masonryrurl7)) {
        $return->masonryurl7 = $page->theme->settings->masonryrurl7;
    }

    if (!empty($page->theme->settings->masonrytext8)) {
        $return->masonrytext8 = $page->theme->settings->masonrytext8;
    }
    if (!empty($page->theme->settings->masonrysubtext8)) {
        $return->masonrysubtext8 = $page->theme->settings->masonrysubtext8;
    }
    if (!empty($page->theme->settings->masonryrurl8)) {
        $return->masonryurl8 = $page->theme->settings->masonryrurl8;
    }

    /*-------------------------for first slider-----------------------------*/
    if (!empty($page->theme->settings->slidertext1)) {
        $return->slidertext1 = $page->theme->settings->slidertext1;
    }
    if (!empty($page->theme->settings->sliderbuttontext1)) {
        $return->sliderbuttontext1 = $page->theme->settings->sliderbuttontext1;
    }
    if (!empty($page->theme->settings->sliderurl1)) {
        $return->sliderurl1 = $page->theme->settings->sliderurl1;
    }

    if (!empty($page->theme->settings->slidertext2)) {
        $return->slidertext2 = $page->theme->settings->slidertext2;
    }
    if (!empty($page->theme->settings->sliderbuttontext2)) {
        $return->sliderbuttontext2 = $page->theme->settings->sliderbuttontext2;
    }
    if (!empty($page->theme->settings->sliderurl2)) {
        $return->sliderurl2 = $page->theme->settings->sliderurl2;
    }

    if (!empty($page->theme->settings->slidertext3)) {
        $return->slidertext3 = $page->theme->settings->slidertext3;
    }
    if (!empty($page->theme->settings->sliderbuttontext3)) {
        $return->sliderbuttontext3 = $page->theme->settings->sliderbuttontext3;
    }
    if (!empty($page->theme->settings->sliderurl3)) {
        $return->sliderurl3 = $page->theme->settings->sliderurl3;
    }

    if (!empty($page->theme->settings->slidertext4)) {
        $return->slidertext4 = $page->theme->settings->slidertext4;
    }
    if (!empty($page->theme->settings->sliderbuttontext4)) {
        $return->sliderbuttontext4 = $page->theme->settings->sliderbuttontext4;
    }
    if (!empty($page->theme->settings->sliderurl4)) {
        $return->sliderurl4 = $page->theme->settings->sliderurl4;
    }

    if (!empty($page->theme->settings->slidertext5)) {
        $return->slidertext5 = $page->theme->settings->slidertext5;
    }
    if (!empty($page->theme->settings->sliderbuttontext5)) {
        $return->sliderbuttontext5 = $page->theme->settings->sliderbuttontext5;
    }
    if (!empty($page->theme->settings->sliderurl5)) {
        $return->sliderurl5 = $page->theme->settings->sliderurl5;
    }
    if (!empty($page->theme->settings->slidertext6)) {
        $return->slidertext6 = $page->theme->settings->slidertext6;
    }
    if (!empty($page->theme->settings->sliderbuttontext6)) {
        $return->sliderbuttontext6 = $page->theme->settings->sliderbuttontext6;
    }
    if (!empty($page->theme->settings->sliderurl6)) {
        $return->sliderurl6 = $page->theme->settings->sliderurl6;
    }
    /*--------------------------about site---------------------------------*/
    if (!empty($page->theme->settings->aboutsiteheading)) {
        $return->aboutsiteheading = $page->theme->settings->aboutsiteheading;
    }
    if (!empty($page->theme->settings->aboutsitesubheading)) {
        $return->aboutsitesubheading = $page->theme->settings->aboutsitesubheading;
    }

    if (!empty($page->theme->settings->aboutsitename1)) {
        $return->aboutsitename1 = $page->theme->settings->aboutsitename1;
    }
    if (!empty($page->theme->settings->aboutsitetext1)) {
        $return->aboutsitetext1 = $page->theme->settings->aboutsitetext1;
    }
    if (!empty($page->theme->settings->aboutsiteurl1)) {
        $return->aboutsiteurl1 = $page->theme->settings->aboutsiteurl1;
    } else {
        $return->aboutsiteurl1 = $CFG->wwwroot.'/mod/forum/user.php?id='.$USER->id;
    }

    if (!empty($page->theme->settings->aboutsitename2)) {
        $return->aboutsitename2 = $page->theme->settings->aboutsitename2;
    }
    if (!empty($page->theme->settings->aboutsitetext2)) {
        $return->aboutsitetext2 = $page->theme->settings->aboutsitetext2;
    }
    if (!empty($page->theme->settings->aboutsiteurl2)) {
        $return->aboutsiteurl2 = $page->theme->settings->aboutsiteurl2;
    } else {
        $return->aboutsiteurl2 = $CFG->wwwroot.'/course/index.php';
    }

    if (!empty($page->theme->settings->aboutsitename3)) {
        $return->aboutsitename3 = $page->theme->settings->aboutsitename3;
    }
    if (!empty($page->theme->settings->aboutsitetext3)) {
        $return->aboutsitetext3 = $page->theme->settings->aboutsitetext3;
    }
    if (!empty($page->theme->settings->aboutsiteurl3)) {
        $return->aboutsiteurl3 = $page->theme->settings->aboutsiteurl3;
    } else {
        $return->aboutsiteurl3 = $CFG->wwwroot.'/blog/index.php?userid='.$USER->id;
    }

    if (!empty($page->theme->settings->aboutsitename4)) {
        $return->aboutsitename4 = $page->theme->settings->aboutsitename4;
    }
    if (!empty($page->theme->settings->aboutsitetext4)) {
        $return->aboutsitetext4 = $page->theme->settings->aboutsitetext4;
    }
    if (!empty($page->theme->settings->aboutsiteurl4)) {
        $return->aboutsiteurl4 = $page->theme->settings->aboutsiteurl4;
    } else {
        $return->aboutsiteurl4 = $CFG->wwwroot.'/calendar/view.php';
    }
    return $return;
}
Пример #7
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add mmcmonkwearmouth specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_mmcmonkwearmouth_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG;
    $toReturn = new stdClass();
    $toReturn->navbarclass = '';
    if (!empty($page->theme->settings->logo)) {
        $toReturn->heading = html_writer::link($CFG->wwwroot, html_writer::img($output->pix_url('logo', 'theme'), 'logo', array('title' => get_string('home'), 'class' => 'logo')) . html_writer::tag('h3', 'Monkwearmouth Academy'));
    } else {
        $toReturn->heading = $output->page_heading();
    }
    $toReturn->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $toReturn->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
    }
    return $toReturn;
}
Пример #8
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_iomad_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG, $USER, $DB;
    $return = new stdClass();
    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }
    // get logos
    $theme = $page->theme;
    $logo = $theme->setting_file_url('logo', 'logo');
    if (empty($logo)) {
        $logo = $CFG->wwwroot . '/theme/iomad/pix/iomad_logo.png';
    }
    $clientlogo = '';
    $companycss = '';
    if ($companyid = iomad::is_company_user()) {
        $context = context_system::instance();
        if ($files = $DB->get_records('files', array('contextid' => $context->id, 'component' => 'theme_iomad', 'filearea' => 'companylogo', 'itemid' => $companyid))) {
            foreach ($files as $file) {
                if ($file->filename != '.') {
                    $clientlogo = $CFG->wwwroot . "/pluginfile.php/{$context->id}/theme_iomad/companylogo/{$companyid}/{$file->filename}";
                }
            }
        }
        company_user::load_company();
        $companycss = ".header, .navbar { background: [[company:bgcolor_header]]; }\n                       .block .content { background: [[company:bgcolor_content]]; }";
        foreach ($USER->company as $key => $value) {
            if (isset($value)) {
                $companycss = preg_replace("/\\[\\[company:{$key}\\]\\]/", $value, $companycss);
            }
        }
    }
    $return->heading = '<div id="sitelogo">' . '<a href="' . $CFG->wwwroot . '" ><img src="' . $logo . '" /></a></div>';
    $return->heading .= '<div id="siteheading">' . $output->page_heading() . '</div>';
    if ($clientlogo) {
        $return->heading .= '<div id="clientlogo">' . '<a href="' . $CFG->wwwroot . '" ><img src="' . $clientlogo . '" /></a></div>';
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
    }
    $return->companycss = $companycss;
    return $return;
}
Пример #9
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * Do not add theme specific logic in here, child themes should be able to
 * rely on that function just by declaring settings with similar names.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_morecandy_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG, $SITE;
    $return = new stdClass();
    $return->branding = '';
    if (empty($page->theme->settings->brandicon)) {
        $return->branding = format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID)));
    }
    if (!empty($page->theme->settings->logo)) {
        $return->heading = '<div class="logo"></div>';
    } else {
        $return->heading = $output->page_heading();
    }
    $return->welcomenote = '';
    if (!empty($page->theme->settings->welcomenote)) {
        $return->welcomenote = '<div class="row-fluid">' . format_text($page->theme->settings->welcomenote) . '</div>';
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
    }
    return $return;
}
Пример #10
0
function theme_pioneer_get_html_for_fptextbox(renderer_base $output, moodle_page $page)
{
    global $CFG;
    $return = new stdClass();
    $return->heading = $output->page_heading();
    $return->fptextbox = '';
    if (!empty($page->theme->settings->fptextbox)) {
        $return->fptextbox = '<div class="fptextbox">' . format_text($page->theme->settings->fptextbox) . '</div>';
    }
    return $return;
}
Пример #11
0
/**
 * Returns an object containing HTML for the areas affected by settings.
 *
 * @param renderer_base $output Pass in $OUTPUT.
 * @param moodle_page $page Pass in $PAGE.
 * @return stdClass An object with the following properties:
 *      - navbarclass A CSS class to use on the navbar. By default ''.
 *      - heading HTML to use for the heading. A logo if one is selected or the default heading.
 *      - footnote HTML to use as a footnote. By default ''.
 */
function theme_learnmoodle_get_html_for_settings(renderer_base $output, moodle_page $page)
{
    global $CFG, $SITE;
    $return = new stdClass();
    $return->navbarclass = '';
    if (!empty($page->theme->settings->invert)) {
        $return->navbarclass .= ' navbar-inverse';
    }
    $heading = $output->page_heading('h1');
    if ($heading === html_writer::tag('h1', $SITE->fullname)) {
        $return->heading = '';
    } else {
        $return->heading = $heading;
    }
    $return->footnote = '';
    if (!empty($page->theme->settings->footnote)) {
        $return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
    }
    return $return;
}