glossary.js.php 561 B

123456789101112131415161718
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use Chamilo\CoreBundle\Framework\Container;
  4. $tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
  5. $templateName = 'glossary/glossary_auto.js.twig';
  6. if (api_get_setting('document.show_glossary_in_documents') == 'ismanual') {
  7. $templateName = 'glossary/glossary_manual.js.twig';
  8. }
  9. $addReady = isset($_GET['add_ready']) ? true : false;
  10. $tpl->addGlobal('add_ready', $addReady);
  11. echo $tpl->render('@template_style/'.$templateName);
  12. // Hide headers
  13. Container::$legacyTemplate = 'layout_empty.html.twig';