1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Merge pull request #3401 from haiwen/group-bug-repair

repair new department bug
This commit is contained in:
Daniel Pan
2019-05-05 13:26:12 +08:00
committed by GitHub

View File

@@ -353,7 +353,7 @@ class GroupView extends React.Component {
}
render() {
let { errMessage, emptyTip, currentGroup } = this.state;
let { errMessage, emptyTip, currentGroup, isDepartmentGroup, isStaff } = this.state;
let isShowSettingIcon = !(currentGroup && currentGroup.parent_group_id !== 0 && currentGroup.admins.indexOf(username) === -1);
let that = this;
return (
@@ -362,7 +362,7 @@ class GroupView extends React.Component {
<div className="cur-view-toolbar">
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu" onClick={this.props.onShowSidePanel}></span>
<div className="operation">
{canAddRepo && (
{((!isDepartmentGroup && canAddRepo) || (isDepartmentGroup && isStaff)) && (
<button className="btn btn-secondary operation-item" title={gettext('New Library')} onClick={this.onCreateRepoToggle}>
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Library')}
</button>