Commit 7fb51e51 authored by Matija Obreza's avatar Matija Obreza
Browse files

Small GUI fixes

parent a3b7a1c7
......@@ -68,6 +68,9 @@ class DescriptorUpload extends React.Component<IDescriptorUpload, any> {
private parseCsv(csvText: string) {
// log('CSV text', csvText);
if (! csvText) {
return;
}
const config: ICsvConfiguration = CSV.detectConfiguration(csvText);
......@@ -123,6 +126,15 @@ class DescriptorUpload extends React.Component<IDescriptorUpload, any> {
return (
<div>
<Paper className={ `${this.props.className} p-20 mb-20` }>
<div className="p-20 even-row">
<h4>INSTRUCTIONS FOR USE</h4>
<ul>
<li>Download the template from ...TBD...</li>
<li>Do not change header name in the template</li>
<li>Fill the template with the descriptor information, save it.</li>
<li>Copy and paste the table from Excel into the text field below.</li>
</ul>
</div>
<FormControl fullWidth>
<InputLabel>Descriptor definitions</InputLabel>
<Input onPaste={ this.dataPasted } placeholder="Paste descriptor data here (tab separated)" onBlur={ this.textBlurred }/>
......@@ -131,7 +143,7 @@ class DescriptorUpload extends React.Component<IDescriptorUpload, any> {
{ this.state.uploadedDescriptors ? (
<div>
<ContentHeaderWithButton title="Uploaded descriptor definitions" buttons={
<ContentHeaderWithButton title={ `Uploaded ${this.state.uploadedDescriptors.length} descriptor definitions` } buttons={
<Button raised onClick={ this.clickImport }>Import descriptors</Button>
} />
<Grid container spacing={ 24 }>
......@@ -142,10 +154,11 @@ class DescriptorUpload extends React.Component<IDescriptorUpload, any> {
)) }
</Grid>
</div>
) : (
<ContentHeaderWithButton title="No descriptors uploaded" />
<div>No descriptors uploaded.</div>
) }
) }
</div>
);
}
......
......@@ -319,10 +319,10 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
<Grid item xs={ 12 }>
<Grid container spacing={ 0 }>
<Properties>
<PropertiesItem title=" Metadata create date:">
<PropertiesItem title="Metadata create date:">
{ dataset.createdDate && <PrettyDate value={ dataset.createdDate } /> }
</PropertiesItem>
<PropertiesItem title=" Metadata updated date:">
<PropertiesItem title="Metadata updated date:">
{ dataset.lastModifiedDate && <PrettyDate value={ dataset.lastModifiedDate } /> }
</PropertiesItem>
</Properties>
......@@ -370,9 +370,9 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
<Grid item xs={ 12 }>
<Grid container spacing={ 0 }>
<Properties>
<PropertiesItem title="Date of Dataset:"> <PrettyDate value={ dataset.createdDate } /></PropertiesItem>
<PropertiesItem title="Date of dataset:">{ dataset.created }</PropertiesItem>
<PropertiesItem title="Related resources:">{ dataset.source }</PropertiesItem>
<PropertiesItem title="Resolve Type:">Dataset</PropertiesItem>
<PropertiesItem title="Resolve type:">Dataset</PropertiesItem>
</Properties>
</Grid>
</Grid>
......
......@@ -49,6 +49,9 @@ class ListOfAccession extends React.Component<IListOfAccession, any> {
private parseCsv(csvText: string) {
// log('CSV text', csvText);
if (! csvText) {
return;
}
const config: ICsvConfiguration = CSV.detectConfiguration(csvText);
......@@ -74,12 +77,12 @@ class ListOfAccession extends React.Component<IListOfAccession, any> {
return (
<div className={ `${ classes.root } m-20 p-20 even-row` }>
<div>
<h4>INSTRUCTION FOR USE</h4>
<h4>INSTRUCTIONS FOR USE</h4>
<ul>
<li>Create an Excel file with headers: <code>INSTCODE,ACCENUMB,GENUS,DOI</code></li>
<li>Do not change header name in the template</li>
<li>Fill the template with the informations of the accessions, save it.</li>
<li>Copy and paste the table from Excel.</li>
<li>Copy and paste the table from Excel into the text field below.</li>
</ul>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment