web/polemicaltimeline.php
changeset 1295 03d2aa7b4967
parent 1244 87583b020202
child 1304 10974bff4dae
equal deleted inserted replaced
1294:e652022fd1f7 1295:03d2aa7b4967
    48 $show_splash = ( $use_protocol && !in_array($rep, $_SESSION['answered_events']) );
    48 $show_splash = ( $use_protocol && !in_array($rep, $_SESSION['answered_events']) );
    49 
    49 
    50 if ($show_splash) {
    50 if ($show_splash) {
    51     array_push($_SESSION['answered_events'], $rep);
    51     array_push($_SESSION['answered_events'], $rep);
    52 }
    52 }
       
    53 
       
    54 $annotations = get_default_annotations_config($config, $translate);
    53 
    55 
    54 ?>
    56 ?>
    55 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    57 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    56 <html lang="<?php echo($actual); ?>">
    58 <html lang="<?php echo($actual); ?>">
    57   <head>
    59   <head>
   141                 disable_annotate_btn: true
   143                 disable_annotate_btn: true
   142             },
   144             },
   143 <?php if ($protocol_level > 1): ?>
   145 <?php if ($protocol_level > 1): ?>
   144             {
   146             {
   145                 type: "Polemic",
   147                 type: "Polemic",
   146                 max_elements: 60
   148                 max_elements: 60,
   147 <?php if ($protocol_level < 3): ?>
   149 <?php if ($protocol_level < 3): ?>
   148                 ,
       
   149                 polemics: []
   150                 polemics: []
       
   151 <?php elseif (isset($annotations)): ?>
       
   152                 polemics : [
       
   153 <?php foreach ($annotations as $annot_key => $annot_def): ?>
       
   154     <?php if($annot_key == 'default') { continue; } ?>
       
   155                     {
       
   156                         "name" : "<?php echo $annot_def['polemic_cat']; ?>",
       
   157                         "keywords" : <?php echo json_encode($annot_def['polemic_keywords']); ?>,
       
   158                         "color" : "<?php echo $annot_def['polemic_color'];?>"
       
   159                     },
       
   160 <?php endforeach; ?>
       
   161                 ]
   150 <?php endif; ?>
   162 <?php endif; ?>
   151             },
   163             },
   152 <?php endif; ?>
   164 <?php endif; ?>
   153 <?php if ($protocol_level > 1): ?>
   165 <?php if ($protocol_level > 1): ?>
   154             {
   166             {