1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-21 02:20:17 +00:00
seahub/frontend/src/components/tree-dir-view/tree-dir-view.js

33 lines
1.0 KiB
JavaScript
Raw Normal View History

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