2018-09-04 09:16:50 +00:00
|
|
|
import React, { Component } from "react";
|
|
|
|
import TreeDirList from './tree-dir-list'
|
2018-09-19 01:57:17 +00:00
|
|
|
import "../../css/common.css";
|
2018-09-04 09:16:50 +00:00
|
|
|
const gettext = window.gettext;
|
|
|
|
|
|
|
|
class TreeDirView extends React.Component {
|
|
|
|
render() {
|
|
|
|
let node = this.props.node;
|
|
|
|
let children = node.hasChildren() ? node.children : null;
|
|
|
|
|
|
|
|
return (
|
2018-09-21 06:16:15 +00:00
|
|
|
<div className="table-container">
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style={{width: "4%"}}></th>
|
|
|
|
<th style={{width: "60%"}}>{gettext('Name')}</th>
|
|
|
|
<th style={{width: "16%"}}>{gettext('Size')}</th>
|
|
|
|
<th style={{width: "20%"}}>{gettext('Last Update')}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{children && children.map((node, index) => {
|
|
|
|
return (
|
|
|
|
<TreeDirList key={index} node={node} onMainNodeClick={this.props.onMainNodeClick}></TreeDirList>
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2018-09-04 09:16:50 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TreeDirView;
|