view.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. @author Julio Montoya <gugli100@gmail.com> BeezNest 2011
  5. * @package chamilo.timeline
  6. */
  7. // name of the language file that needs to be included
  8. $language_file = array ('registration','admin');
  9. require_once '../inc/global.inc.php';
  10. $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline'));
  11. $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Listing'));
  12. $timeline = new Timeline();
  13. if (empty($_GET['id'])) {
  14. api_not_allowed();
  15. }
  16. $url = $timeline->get_url($_GET['id']);
  17. $item = $timeline->get($_GET['id']);
  18. $interbreadcrumb[]=array('url' => '#','name' => $item['headline']);
  19. $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/timeline/timeline.css');
  20. $htmlHeadXtra[] = api_get_js('timeline/timeline-min.js');
  21. $htmlHeadXtra[] = '
  22. <script>
  23. $(document).ready(function() {
  24. var timeline = new VMM.Timeline();
  25. timeline.init("'.$url.'");
  26. });
  27. </script>';
  28. $content = '<div class="timeline-example"><div id="timeline"></div></div>';
  29. $app['title'] = $tool_name;
  30. $tpl = $app['template'];
  31. $tpl->assign('actions', $actions);
  32. $tpl->assign('message', $message);
  33. $tpl->assign('content', $content);
  34. $tpl->display_one_col_template();