mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #12929 from overleaf/msm-fix-templates-sp
[web] Fix template rendering in Server Pro GitOrigin-RevId: 01dad18d61eb5a0e524cc80ddfcb55d0140a14cb
This commit is contained in:
parent
c2dce961b9
commit
385e91652a
2 changed files with 14 additions and 5 deletions
|
@ -1274,6 +1274,12 @@ const ProjectController = {
|
|||
}
|
||||
}
|
||||
|
||||
const isAdminOrTemplateOwner =
|
||||
hasAdminAccess(user) || Settings.templates?.user_id === userId
|
||||
const showTemplatesServerPro =
|
||||
Features.hasFeature('templates-server-pro') &&
|
||||
isAdminOrTemplateOwner
|
||||
|
||||
const debugPdfDetach = shouldDisplayFeature('debug_pdf_detach')
|
||||
|
||||
const detachRole = req.params.detachRole
|
||||
|
@ -1390,9 +1396,7 @@ const ProjectController = {
|
|||
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl,
|
||||
wsUrl,
|
||||
showSupport: Features.hasFeature('support'),
|
||||
showTemplatesServerPro: Features.hasFeature(
|
||||
'templates-server-pro'
|
||||
),
|
||||
showTemplatesServerPro,
|
||||
pdfjsVariant: pdfjsAssignment.variant,
|
||||
debugPdfDetach,
|
||||
isParticipatingInVisualEditorNamingTest,
|
||||
|
|
|
@ -221,8 +221,13 @@ function NewProjectButton({
|
|||
))}
|
||||
</>
|
||||
) : null}
|
||||
|
||||
{templateLinks && templateLinks.length > 0 && (
|
||||
<>
|
||||
<MenuItem divider />
|
||||
<MenuItem header>{t('templates')}</MenuItem>
|
||||
</>
|
||||
)}
|
||||
{templateLinks?.map((templateLink, index) => (
|
||||
<MenuItem
|
||||
key={`new-project-button-template-${index}`}
|
||||
|
|
Loading…
Reference in a new issue