1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

restyle contract settings list

This commit is contained in:
Tim Daubenschütz 2015-09-08 10:03:20 +02:00
parent 86306fc089
commit 2c9370e555
2 changed files with 43 additions and 41 deletions

View File

@ -61,26 +61,27 @@ let ContractSettings = React.createClass({
render() {
let publicContracts = this.getPublicContracts();
let privateContracts = this.getPrivateContracts();
console.log(this.state.contractList);
return (
<CollapsibleParagraph
title={getLangText('Contract Settings')}
show={true}
defaultExpanded={false}>
{/* this should be this.props.defaultExpanded */}
defaultExpanded={true}>
<CollapsibleParagraph
title={getLangText('List Contracts')}
show={true}
defaultExpanded={false}>
{<div>
<p>Public Contracts</p>
{(publicContracts.length > 0) ?
publicContracts.map(
(contract) => {
defaultExpanded={true}>
<CollapsibleParagraph
title={getLangText('Public Contracts')}
show={true}
defaultExpanded={true}>
{publicContracts.map((contract) => {
return (
<ActionPanel title = {contract.name}
<ActionPanel
title={contract.name}
content={contract.name}
buttons = {<span>
buttons={
<span>
<button className="btn btn-default btn-sm margin-left-2px">
UPDATE
</button>
@ -88,21 +89,22 @@ let ContractSettings = React.createClass({
onClick={this.removeContract.bind(this, contract)}>
REMOVE
</button>
</span>}
/>);
}
) : null }
</div>}
{<div>
<p>Private Contracts</p>
{(privateContracts.length > 0) ?
privateContracts.map(
(contract) => {
</span>
}/>
);
})}
</CollapsibleParagraph>
<CollapsibleParagraph
title={getLangText('Private Contracts')}
show={true}
defaultExpanded={true}>
{privateContracts.map((contract) => {
return (
<ActionPanel title = {contract.name}
<ActionPanel
title={contract.name}
content={contract.name}
buttons = {<span>
buttons={
<span>
<button className="btn btn-default btn-sm margin-left-2px">
UPDATE
</button>
@ -114,16 +116,16 @@ let ContractSettings = React.createClass({
onClick={this.makeContractPublic.bind(this, contract)}>
MAKE PUBLIC
</button>
</span>}
/>);
}
) : null}
</div>}
</span>
}/>
);
})}
</CollapsibleParagraph>
</CollapsibleParagraph>
<CollapsibleParagraph
title={getLangText('Create Contract')}
show={true}
defaultExpanded={false}>
defaultExpanded={true}>
<CreateContractForm />
</CollapsibleParagraph>
</CollapsibleParagraph>

View File

@ -26,7 +26,7 @@
width: 100%;
/* 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;
font-size: 90%;
}