--- a/web/polemicaltimeline.php Tue Nov 17 12:15:00 2015 +0100
+++ b/web/polemicaltimeline.php Wed Nov 18 15:39:05 2015 +0100
@@ -51,6 +51,8 @@
array_push($_SESSION['answered_events'], $rep);
}
+$annotations = get_default_annotations_config($config, $translate);
+
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="<?php echo($actual); ?>">
@@ -143,10 +145,20 @@
<?php if ($protocol_level > 1): ?>
{
type: "Polemic",
- max_elements: 60
+ max_elements: 60,
<?php if ($protocol_level < 3): ?>
- ,
polemics: []
+<?php elseif (isset($annotations)): ?>
+ polemics : [
+<?php foreach ($annotations as $annot_key => $annot_def): ?>
+ <?php if($annot_key == 'default') { continue; } ?>
+ {
+ "name" : "<?php echo $annot_def['polemic_cat']; ?>",
+ "keywords" : <?php echo json_encode($annot_def['polemic_keywords']); ?>,
+ "color" : "<?php echo $annot_def['polemic_color'];?>"
+ },
+<?php endforeach; ?>
+ ]
<?php endif; ?>
},
<?php endif; ?>