Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
babc2a9b
Commit
babc2a9b
authored
Nov 06, 2018
by
Viacheslav Pavlov
Committed by
Matija Obreza
Nov 07, 2018
Browse files
Accession images and files
parent
2a5c6817
Changes
5
Hide whitespace changes
Inline
Side-by-side
locales/en/common.json
View file @
babc2a9b
...
...
@@ -10,6 +10,7 @@
"create"
:
"Create"
,
"delete"
:
"Delete"
,
"deleteData"
:
"Delete data"
,
"download"
:
"Download"
,
"edit"
:
"Edit"
,
"logout"
:
"Logout"
,
"manage"
:
"Manage"
,
...
...
locales/en/translations.json
View file @
babc2a9b
...
...
@@ -222,7 +222,9 @@
"metadata"
:
"Metadata"
,
"permanentURL"
:
"Permanent URL"
,
"associatedDatasets"
:
"Associated Datasets"
,
"associatedSubsets"
:
"Associated Subsets"
"associatedSubsets"
:
"Associated Subsets"
,
"relatedResources"
:
"Related resources"
,
"imageGallery"
:
"Image gallery"
},
"browse"
:
{
"title"
:
"Accession browser"
,
...
...
src/accessions/translations.json
View file @
babc2a9b
...
...
@@ -47,7 +47,9 @@
"metadata"
:
"Metadata"
,
"permanentURL"
:
"Permanent URL"
,
"associatedDatasets"
:
"Associated Datasets"
,
"associatedSubsets"
:
"Associated Subsets"
"associatedSubsets"
:
"Associated Subsets"
,
"relatedResources"
:
"Related resources"
,
"imageGallery"
:
"Image gallery"
},
"browse"
:
{
"title"
:
"Accession browser"
,
...
...
src/accessions/ui/DisplayPage.tsx
View file @
babc2a9b
...
...
@@ -9,6 +9,7 @@ import {addAccessionToMyList, removeAccessionFromMyList} from 'list/actions/publ
// Models
import
AccessionDetails
from
'
model/accession/AccessionDetails
'
;
import
RepositoryFile
from
'
model/repository/RepositoryFile
'
;
// UI
import
{
Link
}
from
'
react-router-dom
'
;
...
...
@@ -29,6 +30,8 @@ import PropertiesCard from 'ui/common/PropertiesCard';
import
GridLayout
from
'
ui/layout/GridLayout
'
;
import
McpdDate
from
'
ui/common/time/McpdDate
'
;
import
PdciTable
from
'
./c/PdciTable
'
;
import
ImageGalleryView
from
'
repository/ui/c/ImageGalleryView
'
;
import
Button
from
'
@material-ui/core/Button/Button
'
;
interface
IBrowsePageProps
extends
React
.
ClassAttributes
<
any
>
{
...
...
@@ -79,10 +82,10 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
public
render
()
{
const
{
t
,
error
,
uuid
,
doi
,
accessions
}
=
this
.
props
;
const
{
details
:
accession
,
pdci
,
datasets
,
subsets
}
=
this
.
props
.
accession
?
const
{
details
:
accession
,
pdci
,
datasets
,
subsets
,
files
,
imageGallery
}
=
this
.
props
.
accession
?
this
.
props
.
accession
:
{
details
:
null
,
pdci
:
null
,
datasets
:
null
,
subsets
:
null
};
{
details
:
null
,
pdci
:
null
,
datasets
:
null
,
subsets
:
null
,
files
:
null
,
imageGallery
:
null
};
const
isChecked
=
accession
&&
accessions
&&
accessions
.
includes
(
accession
.
uuid
);
const
theDoi
=
`10.
${
doi
}
`
;
...
...
@@ -180,6 +183,29 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
</
Properties
>
</
PageSection
>
}
{
files
&&
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.relatedResources
'
)
}
>
<
Properties
>
{
files
.
map
((
e
:
RepositoryFile
)
=>
(
<
PropertiesItem
key
=
{
e
.
uuid
}
title
=
{
<
a
href
=
{
`/proxy/api/v1/repository/download/
${
e
.
uuid
}
`
}
>
<
Button
variant
=
"raised"
component
=
"span"
>
{
t
(
'
common:action.download
'
)
}
</
Button
>
</
a
>
}
>
<
b
>
{
e
.
originalFilename
}
</
b
>
</
PropertiesItem
>
))
}
</
Properties
>
</
PageSection
>
}
{
imageGallery
&&
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.imageGallery
'
)
}
>
<
ImageGalleryView
imageGallery
=
{
imageGallery
}
/>
</
PageSection
>
}
{
accession
.
coll
&&
<
PageSection
title
=
{
t
(
'
accessions.public.p.display.collectingInformation
'
)
}
>
...
...
src/model/accession/AccessionDetails.ts
View file @
babc2a9b
import
Accession
from
'
model/accession/Accession
'
;
import
Subset
from
'
model/subset/Subset
'
;
import
PDCI
from
'
model/accession/PDCI
'
;
import
RepositoryFile
from
'
model/repository/RepositoryFile
'
;
import
ImageGallery
from
'
model/repository/ImageGallery
'
;
class
AccessionDetails
{
public
details
:
Accession
;
public
datasets
:
any
[];
public
subsets
:
Subset
[];
public
pdci
:
PDCI
;
public
files
:
RepositoryFile
[];
public
imageGallery
:
ImageGallery
;
}
export
default
AccessionDetails
;
\ No newline at end of file
export
default
AccessionDetails
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment