mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-39815' of git://github.com/rwijaya/moodle
This commit is contained in:
commit
4e6ad78679
@ -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';
|
||||
|
@ -166,10 +166,24 @@ $entriesshown = 0;
|
||||
$currentpivot = '';
|
||||
|
||||
$site = $DB->get_record("course", array("id"=>1));
|
||||
echo '<p style="text-align:right"><span style="font-size:0.75em">' . userdate(time()) . '</span></p>';
|
||||
echo get_string("site") . ': <strong>' . format_string($site->fullname) . '</strong><br />';
|
||||
echo get_string("course") . ': <strong>' . format_string($course->fullname) . ' ('. format_string($course->shortname) . ')</strong><br />';
|
||||
echo get_string("modulename","glossary") . ': <strong>' . format_string($glossary->name, true) . '</strong>';
|
||||
|
||||
// Print dialog link.
|
||||
$printtext = get_string('print', 'glossary');
|
||||
$printlinkatt = array('onclick' => 'window.print();return false;', 'class' => 'glossary_no_print printicon');
|
||||
$printiconlink = html_writer::link('#', $printtext, $printlinkatt);
|
||||
echo html_writer::tag('div', $printiconlink, array('class' => 'displayprinticon'));
|
||||
|
||||
echo html_writer::tag('div', userdate(time()), array('class' => 'displaydate'));
|
||||
|
||||
$sitename = get_string("site") . ': <span class="strong">' . format_string($site->fullname) . '</span>';
|
||||
echo html_writer::tag('div', $sitename, array('class' => 'sitename'));
|
||||
|
||||
$coursename = get_string("course") . ': <span class="strong">' . format_string($course->fullname) . ' ('. format_string($course->shortname) . ')</span>';
|
||||
echo html_writer::tag('div', $coursename, array('class' => 'coursename'));
|
||||
|
||||
$modname = get_string("modulename","glossary") . ': <span class="strong">' . format_string($glossary->name, true) . '</span>';
|
||||
echo html_writer::tag('div', $modname, array('class' => 'modname'));
|
||||
|
||||
if ( $allentries ) {
|
||||
foreach ($allentries as $entry) {
|
||||
|
||||
@ -195,8 +209,7 @@ if ( $allentries ) {
|
||||
$user = $DB->get_record("user", array("id"=>$entry->userid));
|
||||
$pivottoshow = fullname($user);
|
||||
}
|
||||
|
||||
echo "<p class='mdl-align'><strong>".clean_text($pivottoshow)."</strong></p>" ;
|
||||
echo html_writer::tag('div', clean_text($pivottoshow), array('class' => 'mdl-align strong'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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; }
|
||||
|
@ -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 '<span class="wrap printicon">';
|
||||
echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"".$OUTPUT->pix_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
|
||||
echo '</span>';
|
||||
// print_box_end();
|
||||
echo " <a class='printicon' title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">" . get_string("printerfriendly","glossary")."</a>";
|
||||
}
|
||||
}
|
||||
/// End glossary controls
|
||||
|
@ -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';
|
||||
|
@ -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 '<h1 id="wiki_printable_title">' . format_string($this->title) . '</h1>';
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ class mod_wiki_renderer extends plugin_renderer_base {
|
||||
$html = '';
|
||||
$link = new moodle_url('/mod/wiki/prettyview.php', array('pageid' => $page->id));
|
||||
$html .= $this->output->container_start('wiki_right');
|
||||
$html .= $this->output->action_link($link, get_string('prettyprint', 'wiki'), new popup_action('click', $link));
|
||||
$html .= $this->output->action_link($link, get_string('prettyprint', 'wiki'), new popup_action('click', $link), array('class' => 'printicon'));
|
||||
$html .= $this->output->container_end();
|
||||
return $html;
|
||||
}
|
||||
|
@ -363,3 +363,8 @@ a.wiki_edit_section {
|
||||
height: 22px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.path-mod-wiki .printicon {
|
||||
background: url([[pix:t/print]]) no-repeat scroll 2px center transparent; padding-left: 20px;
|
||||
}
|
||||
#page-mod-wiki-prettyview .displayprinticon {text-align: right;}
|
Loading…
x
Reference in New Issue
Block a user