From ca7e5012105d8e38b44d6fb3912cbdc367717e48 Mon Sep 17 00:00:00 2001 From: VargaJoe <17780970+VargaJoe@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:16:17 +0100 Subject: [PATCH] Show Content Type in Title and Open CTD Editor on New Tab (#1599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * show type in title * type beside the title * open ctd editor on new tab * fix: styling fix --------- Co-authored-by: Ádám Hassan --- .../view-controls/common/view-title.tsx | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/apps/sensenet/src/components/view-controls/common/view-title.tsx b/apps/sensenet/src/components/view-controls/common/view-title.tsx index e56640835..84cf4f87b 100644 --- a/apps/sensenet/src/components/view-controls/common/view-title.tsx +++ b/apps/sensenet/src/components/view-controls/common/view-title.tsx @@ -32,6 +32,18 @@ const useStyles = makeStyles(() => { actionBar: { display: 'flex', }, + typeinfo: { + fontSize: '12px', + color: 'grey', + marginLeft: '5px', + }, + + viewTitle: { + '& span': { + display: 'inline-block', + verticalAlign: 'middle', + }, + }, }) }) @@ -63,8 +75,9 @@ export const ViewTitle: React.FunctionComponent = (props) => { return (
-
+
{props.title} {props.titleBold} + ({props.content!.Type})
{props.actionName === 'browse' && ( @@ -130,16 +143,15 @@ export const ViewTitle: React.FunctionComponent = (props) => { title={`Open ${contentDisplayName} CTD`} onClick={async () => { const content = await getContentTypeId(props.content!.Type) - history.push( - getPrimaryActionUrl({ - content, - repository, - location: history.location, - uiSettings, - snRoute, - removePath: true, - }), - ) + const url = getPrimaryActionUrl({ + content, + repository, + location: history.location, + uiSettings, + snRoute, + removePath: true, + }) + window.open(url, '_blank') }} className={globalClasses.centered}>