diff --git a/mod/book/delete.php b/mod/book/delete.php index 63c9507064a..b93b56d3f4c 100644 --- a/mod/book/delete.php +++ b/mod/book/delete.php @@ -78,6 +78,7 @@ if ($confirm) { // the operation was confirmed. } echo $OUTPUT->header(); +echo $OUTPUT->heading($book->name); // The operation has not been confirmed yet so ask the user to do so. if ($chapter->subchapter) { diff --git a/mod/book/edit.php b/mod/book/edit.php index 547a9d10920..28c8ddde484 100644 --- a/mod/book/edit.php +++ b/mod/book/edit.php @@ -114,7 +114,7 @@ $PAGE->set_title($book->name); $PAGE->set_heading($course->fullname); echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('editingchapter', 'mod_book')); +echo $OUTPUT->heading($book->name); $mform->display(); diff --git a/mod/book/edit_form.php b/mod/book/edit_form.php index 8384104e9fd..118e5a70a1e 100644 --- a/mod/book/edit_form.php +++ b/mod/book/edit_form.php @@ -42,7 +42,11 @@ class book_chapter_edit_form extends moodleform { $mform = $this->_form; - $mform->addElement('header', 'general', get_string('edit')); + if (!empty($chapter->id)) { + $mform->addElement('header', 'general', get_string('editingchapter', 'mod_book')); + } else { + $mform->addElement('header', 'general', get_string('addafter', 'mod_book')); + } $mform->addElement('text', 'title', get_string('chaptertitle', 'mod_book'), array('size'=>'30')); $mform->setType('title', PARAM_RAW); diff --git a/mod/book/styles.css b/mod/book/styles.css index b868560f841..4e2daa4a6a3 100644 --- a/mod/book/styles.css +++ b/mod/book/styles.css @@ -1,19 +1,6 @@ -.path-mod-book .book_chapter_title { - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - text-align: left; - font-size: large; - font-weight: bold; - - margin-left: 0; - margin-bottom: 20px; -} -.dir-rtl.path-mod-book .book_chapter_title { - text-align: right; -} - .path-mod-book .navtop img.icon, -.path-mod-book .navbotton img.icon { +.path-mod-book .navbottom img.icon { margin-right: 4px; margin-left: 4px; border: 0; @@ -65,11 +52,6 @@ margin-right: 0; } -/* toc style NUMBERED */ -.path-mod-book .book_toc_numbered { - font-size: 0.8em; -} - /*toc style BULLETS */ .path-mod-book .book_toc_bullets { font-size: 0.8em; diff --git a/mod/book/tool/importhtml/import_form.php b/mod/book/tool/importhtml/import_form.php index 38477f10fb9..176afabcef1 100644 --- a/mod/book/tool/importhtml/import_form.php +++ b/mod/book/tool/importhtml/import_form.php @@ -32,7 +32,7 @@ class booktool_importhtml_form extends moodleform { $mform = $this->_form; $data = $this->_customdata; - $mform->addElement('header', 'general', get_string('import')); + $mform->addElement('header', 'general', get_string('import', 'booktool_importhtml')); $options = array( // '0'=>get_string('typeonefile', 'booktool_importhtml'), diff --git a/mod/book/tool/importhtml/index.php b/mod/book/tool/importhtml/index.php index 25ee6f77fa4..95cfa298bf7 100644 --- a/mod/book/tool/importhtml/index.php +++ b/mod/book/tool/importhtml/index.php @@ -67,7 +67,8 @@ if ($mform->is_cancelled()) { } else if ($data = $mform->get_data()) { echo $OUTPUT->header(); - echo $OUTPUT->heading(get_string('importingchapters', 'booktool_importhtml')); + echo $OUTPUT->heading($book->name); + echo $OUTPUT->heading(get_string('importingchapters', 'booktool_importhtml'), 3); // this is a bloody hack - children do not try this at home! $fs = get_file_storage(); @@ -84,7 +85,7 @@ if ($mform->is_cancelled()) { } echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('import', 'booktool_importhtml')); +echo $OUTPUT->heading($book->name); $mform->display(); diff --git a/mod/book/tool/print/index.php b/mod/book/tool/print/index.php index cb258b08b79..2fc3d1292a4 100644 --- a/mod/book/tool/print/index.php +++ b/mod/book/tool/print/index.php @@ -98,7 +98,9 @@ if ($chapter) { echo html_writer::link('#', $printicon.$printtext, $printlinkatt); ?> -

name, true, array('context'=>$context)) ?>

+ heading(format_string($book->name, true, array('context'=>$context)), 1); + ?>
customtitles) { if (!$chapter->subchapter) { $currtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context); - echo '

'.$currtitle.'

'; + echo $OUTPUT->heading($currtitle); } else { $currtitle = book_get_chapter_title($chapters[$chapter->id]->parent, $chapters, $book, $context); $currsubtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context); - echo '

'.$currtitle.'

'.$currsubtitle.'

'; + echo $OUTPUT->heading($currtitle); + echo $OUTPUT->heading($currsubtitle, 3); } } @@ -143,7 +146,9 @@ if ($chapter) { echo html_writer::link('#', $printicon.$printtext, $printlinkatt); ?> -

name, true, array('context'=>$context)) ?>

+ heading(format_string($book->name, true, array('context'=>$context)), 1); + ?>

intro, $book->introformat, array('noclean'=>true, 'context'=>$context)) ?>

@@ -178,9 +183,9 @@ if ($chapter) { echo '
'; if (!$book->customtitles) { if (!$chapter->subchapter) { - echo '

'.$titles[$ch->id].'

'; + echo $OUTPUT->heading($titles[$ch->id]); } else { - echo '

'.$titles[$ch->id].'

'; + echo $OUTPUT->heading($titles[$ch->id], 3); } } $content = str_replace($link1, '#ch', $chapter->content); diff --git a/mod/book/tool/print/locallib.php b/mod/book/tool/print/locallib.php index 27838a9ff2e..4f1908197b2 100644 --- a/mod/book/tool/print/locallib.php +++ b/mod/book/tool/print/locallib.php @@ -60,7 +60,7 @@ function booktool_print_get_toc($chapters, $book, $cm) { $toc .= html_writer::tag('a', '', array('name' => 'toc')); // Representation of toc (HTML). - $toc .= html_writer::tag('h2', get_string('toc', 'mod_book'), array('class' => 'book_chapter_title')); + $toc .= html_writer::tag('h2', get_string('toc', 'mod_book')); $toc .= html_writer::start_tag('ul'); foreach ($chapters as $ch) { if (!$ch->hidden) { diff --git a/mod/book/tool/print/print.css b/mod/book/tool/print/print.css index fb5b19cce00..eaa737425bd 100644 --- a/mod/book/tool/print/print.css +++ b/mod/book/tool/print/print.css @@ -6,38 +6,12 @@ h1, h2, h3, h4, h5, h6 { page-break-inside: avoid; } -.book_title { - margin-left: -40px; - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 3em; - font-weight: bold; - margin-top: 120px; - margin-bottom: 30px; - text-align: center; -} - .book_summary { margin-left: -40px; text-align: center; margin-bottom: 120px; } -.book_chapter_title { - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - text-align: left; - font-size: 1.7em; - font-weight: bold; - - border-style: solid; - border-top-width: 0px; - border-right-width: 0px; - border-bottom-width: 1px; - border-left-width: 0px; - - margin-left: 0px; - margin-bottom: 20px; -} - .book_chapter { page-break-before: always; } diff --git a/mod/book/view.php b/mod/book/view.php index 9a604d2983d..549c0219291 100644 --- a/mod/book/view.php +++ b/mod/book/view.php @@ -172,22 +172,24 @@ if ($nextid) { // ===================================================== echo $OUTPUT->header(); +echo $OUTPUT->heading($book->name); // upper nav echo ''; // chapter itself -echo $OUTPUT->box_start('generalbox book_content'); +$hidden = $chapter->hidden ? ' dimmed_text' : null; +echo $OUTPUT->box_start('generalbox book_content' . $hidden); + if (!$book->customtitles) { - $hidden = $chapter->hidden ? 'dimmed_text' : ''; if (!$chapter->subchapter) { $currtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context); - echo $OUTPUT->heading($currtitle, 2, array('class' => 'book_chapter_title '.$hidden)); + echo $OUTPUT->heading($currtitle, 3); } else { $currtitle = book_get_chapter_title($chapters[$chapter->id]->parent, $chapters, $book, $context); $currsubtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context); - echo $OUTPUT->heading($currtitle, 2, array('class' => 'book_chapter_title '.$hidden)); - echo $OUTPUT->heading($currsubtitle, 3, array('class' => 'book_chapter_title '.$hidden)); + echo $OUTPUT->heading($currtitle, 3); + echo $OUTPUT->heading($currsubtitle, 4); } } $chaptertext = file_rewrite_pluginfile_urls($chapter->content, 'pluginfile.php', $context->id, 'mod_book', 'chapter', $chapter->id);