/** @jsx React.DOM */ var AnnotationsBox = React.createClass({ render: function() { if (!this.props.annotations || !this.props.annotations.length>0 ) { return
None
; } // TODO: sort by date (optionally) // TODO: table view var annotations_list = []; this.props.annotations.sort(function(a,b) { return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); }).forEach(function(item){ var itemname = item.name; var itemvalue = item.value; var dt_key = "annotation_"+itemname+"_key"; var dd_key = "annotation_"+itemname+"_value"; annotations_list.push(
{itemname}
); annotations_list.push(
{itemvalue}
); }); return
{annotations_list}
; } } );