X-Git-Url: http://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fdocbook%2Fui%2FAbstractDbkViewer.java;fp=publishing%2Forg.argeo.publishing.ui%2Fsrc%2Forg%2Fargeo%2Fdocbook%2Fui%2FAbstractDbkViewer.java;h=814cfb3415e129dcdc28164e27ad72f03d7f78ed;hp=b7903581f997a857e16511ecf7666b7c24e6539e;hb=bf08be4b1dd28f8d7639db1badf0bbd449b5e388;hpb=883a4286c7946b2cff653fe9a2b554f54232e01c diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java index b790358..814cfb3 100644 --- a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java @@ -72,6 +72,8 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke private final boolean flat; + private boolean showMainTitle = true; + private Integer maxMediaWidth = null; protected AbstractDbkViewer(Section parent, int style, CmsEditable cmsEditable) { @@ -105,12 +107,15 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke Node node = section.getNode(); TextSection textSection = (TextSection) section; if (node.hasNode(DbkType.title.get())) { - if (section.getHeader() == null) - section.createHeader(); - Node titleNode = node.getNode(DbkType.title.get()); - DocBookSectionTitle title = newSectionTitle(textSection, titleNode); - title.setLayoutData(CmsUiUtils.fillWidth()); - updateContent(title); + boolean showTitle = getMainSection() == section ? showMainTitle : true; + if (showTitle) { + if (section.getHeader() == null) + section.createHeader(); + Node titleNode = node.getNode(DbkType.title.get()); + DocBookSectionTitle title = newSectionTitle(textSection, titleNode); + title.setLayoutData(CmsUiUtils.fillWidth()); + updateContent(title); + } } for (NodeIterator ni = node.getNodes(); ni.hasNext();) { @@ -937,6 +942,10 @@ public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke this.maxMediaWidth = maxMediaWidth; } + public void setShowMainTitle(boolean showMainTitle) { + this.showMainTitle = showMainTitle; + } + // FILE UPLOAD LISTENER private class FUL implements FileUploadListener { public void uploadProgress(FileUploadEvent event) {