2014-11-13 15:14:41 +01:00
|
|
|
var React = require('react'),
|
2014-11-14 07:29:55 +01:00
|
|
|
LogEntry = require('./LogEntry');
|
2014-11-13 15:14:41 +01:00
|
|
|
|
2014-11-14 07:29:55 +01:00
|
|
|
var LogEntryList = React.createClass({
|
2014-11-13 15:14:41 +01:00
|
|
|
propTypes: {
|
|
|
|
events: React.PropTypes.array.isRequired
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function() {
|
2014-11-14 07:29:55 +01:00
|
|
|
var logEntryNodes = this.props.events.map(function(event) {
|
|
|
|
return <LogEntry event={event} key={event.name} />;
|
2014-11-13 15:14:41 +01:00
|
|
|
});
|
|
|
|
return (
|
2014-11-29 14:25:27 +01:00
|
|
|
<div className=''>
|
2014-11-29 13:55:38 +01:00
|
|
|
<table className='outerborder zebra-striped'>
|
2014-11-13 15:14:41 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2014-11-17 10:10:47 +01:00
|
|
|
<th>When</th>
|
2014-11-13 15:14:41 +01:00
|
|
|
<th>Action</th>
|
2014-11-17 10:10:47 +01:00
|
|
|
<th>Data</th>
|
2014-11-13 15:14:41 +01:00
|
|
|
<th>Author</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-11-14 07:29:55 +01:00
|
|
|
{logEntryNodes}
|
2014-11-13 15:14:41 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-11-14 07:29:55 +01:00
|
|
|
module.exports = LogEntryList;
|