mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Merge pull request #82 from Unleash/editable-state
editable=false on strategies
This commit is contained in:
commit
75ddedc5a6
@ -33,7 +33,11 @@ class StrategiesListComponent extends Component {
|
||||
<strong>{strategy.name}</strong>
|
||||
</Link>
|
||||
</ListItemContent>
|
||||
<IconButton name="delete" onClick={() => removeStrategy(strategy)} />
|
||||
{
|
||||
strategy.editable === false ?
|
||||
'' :
|
||||
<IconButton name="delete" onClick={() => removeStrategy(strategy)} />
|
||||
}
|
||||
</ListItem>
|
||||
)) : <ListItem>No entries</ListItem>}
|
||||
</List>
|
||||
|
@ -60,21 +60,24 @@ export default class StrategyDetails extends Component {
|
||||
|
||||
const tabContent = this.getTabContent(activeTabId);
|
||||
|
||||
return (
|
||||
<Grid className="mdl-color--white">
|
||||
<Cell col={12}>
|
||||
<HeaderTitle title={strategy.name} subtitle={strategy.description} />
|
||||
<Tabs activeTab={activeTabId} ripple>
|
||||
<Tab onClick={() => this.goToTab('view')}>Details</Tab>
|
||||
<Tab onClick={() => this.goToTab('edit')}>Edit</Tab>
|
||||
</Tabs>
|
||||
<section>
|
||||
<div className="content">
|
||||
{tabContent}
|
||||
</div>
|
||||
</section>
|
||||
</Cell>
|
||||
</Grid>
|
||||
);
|
||||
return (<Grid className="mdl-color--white">
|
||||
<Cell col={12}>
|
||||
<HeaderTitle title={strategy.name} subtitle={strategy.description} />
|
||||
{strategy.editable === false ? '' : <Tabs activeTab={activeTabId} ripple>
|
||||
<Tab onClick={() => this.goToTab('view')}>
|
||||
Details
|
||||
</Tab>
|
||||
<Tab onClick={() => this.goToTab('edit')}>
|
||||
Edit
|
||||
</Tab>
|
||||
</Tabs>}
|
||||
|
||||
<section>
|
||||
<div className="content">
|
||||
{tabContent}
|
||||
</div>
|
||||
</section>
|
||||
</Cell>
|
||||
</Grid>);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user