';
- echo '';
- if ($canedit) {
- $iconstr="";
- $editicon= ' ';
- $infoicon= ' ';
-
- if($ewiki_action!="edit" && !in_array($wikipage, $specialpages)) {
- $iconstr.=''.$editicon."";
- }
- else {
- $iconstr.=$editicon;
- }
-
- if($ewiki_action!="info" && !in_array($wikipage, $specialpages)) {
- $iconstr.=''.$infoicon."";
- }
- else {
- $iconstr.=$infoicon;
- }
- echo $iconstr;
- }
- echo ' | ';
- echo '';
- wiki_print_page_actions($cm->id, $specialpages, $ewiki_id, $ewiki_action, $wiki->ewikiacceptbinary, $canedit);
- echo ' | ';
-
/// Searchform
- echo '';
+ echo ' | ';
wiki_print_search_form($cm->id, $q, $userid, $groupid, false);
echo ' | ';
@@ -315,14 +289,38 @@
}
if($ewiki_title==$wiki_entry->pagename && !empty($wiki->summary)) {
- print "
";
- print_simple_box(format_text($wiki->summary, FORMAT_MOODLE), "center");
- print "
";
+ if (trim(strip_tags($wiki->summary))) {
+ print "
";
+ print_simple_box(format_text($wiki->summary, FORMAT_MOODLE), "center");
+ print "
";
+ }
}
-
// The wiki Contents
- print_simple_box_start( "center", "100%", "$THEME->cellcontent", "20");
+
+ if ($canedit) { /// Print tabs with commands for this page
+ $tabstyle = ' style="padding-left: 5px;padding-right: 5px" ';
+
+ echo "";
+ echo "";
+ $tabs = array('view', 'edit','links','info');
+ if ($binary) {
+ $tabs[] = 'attachments';
+ }
+ foreach ($tabs as $tab) {
+ $tabname = get_string("tab$tab", 'wiki');
+ if ($ewiki_action != "$tab" && !in_array($wikipage, $specialpages)) {
+ echo '| ';
+ echo ''.$tabname.'';
+ echo ' | ';
+ } else {
+ echo ''.$tabname.' | ';
+ }
+ }
+ echo "
";
+ echo "
";
+ }
+ print_simple_box_start( "right", "100%", "$THEME->cellcontent", "20");
if($ewiki_action=="edit") {
# When editing, the filters shall not interfere the wiki-source
print $content;
@@ -330,6 +328,7 @@
print(format_text($content, $moodle_format));
}
print_simple_box_end();
+ echo "
";
/// Finish the page
print_footer($course);