Now glossary "add entry" is a button instead of a tab. Part of MDL-8746

Merged from MOODLE_18_STABLE
This commit is contained in:
stronk7
2007-03-19 18:22:59 +00:00
parent 049faac882
commit 66111853bb
2 changed files with 17 additions and 7 deletions
-6
View File
@@ -15,12 +15,6 @@
$inactive = array();
$activated = array();
if (has_capability('mod/glossary:write', $context)) {
$toolsrow[] = new tabobject(GLOSSARY_ADDENTRY_VIEW,
$CFG->wwwroot.'/mod/glossary/edit.php?id='.$cm->id,
get_string('addentry', 'glossary'));
}
if (has_capability('mod/glossary:import', $context)) {
$toolsrow[] = new tabobject(GLOSSARY_IMPORT_VIEW,
$CFG->wwwroot.'/mod/glossary/import.php?id='.$cm->id,
+17 -1
View File
@@ -264,7 +264,6 @@
}
/// Search box
echo '<form method="post" action="view.php">';
echo '<table align="center" width="70%" border="0">';
@@ -288,6 +287,23 @@
echo '</td></tr></table>';
echo '</form>';
echo '<br />';
/// Show the add entry button if allowed
if (has_capability('mod/glossary:write', $context)) {
echo '<div class="singlebutton glossaryaddentry">';
echo "<form id=\"newentryform\" method=\"get\" action=\"$CFG->wwwroot/mod/glossary/edit.php\">";
echo '<div>';
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
echo '<input type="submit" value="';
print_string('addentry', 'glossary');
echo '" />';
echo '</div>';
echo '</form>';
echo "</div>\n";
}
echo '<br />';
include("tabs.php");