Skip to content

Commit

Permalink
Merge pull request #360 from smaht-dac/cfm-breadcrumbs_fix
Browse files Browse the repository at this point in the history
fix: add resources to hard-coded disabled breadcrumbs
  • Loading branch information
crfmc authored Feb 27, 2025
2 parents 4426fbe + 770b357 commit ec57b99
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ smaht-portal
Change Log
----------

0.139.0
=======
`PR 360: fix: add resources to hard-coded disabled breadcrumbs <https://github.com/smaht-dac/smaht-portal/pull/360>`_

* Disable breadcrumbs for resources pages


0.138.0
=======
`PR 351: FileSearchView for type=File search <https://github.com/smaht-dac/smaht-portal/pull/351>`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "encoded"
version = "0.138.0"
version = "0.139.0"
description = "SMaHT Data Analysis Portal"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
8 changes: 6 additions & 2 deletions src/encoded/static/components/PageTitleSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export class StaticPageBreadcrumbs extends React.Component {
var inner;

// Hard-coded link groups to disable
const breadcrumbsToDisable = ['docs', 'data', 'about'];
const breadcrumbsToDisable = ['docs', 'data', 'about', 'resources'];
const shouldDisable = ancestor.identifier
.split('/')
.some((ancestor) => breadcrumbsToDisable.includes(ancestor));
Expand All @@ -423,7 +423,11 @@ export class StaticPageBreadcrumbs extends React.Component {
} else if (shouldDisable) {
inner = <span>{ancestor.display_title}</span>;
} else {
inner = <a href={ancestor['@id']} className="link-underline-hover">{ancestor.display_title}</a>;
inner = (
<a href={ancestor['@id']} className="link-underline-hover">
{ancestor.display_title}
</a>
);
}
return (
<div
Expand Down

0 comments on commit ec57b99

Please sign in to comment.