Skip to content

Commit

Permalink
Merge branch 'm20_MDL-22449_wiki_help_buttons' of git://github.com/do…
Browse files Browse the repository at this point in the history
…ngsheng/moodle
  • Loading branch information
skodak committed Dec 27, 2010
2 parents 1310964 + d92b5e7 commit c03b617
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
7 changes: 6 additions & 1 deletion mod/wiki/lang/en/wiki.php
Expand Up @@ -77,6 +77,7 @@
To create a new page, type the new page name enclosed in double square brackets, for example [[Page 2]].';
$string['formatnwiki_link'] = 'mod/wiki/nwiki';
$string['history'] = 'History';
$string['history_help'] = 'The history lists links to previous versions of the page.';
$string['html'] = 'HTML';
$string['insertcomment'] = 'Insert comment';
$string['invalidlock'] = 'This page is already locked by another user.';
Expand All @@ -97,7 +98,9 @@
$string['modulenameplural'] = 'Wikis';
$string['navigation'] = 'Navigation';
$string['navigationfrom'] = 'This page comes from';
$string['navigationfrom_help'] = 'The wiki pages linking to this page';
$string['navigationto'] = 'This page goes to';
$string['navigationto_help'] = 'The links that included in this page';
$string['newpage'] = 'New';
$string['newpagetitle'] = 'New page title';
$string['noattachments'] = '<strong>No files attached</strong>';
Expand Down Expand Up @@ -131,9 +134,10 @@
$string['overridinglocks'] = 'Overriding locks...';
$string['pageexists'] = 'This page already exists. Redirecting to it.';
$string['pageindex'] = 'Page Index';
$string['pageindex_help'] = 'This wiki\'s page tree';
$string['pageislocked'] = 'Someone is editing this page right now. Try to edit it in a few minutes.';
$string['pageindex'] = 'Page index';
$string['pagelist'] = 'Page list';
$string['pagelist_help'] = 'Page list categorized by alphabetical order';
$string['peerreview'] = 'Peer review';
$string['pluginadministration'] = 'Wiki administration';
$string['pluginname'] = 'Wiki';
Expand Down Expand Up @@ -164,6 +168,7 @@
$string['teacherrating'] = 'Teacher rating';
$string['timesrating']='This page has been rated {$a->c} times with an average of: {$a->s}';
$string['updatedpages'] = "Updated pages";
$string['updatedpages_help'] = "Recently updated wiki pages";
$string['updatedwikipages'] = "Updated wiki pages";
$string['upload'] = "Upload & Delete";
$string['uploadname'] = "Filename";
Expand Down
24 changes: 18 additions & 6 deletions mod/wiki/pagelib.php
Expand Up @@ -1183,6 +1183,16 @@ function print_header() {
$this->print_pagetitle();
}

function print_pagetitle() {
global $OUTPUT;
$html = '';

$html .= $OUTPUT->container_start();
$html .= $OUTPUT->heading_with_help(format_string($this->title), 'history', 'wiki');
$html .= $OUTPUT->container_end();
echo $html;
}

function print_content() {
global $PAGE;

Expand Down Expand Up @@ -1426,7 +1436,7 @@ function print_content() {

if ($this->view > 0) {
//echo '<div><a href="' . $CFG->wwwroot . '/mod/wiki/map.php?pageid=' . $this->page->id . '">' . get_string('backtomapmenu', 'wiki') . '</a></div>';
}
}

switch ($this->view) {
case 1:
Expand Down Expand Up @@ -1559,7 +1569,7 @@ private function print_navigation_content() {

$table = new html_table();
$table->attributes['class'] = 'wiki_navigation_from';
$table->head = array(get_string('navigationfrom', 'wiki') . ':');
$table->head = array(get_string('navigationfrom', 'wiki') . $OUTPUT->help_icon('navigationfrom', 'wiki') . ':');
$table->data = array();
$table->rowclasses = array();
foreach ($fromlinks as $link) {
Expand All @@ -1573,7 +1583,7 @@ private function print_navigation_content() {

$table = new html_table();
$table->attributes['class'] = 'wiki_navigation_to';
$table->head = array(get_string('navigationto', 'wiki') . ':');
$table->head = array(get_string('navigationto', 'wiki') . $OUTPUT->help_icon('navigationto', 'wiki') . ':');
$table->data = array();
$table->rowclasses = array();
foreach ($tolinks as $link) {
Expand All @@ -1597,6 +1607,7 @@ private function print_navigation_content() {
*
*/
private function print_index_content() {
global $OUTPUT;
$page = $this->page;

if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) {
Expand All @@ -1611,7 +1622,7 @@ private function print_index_content() {
$tree = wiki_build_tree($page, $node, $keys);

$table = new html_table();
$table->head = array(get_string('pageindex', 'wiki'));
$table->head = array(get_string('pageindex', 'wiki') . $OUTPUT->help_icon('pageindex', 'wiki'));
$table->attributes['class'] = 'wiki_editor generalbox';
$table->data[] = array($this->render_navigation_node($tree));

Expand All @@ -1624,6 +1635,7 @@ private function print_index_content() {
*
*/
private function print_page_list_content() {
global $OUTPUT;
$page = $this->page;

if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) {
Expand All @@ -1650,7 +1662,7 @@ private function print_page_list_content() {
}

$table = new html_table();
$table->head = array(get_string('pagelist', 'wiki'));
$table->head = array(get_string('pagelist', 'wiki') . $OUTPUT->help_icon('pagelist', 'wiki'));
$table->attributes['class'] = 'wiki_editor generalbox';
$table->align = array('center');
foreach ($stdaux as $key => $elem) {
Expand Down Expand Up @@ -1716,7 +1728,7 @@ private function print_updated_content() {
$swid = $this->subwiki->id;

$table = new html_table();
$table->head = array(get_string('updatedpages', 'wiki'));
$table->head = array(get_string('updatedpages', 'wiki') . $OUTPUT->help_icon('updatedpages', 'wiki'));
$table->attributes['class'] = 'wiki_editor generalbox';
$table->data = array();
$table->rowclasses = array();
Expand Down

0 comments on commit c03b617

Please sign in to comment.