Files can be added to templates and managed in a dedicated "Files" view.

Mosaico integration in progress. The files seem to be working for Mosaico.
This commit is contained in:
Tomas Bures 2018-03-24 23:55:50 +01:00
parent c85f2d4440
commit b5cdf57f72
23 changed files with 506 additions and 164 deletions

View file

@ -9,6 +9,7 @@ import { Section } from '../lib/page';
import TemplatesCUD from './CUD';
import TemplatesList from './List';
import Share from '../shares/Share';
import Files from "../lib/files";
function getMenus(t) {
@ -31,6 +32,12 @@ function getMenus(t) {
visible: resolved => resolved.template.permissions.includes('edit'),
panelRender: props => <TemplatesCUD action={props.match.params.action} entity={props.resolved.template} />
},
files: {
title: t('Files'),
link: params => `/templates/${params.templateId}/files`,
visible: resolved => resolved.template.permissions.includes('edit'),
panelRender: props => <Files title={t('Files')} entity={props.resolved.template} entityTypeId="template" />
},
share: {
title: t('Share'),
link: params => `/templates/${params.templateId}/share`,