view.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. //require_once '../inc/global.inc.php';
  8. $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Timeline'));
  9. $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('Listing'));
  10. $timeline = new Timeline();
  11. if (empty($_GET['id'])) {
  12. api_not_allowed();
  13. }
  14. $url = $timeline->get_url($_GET['id']);
  15. $item = $timeline->get($_GET['id']);
  16. $interbreadcrumb[]=array('url' => '#','name' => $item['headline']);
  17. $htmlHeadXtra[] = api_get_css('js/timeline/timeline.css');
  18. $htmlHeadXtra[] = api_get_js('js/timeline/timeline-min.js');
  19. $htmlHeadXtra[] = '
  20. <script>
  21. $(document).ready(function() {
  22. var timeline = new VMM.Timeline();
  23. timeline.init("'.$url.'");
  24. });
  25. </script>';
  26. $content = '<div class="timeline-example"><div id="timeline"></div></div>';
  27. $tpl = new Template($tool_name);
  28. $tpl->assign('actions', $actions);
  29. $tpl->assign('message', $message);
  30. $tpl->assign('content', $content);
  31. $tpl->display_one_col_template();