mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
restyle contract settings list
This commit is contained in:
parent
86306fc089
commit
2c9370e555
@ -61,49 +61,51 @@ let ContractSettings = React.createClass({
|
|||||||
render() {
|
render() {
|
||||||
let publicContracts = this.getPublicContracts();
|
let publicContracts = this.getPublicContracts();
|
||||||
let privateContracts = this.getPrivateContracts();
|
let privateContracts = this.getPrivateContracts();
|
||||||
console.log(this.state.contractList);
|
|
||||||
return (
|
return (
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Contract Settings')}
|
title={getLangText('Contract Settings')}
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={false}>
|
defaultExpanded={true}>
|
||||||
{/* this should be this.props.defaultExpanded */}
|
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('List Contracts')}
|
title={getLangText('List Contracts')}
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={false}>
|
defaultExpanded={true}>
|
||||||
{<div>
|
<CollapsibleParagraph
|
||||||
<p>Public Contracts</p>
|
title={getLangText('Public Contracts')}
|
||||||
{(publicContracts.length > 0) ?
|
show={true}
|
||||||
publicContracts.map(
|
defaultExpanded={true}>
|
||||||
(contract) => {
|
{publicContracts.map((contract) => {
|
||||||
return (
|
return (
|
||||||
<ActionPanel title = {contract.name}
|
<ActionPanel
|
||||||
content = {contract.name}
|
title={contract.name}
|
||||||
buttons = {<span>
|
content={contract.name}
|
||||||
<button className="btn btn-default btn-sm margin-left-2px">
|
buttons={
|
||||||
UPDATE
|
<span>
|
||||||
</button>
|
<button className="btn btn-default btn-sm margin-left-2px">
|
||||||
<button className="btn btn-default btn-sm margin-left-2px"
|
UPDATE
|
||||||
onClick={this.removeContract.bind(this, contract)}>
|
</button>
|
||||||
REMOVE
|
<button className="btn btn-default btn-sm margin-left-2px"
|
||||||
</button>
|
onClick={this.removeContract.bind(this, contract)}>
|
||||||
</span>}
|
REMOVE
|
||||||
/>);
|
</button>
|
||||||
}
|
</span>
|
||||||
) : null }
|
}/>
|
||||||
</div>}
|
);
|
||||||
|
})}
|
||||||
{<div>
|
</CollapsibleParagraph>
|
||||||
<p>Private Contracts</p>
|
<CollapsibleParagraph
|
||||||
{(privateContracts.length > 0) ?
|
title={getLangText('Private Contracts')}
|
||||||
privateContracts.map(
|
show={true}
|
||||||
(contract) => {
|
defaultExpanded={true}>
|
||||||
|
{privateContracts.map((contract) => {
|
||||||
return (
|
return (
|
||||||
<ActionPanel title = {contract.name}
|
<ActionPanel
|
||||||
content = {contract.name}
|
title={contract.name}
|
||||||
buttons = {<span>
|
content={contract.name}
|
||||||
<button className="btn btn-default btn-sm margin-left-2px">
|
buttons={
|
||||||
|
<span>
|
||||||
|
<button className="btn btn-default btn-sm margin-left-2px">
|
||||||
UPDATE
|
UPDATE
|
||||||
</button>
|
</button>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px"
|
<button className="btn btn-default btn-sm margin-left-2px"
|
||||||
@ -114,16 +116,16 @@ let ContractSettings = React.createClass({
|
|||||||
onClick={this.makeContractPublic.bind(this, contract)}>
|
onClick={this.makeContractPublic.bind(this, contract)}>
|
||||||
MAKE PUBLIC
|
MAKE PUBLIC
|
||||||
</button>
|
</button>
|
||||||
</span>}
|
</span>
|
||||||
/>);
|
}/>
|
||||||
}
|
);
|
||||||
) : null}
|
})}
|
||||||
</div>}
|
</CollapsibleParagraph>
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Create Contract')}
|
title={getLangText('Create Contract')}
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={false}>
|
defaultExpanded={true}>
|
||||||
<CreateContractForm />
|
<CreateContractForm />
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
/* Shrink the size of the headline for a nested element */
|
/* Shrink the size of the headline for a nested element */
|
||||||
.ascribe-collapsible-wrapper > div:first-child {
|
.ascribe-collapsible-wrapper > .ascribe-collapsible-content {
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user