/** @jsx React.DOM */
var GenericListItem = React.createClass({
render: function() {
var recordUrl = "/ui/" + this.props.data.kind + "/" + encodeURIComponent(this.props.data.record.identifier);
return (
{this.props.data.record.identifier}
|
|
);
}
});
var GenericList = React.createClass({
render: function() {
var rows = this.props.data.members.map(function (o) {
var componentName = _.str.capitalize(this.props.data.kind.substring(0, this.props.data.kind.length-1)) + "ListItem";
var itemKind = window[componentName] || GenericListItem;
return itemKind({data: {kind: this.props.data.kind, record: o}});
}.bind(this));
return (
);
}
});