From: stronk7 Date: Mon, 19 Mar 2007 18:22:59 +0000 (+0000) Subject: Now glossary "add entry" is a button instead of a tab. Part of MDL-8746 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=66111853bb59577bed99044c7baa9d8a69beead6;p=moodle.git Now glossary "add entry" is a button instead of a tab. Part of MDL-8746 Merged from MOODLE_18_STABLE --- diff --git a/mod/glossary/tabs.php b/mod/glossary/tabs.php index 23fb047365..de601d6d4f 100644 --- a/mod/glossary/tabs.php +++ b/mod/glossary/tabs.php @@ -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, diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 01ace7c3d5..53836a51b7 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -264,7 +264,6 @@ } /// Search box - echo '
'; echo ''; @@ -288,6 +287,23 @@ echo '
'; echo '
'; + + echo '
'; + +/// Show the add entry button if allowed + if (has_capability('mod/glossary:write', $context)) { + echo '
'; + echo "
wwwroot/mod/glossary/edit.php\">"; + echo '
'; + echo "id\" />"; + echo ''; + echo '
'; + echo '
'; + echo "
\n"; + } + echo '
'; include("tabs.php");