Skip to content

Commit

Permalink
Fixes #285
Browse files Browse the repository at this point in the history
  • Loading branch information
SumukhaKV committed Jul 16, 2018
1 parent d9ab250 commit 402434d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
30 changes: 20 additions & 10 deletions devmgmtui/src/components/filemgmt/FileDisplayComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,26 @@ class FileDisplayComponent extends Component {
Currently at : {this.props.filemgmt.currentDir}
</div>
<Divider></Divider>
<Button animated color='linkedin' onClick={this.selectAll.bind(this)}>
<Button.Content visible>{this.state.allSelected && this.props.filemgmt.selectedFiles.length ? 'Uns' : 'S'}elect All</Button.Content>
<Button.Content hidden><Icon name='check circle' /></Button.Content>
</Button>
<span style={{float:'right'}}>
<Button animated onClick={this.deleteSelected.bind(this)} negative>
<Button.Content visible>Delete Selected</Button.Content>
<Button.Content hidden><Icon name='remove circle' /></Button.Content>
</Button>
</span>
{this.props.auth.user.permissions.search(/DELETE_FILES|ALL/) >= 0 ?
<span>
<Button animated color='linkedin' onClick={this.selectAll.bind(this)}>
<Button.Content visible>{this.state.allSelected && this.props.filemgmt.selectedFiles.length ? 'Uns' : 'S'}elect All</Button.Content>
<Button.Content hidden><Icon name='check circle' /></Button.Content>
</Button>
</span>
:
null
}
{this.props.auth.user.permissions.search(/DELETE_FILES|ALL/) >= 0 ?
<span style={{float:'right'}}>
<Button animated onClick={this.deleteSelected.bind(this)} negative>
<Button.Content visible>Delete Selected</Button.Content>
<Button.Content hidden><Icon name='remove circle' /></Button.Content>
</Button>
</span>
:
null
}
<Divider></Divider>
<div>
{this.renderFileDisplayComponent()}
Expand Down
6 changes: 5 additions & 1 deletion devmgmtui/src/components/filemgmt/FileMgmt.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ class FileMgmt extends Component {
<Header as='h1'>File Management</Header>
</Grid.Column>
<Grid.Column>
<Header as='h1'>File Upload</Header>
{ this.props.auth.user.permissions.search(/UPLOAD_FILES|ALL/) >= 0 ?
<Header as='h1'>File Upload</Header>
:
null
}
</Grid.Column>
</Grid.Row>
<Grid.Row>
Expand Down

0 comments on commit 402434d

Please sign in to comment.