diff --git a/mod/glossary/lang/en/glossary.php b/mod/glossary/lang/en/glossary.php index b7e4dba25ec..80676451403 100644 --- a/mod/glossary/lang/en/glossary.php +++ b/mod/glossary/lang/en/glossary.php @@ -248,6 +248,7 @@ $string['page-mod-glossary-view'] = 'View glossary edit page'; $string['pluginadministration'] = 'Glossary administration'; $string['pluginname'] = 'Glossary'; $string['popupformat'] = 'Popup format'; +$string['print'] = 'Print'; $string['printerfriendly'] = 'Printer-friendly version'; $string['printviewnotallowed'] = 'Print view isn\'t allowed'; $string['question'] = 'Question'; diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 27a6f305f00..52f0ea3125c 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -166,10 +166,24 @@ $entriesshown = 0; $currentpivot = ''; $site = $DB->get_record("course", array("id"=>1)); -echo '
' . userdate(time()) . '
'; -echo get_string("site") . ': ' . format_string($site->fullname) . '".clean_text($pivottoshow)."
" ; + echo html_writer::tag('div', clean_text($pivottoshow), array('class' => 'mdl-align strong')); } } diff --git a/mod/glossary/styles.css b/mod/glossary/styles.css index 21b14a1d876..2baf7d45318 100644 --- a/mod/glossary/styles.css +++ b/mod/glossary/styles.css @@ -33,4 +33,10 @@ #page-mod-glossary-showentry #page-content {min-width:600px;} #page-mod-glossary-print .mod-glossary-entrylist .mod-glossary-entry { vertical-align: top; } +#page-mod-glossary-print .displayprinticon, .path-mod-glossary.dir-rtl .glossarypost {text-align: right;} + +#page-mod-glossary-print .displaydate {text-align: right; font-size: 0.75em;} +#page-mod-glossary-print .strong {font-weight: bold;} + +.path-mod-glossary .printicon {background: url([[pix:t/print]]) no-repeat scroll 2px center transparent; padding-left: 20px; } diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 2b0a40dd0e1..b276b8a20d0 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -314,11 +314,7 @@ if ($showcommonelements) { /// The print icon if ( $showcommonelements and $mode != 'search') { if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) { -// print_box_start('printicon'); - echo ''; - echo " id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">pix_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" />"; - echo ''; -// print_box_end(); + echo " id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">" . get_string("printerfriendly","glossary").""; } } /// End glossary controls diff --git a/mod/wiki/lang/en/wiki.php b/mod/wiki/lang/en/wiki.php index 91b264affe9..27a4310fcbb 100644 --- a/mod/wiki/lang/en/wiki.php +++ b/mod/wiki/lang/en/wiki.php @@ -178,6 +178,7 @@ $string['peerreview'] = 'Peer review'; $string['pluginadministration'] = 'Wiki administration'; $string['pluginname'] = 'Wiki'; $string['prettyprint'] = 'Printer-friendly version'; +$string['print'] = 'Print'; $string['previewwarning'] = 'This is a preview. Changes have not been saved yet.'; $string['rated']='You rated this page as a {$a}'; $string['rating']='Rating'; diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 334cf848af8..3d9dd475dd1 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -2169,7 +2169,11 @@ class page_wiki_prettyview extends page_wiki { global $CFG, $PAGE, $OUTPUT; $PAGE->set_pagelayout('embedded'); echo $OUTPUT->header(); - + // Print dialog link. + $printtext = get_string('print', 'wiki'); + $printlinkatt = array('onclick' => 'window.print();return false;', 'class' => 'printicon'); + $printiconlink = html_writer::link('#', $printtext, $printlinkatt); + echo html_writer::tag('div', $printiconlink, array('class' => 'displayprinticon')); echo '