glossary MDL-23369 unnecessary elements when displaying glossary entries in a popup
authorAndrew Davis <andrew@affinitysoftware.net>
Mon, 19 Jul 2010 02:57:18 +0000 (02:57 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Mon, 19 Jul 2010 02:57:18 +0000 (02:57 +0000)
mod/glossary/showentry.php
mod/glossary/styles.css

index c5c3a4f..9045c21 100644 (file)
@@ -40,6 +40,10 @@ if ($eid) {
     print_error('invalidelementid');
 }
 
+if ($popup) {
+    $PAGE->set_pagelayout('popup');
+}
+
 if ($entries) {
     foreach ($entries as $key => $entry) {
         // Need to get the course where the entry is,
@@ -59,7 +63,9 @@ if ($entries) {
                 continue;
             }
         }
-        $entries[$key]->footer = "<p style=\"text-align:right\">&raquo;&nbsp;<a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
+        if (!$popup) {
+            $entries[$key]->footer = "<p style=\"text-align:right\">&raquo;&nbsp;<a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
+        }
         add_to_log($entry->courseid, 'glossary', 'view entry', "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
     }
 }
index 47427be..0ac192f 100644 (file)
@@ -24,4 +24,6 @@
 #page-mod-glossary-import table.glossaryimportexport {margin-left:auto;margin-right:auto;}
 
 #page-mod-glossary-view table.glossarycategoryheader {margin-bottom:0em;}
-#page-mod-glossary-view table.glossarycategoryheader th {padding:0px;}
\ No newline at end of file
+#page-mod-glossary-view table.glossarycategoryheader th {padding:0px;}
+
+#page-mod-glossary-showentry #page-content {min-width:600px;}
\ No newline at end of file