Minor - UI changes in the portal news and page header/page subheader divs

skala
Julio Montoya 13 years ago
parent 023ee48230
commit 252ab88f54
  1. 10
      main/inc/lib/display.lib.php
  2. 4
      main/inc/lib/system_announcements.lib.php
  3. 5
      main/inc/lib/template.lib.php
  4. 4
      main/template/default/layout/hot_courses.tpl

@ -1364,6 +1364,16 @@ class Display {
return '<div class="page-header"><h1>'.$title.'</h1></div>';
}
public function page_header_and_translate($title, $second_title = null) {
$title = get_lang($title);
return self::page_header($title, $second_title);
}
public function page_subheader_and_translate($title, $second_title = null) {
$title = get_lang($title);
return self::page_subheader($title, $second_title);
}
public function page_subheader($title, $second_title = null) {
if (!empty($second_title)) {
$second_title = Security::remove_XSS($second_title);

@ -606,7 +606,7 @@ class SystemAnnouncementManager {
$announcements = Database::query($sql);
$html = '';
if (Database::num_rows($announcements) > 0) {
$html .= Display::page_subheader(get_lang('SystemAnnouncements'));
$html .= Display::page_header(get_lang('SystemAnnouncements'));
$html .= '<div id="container-slider" class="span6"><ul id="slider">';
while ($announcement = Database::fetch_object($announcements)) {
$content = $announcement->content;
@ -616,7 +616,7 @@ class SystemAnnouncementManager {
$content = cut($announcement->content, $cut_size).' '.Display::url(get_lang('More'), $url);
}
}
$html .= '<li><h1>'.$announcement->title.'</h1>'.$content.'</li>';
$html .= '<li><h2>'.$announcement->title.'</h2>'.$content.'</li>';
}
$html .= '</ul></div>';
}

@ -70,6 +70,11 @@ class Template {
$this->twig->addFilter('var_dump', new Twig_Filter_Function('var_dump'));
$this->twig->addFilter('return_message', new Twig_Filter_Function('Display::return_message_and_translate'));
$this->twig->addFilter('display_page_header', new Twig_Filter_Function('Display::page_header_and_translate'));
$this->twig->addFilter('display_page_subheader', new Twig_Filter_Function('Display::page_subheader_and_translate'));
/*
$lexer = new Twig_Lexer($this->twig, array(
//'tag_comment' => array('{*', '*}'),

@ -25,9 +25,7 @@ $(document).ready( function() {
<section id="hot_courses">
<div class="row">
<div class="span9">
<div class="page-header">
<h2>{{"HottestCourses"|get_lang}}</h2>
</div>
{{"HottestCourses"|display_page_header}}
</div>
{% for hot_course in hot_courses %}
<div class="span9">

Loading…
Cancel
Save