1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 00:00:00 +00:00

modify table css (#2537)

This commit is contained in:
杨顺强
2018-11-22 11:05:47 +08:00
committed by Daniel Pan
parent 464ef84b35
commit 921089bd01
12 changed files with 112 additions and 140 deletions

View File

@@ -1,4 +1,4 @@
import React from 'react';
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { gettext } from '../../utils/constants';
@@ -45,22 +45,20 @@ class DetailListView extends React.Component {
let position = this.getDirentPostion();
if (direntType === 'dir') {
return (
<div className="dirent-table-container">
<table>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
<tr><th>{gettext('Folder')}</th><td>{direntDetail.dir_count}</td></tr>
<tr><th>{gettext('File')}</th><td>{direntDetail.file_count}</td></tr>
<tr><th>{gettext('Size')}</th><td>{Utils.bytesToSize(direntDetail.size)}</td></tr>
<tr><th>{gettext('Position')}</th><td>{position}</td></tr>
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
</tbody>
</table>
</div>
<table>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
<tr><th>{gettext('Folder')}</th><td>{direntDetail.dir_count}</td></tr>
<tr><th>{gettext('File')}</th><td>{direntDetail.file_count}</td></tr>
<tr><th>{gettext('Size')}</th><td>{Utils.bytesToSize(direntDetail.size)}</td></tr>
<tr><th>{gettext('Position')}</th><td>{position}</td></tr>
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
</tbody>
</table>
);
} else {
return (
<div className="dirent-table-container">
<Fragment>
<table>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
@@ -93,7 +91,7 @@ class DetailListView extends React.Component {
onFileTagChanged={this.props.onFileTagChanged}
/>
}
</div>
</Fragment>
);
}
}