Issue #919 : Show DocumentPath in Breadcrumbs at Publishing Info, instead of only showing collection's name (#920)

closes https://github.com/outline/outline/issues/919
This commit is contained in:
André Glatzl
2019-04-07 01:45:08 +02:00
committed by Tom Moor
parent bf685c7703
commit e33d447a0d
3 changed files with 29 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import Collection from 'models/Collection';
import Document from 'models/Document';
import Flex from 'shared/components/Flex';
import Time from 'shared/components/Time';
import Breadcrumb from 'shared/components/Breadcrumb';
const Container = styled(Flex)`
color: ${props => props.theme.textTertiary};
@@ -75,7 +76,10 @@ function PublishingInfo({ collection, showPublished, document }: Props) {
{content}
{collection && (
<span>
&nbsp;in <strong>{isDraft ? 'Drafts' : collection.name}</strong>
&nbsp;in&nbsp;
<strong>
{isDraft ? 'Drafts' : <Breadcrumb document={document} onlyText />}
</strong>
</span>
)}
</Container>