2019-04-12 05:28:15 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import CommonToolbar from './common-toolbar';
|
|
|
|
import { Button } from 'reactstrap';
|
|
|
|
import { gettext } from '../../utils/constants';
|
2019-08-22 12:23:08 +00:00
|
|
|
import { Utils } from '../../utils/utils';
|
2019-04-12 05:28:15 +00:00
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
onShowSidePanel: PropTypes.func.isRequired,
|
|
|
|
onSearchedClick: PropTypes.func.isRequired,
|
2019-04-23 05:36:21 +00:00
|
|
|
toggleInvitePeopleDialog: PropTypes.func.isRequired,
|
2019-04-12 05:28:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class InvitationsToolbar extends React.Component {
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2019-04-23 05:36:21 +00:00
|
|
|
let { onShowSidePanel, onSearchedClick, toggleInvitePeopleDialog } = this.props;
|
2019-04-12 05:28:15 +00:00
|
|
|
return (
|
|
|
|
<div className="main-panel-north border-left-show">
|
|
|
|
<div className="cur-view-toolbar">
|
2019-05-15 06:56:46 +00:00
|
|
|
<span title="Side Nav Menu" onClick={onShowSidePanel} className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none">
|
2019-04-12 05:28:15 +00:00
|
|
|
</span>
|
2019-08-22 12:23:08 +00:00
|
|
|
{Utils.isDesktop() ? (
|
2019-04-12 05:28:15 +00:00
|
|
|
<div className="operation">
|
2019-04-23 05:36:21 +00:00
|
|
|
<Button color="btn btn-secondary operation-item" onClick={toggleInvitePeopleDialog}>
|
2020-01-03 08:50:17 +00:00
|
|
|
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('Invite Guest')}
|
2019-04-12 05:28:15 +00:00
|
|
|
</Button>
|
|
|
|
</div>
|
2019-08-14 07:29:31 +00:00
|
|
|
) : (
|
2020-01-03 08:50:17 +00:00
|
|
|
<span className="sf2-icon-plus mobile-toolbar-icon" title={gettext('Invite Guest')} onClick={toggleInvitePeopleDialog}></span>
|
2019-08-14 07:29:31 +00:00
|
|
|
)}
|
2019-04-12 05:28:15 +00:00
|
|
|
</div>
|
|
|
|
<CommonToolbar searchPlaceholder={this.props.searchPlaceholder} onSearchedClick={onSearchedClick}/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-19 10:09:12 +00:00
|
|
|
InvitationsToolbar.propTypes = propTypes;
|
2019-04-12 05:28:15 +00:00
|
|
|
|
|
|
|
export default InvitationsToolbar;
|