mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 23:02:26 +00:00
Drafts module (#2375)
This commit is contained in:
committed by
Daniel Pan
parent
0a3296d304
commit
e793730939
46
frontend/src/components/list-view/list-view.js
Normal file
46
frontend/src/components/list-view/list-view.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext } from '../constance';
|
||||
import ListItem from './list-item';
|
||||
|
||||
const propTypes = {
|
||||
isItemFreezed: PropTypes.bool.isRequired,
|
||||
draftList: PropTypes.array.isRequired,
|
||||
onMenuToggleClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class ListView extends React.Component {
|
||||
|
||||
render() {
|
||||
let drafts = this.props.draftList;
|
||||
return (
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{width: '4%'}}>{/*img*/}</th>
|
||||
<th style={{width: '46%'}}>{gettext('Name')}</th>
|
||||
<th style={{width: '20%'}}>{gettext('Owner')}</th>
|
||||
<th style={{width: '20%'}}>{gettext('Update time')}</th>
|
||||
<th style={{width: '10%'}}></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{ drafts && drafts.map((draft) => {
|
||||
return (
|
||||
<ListItem
|
||||
key={draft.id}
|
||||
draft={draft}
|
||||
onMenuToggleClick={this.props.onMenuToggleClick}
|
||||
isItemFreezed={this.props.isItemFreezed}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ListView.propTypes = propTypes;
|
||||
|
||||
export default ListView;
|
Reference in New Issue
Block a user