From a6e7f0d224a02765ebe63393dc64b8158d08da1d Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Thu, 22 Oct 2026 13:52:34 -0400 Subject: [PATCH] closes OpenConceptLab/ocl_issues#2945 | show Add to Collection on an open concept to anyone signed in The open concept's Add to Collection button was gated on owning the page's URL owner, so it was missing on other owners' repos and in global search. It now needs only a sign-in, like the bulk button in the results toolbar. Edit, retire, clone and create-similar keep their existing checks. The button label now uses the existing addToCollection.add_to_collection key in ConceptHeader and ConceptCard. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph --- src/components/concepts/ConceptCard.jsx | 4 +++- src/components/concepts/ConceptHeader.jsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/concepts/ConceptCard.jsx b/src/components/concepts/ConceptCard.jsx index 608beeb76..ea5d346ee 100644 --- a/src/components/concepts/ConceptCard.jsx +++ b/src/components/concepts/ConceptCard.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; import Card from '@mui/material/Card'; import Checkbox from '@mui/material/Checkbox'; import Button from '@mui/material/Button' @@ -10,6 +11,7 @@ import ConceptListItem from './ConceptListItem' import AddToCollectionDialog from '../common/AddToCollectionDialog' const ConceptCard = ({ concept, onSelect, isSelected, onCardClick, bgColor, isShown, firstChild }) => { + const { t } = useTranslation() const id = concept.version_url || concept.url || concept.id const isChecked = isSelected(id) const isSelectedToShow = isShown(id) @@ -65,7 +67,7 @@ const ConceptCard = ({ concept, onSelect, isSelected, onCardClick, bgColor, isSh sx={{textTransform: 'none', whiteSpace: 'nowrap', flexShrink: 0}} onClick={event => { event.stopPropagation(); setAddToCollectionOpen(true) }} > - Add to Collection + {t('addToCollection.add_to_collection')} )} diff --git a/src/components/concepts/ConceptHeader.jsx b/src/components/concepts/ConceptHeader.jsx index e37c4f0d2..7f32edd55 100644 --- a/src/components/concepts/ConceptHeader.jsx +++ b/src/components/concepts/ConceptHeader.jsx @@ -128,7 +128,7 @@ const ConceptHeader = ({concept, repo, onClose, repoURL, onEdit, onRetire, onCre !loading &&
- {hasAccess && ( + {isLoggedIn() && ( )} {hasAccess && isSource && (