Skip to content

Commit

Permalink
#1501 (#451) (#452)
Browse files Browse the repository at this point in the history
* Squashed commit of the following:

commit e613216
Author: Boris Kovar <[email protected]>
Date:   Wed Jul 31 13:57:02 2024 +0200

    - implemented #1251

* #1482 added TagName and CentroidRes columns for expanded view of observation dialog

* #1489 show warning toast message if is defined on target load

* #1322 added longcode column

* updated general function for tag comparison

* #1505 adjusted getting of centroid_res

* #1458 allow to tag XCA sites, temp commit

# Conflicts:
#	js/components/preview/molecule/observationsDialog.js

* #1458 adjusted functionality and styling to proper change tag

* #1508 removed TagName column in expanded observation dialog, changed order of columns, adjusted labels and tooltips, show observation dialog in its full height

* #1508 adjusted column order and width calculation

* #1501 added upload links to menu

---------

Co-authored-by: matej <[email protected]>
Co-authored-by: Boris Kovar <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2024
1 parent fc13648 commit df41858
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
28 changes: 26 additions & 2 deletions js/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { AddProjectDetail } from '../projects/addProjectDetail';
import { ServicesStatusWrapper } from '../services';
import { COMPANIES, get_logo } from '../funders/constants';
import { setEditTargetDialogOpen } from '../target/redux/actions';
import { Upload } from '@mui/icons-material';

const useStyles = makeStyles(theme => ({
padding: {
Expand Down Expand Up @@ -272,8 +273,8 @@ export default memo(
targetName !== undefined ? (
<>
{currentProject.authorID === null ||
currentProject.projectID === null ||
currentProject.authorID === userId ? (
currentProject.projectID === null ||
currentProject.authorID === userId ? (
<Button
onClick={() => {
isProjectModalLoading === false
Expand Down Expand Up @@ -574,6 +575,29 @@ export default memo(
</ListItemIcon>
<ListItemText primary="Contributors" />
</ListItem>
{DJANGO_CONTEXT.pk &&
<>
<Divider />
<ListItem button onClick={() => openLink(URLS.lhsUpload)}>
<ListItemIcon>
<Upload />
</ListItemIcon>
<ListItemText primary="LHS upload" />
</ListItem>
<ListItem button onClick={() => openLink(URLS.rhsUpload)}>
<ListItemIcon>
<Upload />
</ListItemIcon>
<ListItemText primary="RHS upload" />
</ListItem>
<ListItem button onClick={() => openLink(URLS.metadataUpload)}>
<ListItemIcon>
<Upload />
</ListItemIcon>
<ListItemText primary="Metadata upload" />
</ListItem>
</>
}
<Divider />
{authListItem}
</Grid>
Expand Down
4 changes: 4 additions & 0 deletions js/components/routes/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export const URLS = {
funders: '/viewer/react/funders/',
target: '/viewer/react/preview/target/',

lhsUpload: '/api/upload_target_experiments/',
rhsUpload: '/viewer/upload_cset/',
metadataUpload: '/api/metadata_upload/',

// Projects feature
projects: '/viewer/react/projects/',
// Direct feature
Expand Down

0 comments on commit df41858

Please sign in to comment.