Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #119 from hifis-net/fix-is-tenant-display
Browse files Browse the repository at this point in the history
feat: display Helmholtz icon for HGF member organisations
  • Loading branch information
cmeessen authored Mar 9, 2023
2 parents c6dd45d + 8aa78f9 commit 6d9e280
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 9 deletions.
13 changes: 13 additions & 0 deletions frontend/components/icons/HelmholtzIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-FileCopyrightText: 2023 Christian Meeßen (GFZ) <[email protected]>
// SPDX-FileCopyrightText: 2023 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences
//
// SPDX-License-Identifier: EUPL-1.2

import {DefaultComponentProps, OverridableTypeMap} from '@mui/material/OverridableComponent'
import SvgIcon from '@mui/material/SvgIcon'
import HelmholtzIconSVG from './helmholtz_icon.svg'

export const HelmholtzIcon = (props: DefaultComponentProps<OverridableTypeMap>) => (
<SvgIcon {...props} component={HelmholtzIconSVG} inheritViewBox />
)

43 changes: 43 additions & 0 deletions frontend/components/icons/helmholtz_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions frontend/components/organisation/OrganisationCard.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all)
// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) (dv4all)
// SPDX-FileCopyrightText: 2022 dv4all
// SPDX-FileCopyrightText: 2023 Christian Meeßen (GFZ) <[email protected]>
// SPDX-FileCopyrightText: 2023 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences
//
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: EUPL-1.2

import Link from 'next/link'
import {OrganisationForOverview} from '../../types/Organisation'
import {getImageUrl} from '~/utils/editImage'
import StatCounter from '../layout/StatCounter'
import VerifiedIcon from '@mui/icons-material/Verified'
// import VerifiedIcon from '@mui/icons-material/Verified'
import {HelmholtzIcon} from '../icons/HelmholtzIcon'
import LogoAvatar from '../layout/LogoAvatar'
import CardTitle from '../layout/CardTitle'

Expand Down Expand Up @@ -42,18 +46,19 @@ export default function OrganisationCard(organisation: OrganisationForOverview)
{organisation.name}
</CardTitle>
{
organisation.is_tenant && <span title="Officially registered organisation">
<VerifiedIcon
// Fix for HIFIS >> START
organisation.is_tenant && <span title="Member of the Helmholtz Association">
<HelmholtzIcon
sx={{
position: 'absolute',
right: '0.5rem',
top: '0.5rem',
width: '4rem',
height: '4rem',
opacity: 0.4,
color: 'primary.main'
right: '1rem',
top: '1rem',
width: '3rem',
height: '3rem',
color: 'secondary.main'
}}
/></span>
// Fix for HIFIS << END
}
</div>
<div className="flex-1 grid gap-8 lg:grid-cols-[1fr,1fr] p-8 overflow-hidden">
Expand Down

0 comments on commit 6d9e280

Please sign in to comment.