config_js.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
  4. require_once __DIR__.'/../../../global.inc.php';
  5. $moreButtonsInMaximizedMode = false;
  6. if (api_get_setting('more_buttons_maximized_mode') === 'true') {
  7. $moreButtonsInMaximizedMode = true;
  8. }
  9. $template = new Template();
  10. $template->assign(
  11. 'bootstrap_css',
  12. api_get_path(WEB_PUBLIC_PATH).'assets/bootstrap/dist/css/bootstrap.min.css'
  13. );
  14. $template->assign(
  15. 'font_awesome_css',
  16. api_get_path(WEB_PUBLIC_PATH).'assets/fontawesome/css/font-awesome.min.css'
  17. );
  18. $template->assign(
  19. 'css_editor',
  20. ChamiloApi::getEditorBlockStylePath()
  21. );
  22. $template->assign('moreButtonsInMaximizedMode', $moreButtonsInMaximizedMode);
  23. $courseId = api_get_course_int_id();
  24. $courseCondition = '';
  25. if (!empty($courseId)) {
  26. $courseCondition = api_get_cidreq();
  27. }
  28. $template->assign('course_condition', $courseCondition);
  29. $languageList = api_get_languages();
  30. $list = [];
  31. foreach ($languageList['all'] as $language) {
  32. $list[] = $language['isocode'].':'.$language['original_name'];
  33. }
  34. $template->assign('language_list', implode("','", $list));
  35. header('Content-type: application/x-javascript');
  36. $template->display($template->get_template('javascript/editor/ckeditor/config_js.tpl'));