mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
update draft ui (#3049)
This commit is contained in:
@@ -1,33 +1,23 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { siteRoot, gettext } from '../../utils/constants';
|
||||
import { Link } from '@reach/router';
|
||||
import { gettext } from '../../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
currentTab: PropTypes.string.isRequired,
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.array,
|
||||
PropTypes.object
|
||||
]).isRequired,
|
||||
tabItemClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class DraftsView extends React.Component {
|
||||
|
||||
tabItemClick = (param) => {
|
||||
this.props.tabItemClick(param);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="main-panel-center">
|
||||
<div className="cur-view-container">
|
||||
<div className="cur-view-path draft-review-nav">
|
||||
<ul className="nav">
|
||||
<li className="nav-item" onClick={() => this.tabItemClick('drafts')}>
|
||||
<Link className={`nav-link ${this.props.currentTab === 'drafts' ? 'active': ''}`} to={siteRoot + 'drafts/'} title={gettext('Drafts')}>{gettext('Drafts')}</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<div className="cur-view-path">
|
||||
<div className="path-container">
|
||||
<h3 className="sf-heading">{gettext('Drafts')}</h3>
|
||||
</div>
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user