1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

define categories in data file

This commit is contained in:
Matthias Kretschmann 2019-02-08 11:25:51 +01:00
parent a7cdbd59d7
commit 06925ced37
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 46 additions and 101 deletions

View File

@ -38,14 +38,7 @@
"label": "Type", "label": "Type",
"type": "select", "type": "select",
"required": true, "required": true,
"options": [ "options": ["", "Data set", "Algorithm", "Container", "Workflow", "Other"]
"---",
"Data set",
"Algorithm",
"Container",
"Workflow",
"Other"
]
}, },
"license": { "license": {
"label": "License", "label": "License",
@ -72,7 +65,40 @@
"label": "Categories", "label": "Categories",
"type": "select", "type": "select",
"required": true, "required": true,
"options": ["No Category Specified"] "options": [
"",
"Image Recognition",
"Dataset Of Datasets",
"Language",
"Performing Arts",
"Visual Arts & Design",
"Philosophy",
"History",
"Theology",
"Anthropology & Archeology",
"Sociology",
"Psychology",
"Politics",
"Interdisciplinary",
"Economics & Finance",
"Demography",
"Biology",
"Chemistry",
"Physics & Energy",
"Earth & Climate",
"Space & Astronomy",
"Mathematics",
"Computer Technology",
"Engineering",
"Agriculture & Bio Engineering",
"Transportation",
"Urban Planning",
"Medicine",
"Business & Management",
"Sports & Recreation",
"Communication & Journalism",
"Other"
]
} }
} }
} }

View File

@ -124,99 +124,18 @@ class Publish extends Component<{}, PublishState> {
> >
{this.formFields(entries)} {this.formFields(entries)}
<div>
Category:
<select
name="categories"
value={this.state.categories[0]}
onChange={this.inputToArrayChange}
>
<option value="No Category Specified">
No Category Specified
</option>
<option value="Image Recognition">
Image Recognition
</option>
<option value="Dataset Of Datasets">
Dataset Of Datasets
</option>
<option value="Language">Language</option>
<option value="Performing Arts">
Performing Arts
</option>
<option value="Visual Arts & Design">
Visual Arts & Design
</option>
<option value="Philosophy">Philosophy</option>
<option value="History">History</option>
<option value="Theology">Theology</option>
<option value="Anthropology & Archeology">
Anthropology & Archeology
</option>
<option value="Sociology">Sociology</option>
<option value="Psychology">Psychology</option>
<option value="Politics">Politics</option>
<option value="Interdisciplinary">
Interdisciplinary
</option>
<option value="Economics & Finance">
Economics & Finance
</option>
<option value="Demography">Demography</option>
<option value="Biology">Biology</option>
<option value="Chemistry">Chemistry</option>
<option value="Physics & Energy">
Physics & Energy
</option>
<option value="Earth & Climate">
Earth & Climate
</option>
<option value="Space & Astronomy">
Space & Astronomy
</option>
<option value="Mathematics">Mathematics</option>
<option value="Computer Technology">
Computer Technology
</option>
<option value="Engineering">Engineering</option>
<option value="Agriculture & Bio Engineering">
Agriculture & Bio Engineering
</option>
<option value="Transportation">
Transportation
</option>
<option value="Urban Planning">
Urban Planning
</option>
<option value="Medicine">Medicine</option>
<option value="Language">Language</option>
<option value="Business & Management">
Business & Management
</option>
<option value="Sports & Recreation">
Sports & Recreation
</option>
<option value="Communication & Journalism">
Communication & Journalism
</option>
<option value="Other">Other</option>
</select>
</div>
<User.Consumer> <User.Consumer>
{states => ( {states =>
<div> states.isLogged ? (
{states.isLogged ? ( <Button primary>
<Button primary> Register asset (we are logged)
Register asset (we are logged) </Button>
</Button> ) : (
) : ( <Button primary onClick={states.startLogin}>
<Button primary onClick={states.startLogin}> Register asset (login first)
Register asset (login first) </Button>
</Button> )
)} }
</div>
)}
</User.Consumer> </User.Consumer>
</Form> </Form>
</div> </div>