diff --git a/event-nodetype/PDFService.grs b/event-nodetype/PDFService.grs new file mode 100644 index 0000000..7d95614 --- /dev/null +++ b/event-nodetype/PDFService.grs @@ -0,0 +1,97 @@ +// simple groovy script + +import javax.ws.rs.Path +import javax.ws.rs.GET +import javax.ws.rs.PathParam +import javax.ws.rs.Produces +import javax.ws.rs.core.Context +import javax.ws.rs.core.Response +import javax.ws.rs.core.UriInfo + +import java.net.* +import java.io.* + +import javax.jcr.ItemNotFoundException +import javax.jcr.Node +import javax.jcr.Property +import javax.jcr.PathNotFoundException +import javax.jcr.RepositoryException +import javax.jcr.Session +import javax.jcr.Value +import javax.jcr.ValueFormatException + +import net.sf.jasperreports.engine.JRException +import net.sf.jasperreports.engine.JasperCompileManager +import net.sf.jasperreports.engine.JasperExportManager +import net.sf.jasperreports.engine.JasperFillManager +import net.sf.jasperreports.engine.JasperPrint +import net.sf.jasperreports.engine.JasperReport +import net.sf.jasperreports.engine.design.JasperDesign +import net.sf.jasperreports.engine.xml.JRXmlLoader +import net.sf.jasperreports.engine.JREmptyDataSource + +import org.exoplatform.container.ExoContainerContext +import org.exoplatform.services.security.ConversationState +import org.exoplatform.services.jcr.ext.common.SessionProvider +import org.exoplatform.services.jcr.RepositoryService +import org.exoplatform.services.jcr.core.ManageableRepository + +@Path("/pdf") +public class PDFService { + @GET + @Path("export/event/{nodeId}") + @Produces("application/pdf") + public Response getPdf(@PathParam("nodeId") String nodeId, @Context UriInfo uriInfo) { + + try { + // Load and compile the report template (compile should have been done before, not at runtime) + String baseUri = uriInfo.getBaseUri().toString(); + if(baseUri.endsWith("/private")) { + baseUri = baseUri.substring(0, baseUri.indexOf("/private")); + } + URL urlReport = new URL(baseUri + "/jcr/repository/dev-monit/jasper/event-report.xml"); + InputStream input = urlReport.openStream(); + JasperDesign jasperDesign = JRXmlLoader.load(input); + + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); + + jasperReport.setWhenNoDataType(jasperReport.WHEN_NO_DATA_TYPE_ALL_SECTIONS_NO_DETAIL); + + // Retrieve node + RepositoryService repositoryService = (RepositoryService) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(RepositoryService.class); + ManageableRepository manageableRepository = repositoryService.getRepository("repository"); + SessionProvider sessionProvider = new SessionProvider(ConversationState.getCurrent()); + def session = sessionProvider.getSession("collaboration", manageableRepository); + def node = session.getNodeByUUID(nodeId); + def name = node.getProperty("exo:name").getString(); + def title = node.getProperty("exo:title").getString(); + def location = node.getProperty("exo:location").getString(); + def url = node.getProperty("exo:url").getString(); + def startDate = node.getProperty("exo:startEvent").getDate().getTime(); + def endDate = node.getProperty("exo:endEvent").getDate().getTime(); + def summary = node.getProperty("exo:summary").getString(); + def content = node.getProperty("exo:text").getString(); + + // Data sent to the report engine + Map parameters = new HashMap(); + parameters.put("title", title); + parameters.put("location", location); + parameters.put("url", url); + parameters.put("startDate", startDate.format('dd/MM/yyyy')); + parameters.put("endDate", endDate.format('dd/MM/yyyy')); + parameters.put("summary", summary); + parameters.put("content", content); + + // Feed the report engine + JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource()); + + // Get the PDF version + byte[] pdfContent = JasperExportManager.exportReportToPdf(jasperPrint); + + return Response.ok().entity(pdfContent).header("Content-Disposition","attachment; filename="+name+".pdf").build(); + + } catch(Exception e) { + e.printStackTrace(); + } + } +} diff --git a/event-nodetype/Stylesheet-lt.css b/event-nodetype/Stylesheet-lt.css new file mode 100644 index 0000000..a69c3f9 --- /dev/null +++ b/event-nodetype/Stylesheet-lt.css @@ -0,0 +1,257 @@ +/** + LTR skin for exo:article template +*/ +.UIArticle { + background: white; + padding: 8px; +} + +.TitleLabel { + background: white; + padding: 0px 0px 5px 10px; + font-size: 16px; + color: #060606; + font-weight: bold; +} + +.LocationLabel { + padding: 0px 0px 5px 10px; + font-size: 12px; + color: #080808; + font-weight: bold; +} + +.MapsFrame { + padding: 0px 0px 5px 10px; +} + +.LabelContent { + padding-bottom: 5px; +} + +.StartDateLabel { + float: right; +} + +.EndDateLabel { + float: right; +} + +.ArrowDate { + float: right; + background: url('/eXoDMSResources/skin/images/event/RightArrow.gif') no-repeat; + width:16px; + height:16px; + margin: 10px; +} + + +/* Outer div */ +div.datetime { +border:1px solid #000; +width:40px; +} + +div.datetime p { +margin:0 auto; +padding:0; +text-align:center; +font-size:x-small; +} + +div.datetime .top { +color:#fefefe; +background-color:#2f4765; +padding: 2px 0px; +} + +div.datetime .top p { +font:bold x-small/100% Georgia, "New Century Schoolbook", "Book Antiqua", "Times New Roman", serif; +letter-spacing:0.12em; +text-transform:uppercase; +} + +/* day of the month (NUMBER) */ +div.datetime p.day { +font:bold 1.5em/98% Georgia, "New Century Schoolbook", "Book Antiqua", "Times New Roman", serif; +letter-spacing:0.13em; +padding-left: 2px; +} + +/* year */ +div.datetime p.yr { +font:x-small/110% Verdana,Geneva,Arial,Helvetica,sans-serif; +letter-spacing:0.05em; +padding-bottom: 2px; +} + + +.UIArticle .ArticleFrame { + background: white; + padding: 0px 10px; +} + +.UIArticle .ArticleFrame .TopLeftArticleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat left -16px; + padding-left: 9px; +} + +.UIArticle .ArticleFrame .TopRightArtictleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat right -16px; + padding-right: 2px; +} + +.UIArticle .ArticleFrame .TopCenterArticleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') repeat-x right -32px; + height: 16px; +} + +.UIArticle .ArticleFrame .ArticleFrameContainer { + border: solid 1px #e0e0e0; + border-top: none; +} + +.UIArticle .TopCenterArticleFrame .ArticleField { + padding: 0px 0px 0px 5px; + width: 120px; + background: #fff; + height: 16px; + float: left; +} + +.UIArticle .MidlleLeftArticleFrame { + background: white; +} + +.UIArticle .FieldLabel { + float: left; + font-weight: bold; +} + +.UIArticle .FieldIcon { + float: left; + margin-right: 5px; + width: 16px; + height: 16px; +} + +.UIArticle .SummaryIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat left -48px; +} + +.UIArticle .AttachmentsIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat left -64px; +} + +.UIArticle .RatingIcon { + background: url('/eXoDMSResources/skin/images/article/Artitcle.gif') no-repeat left -64px; +} + +.UIArticle .AttachmentsContainer .AttachmentsContentIcon { + background: url('/eXoDMSResources/skin/images/article/AttachmentsIcon.gif') no-repeat left top; + margin: 0px 5px 0px 3px; + padding-left: 18px; + height: 15px; + float: left; +} + +.UIArticle .AttachmentsContainer .RemoveAttachments { + background: url('/eXoDMSResources/skin/images/article/DustBin.gif') no-repeat left top; + margin: 0px 5px 0px 3px; + padding-left: 18px; + height: 16px; + cursor: pointer; + float: left; +} + +.UIArticle .ContentIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat left -96px; +} + +.UIArticle .LinksIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat left -80px; +} + +.UIArticle .FieldContent { + padding: 1px 5px 5px 0px; + width: 90%; +} + +.UIArticle .FieldContent .FieldContainerContent { + font: normal 11px Verdana; + background: white; + margin: 5px 2px 3px 5px; +} + +.UIArticle .FieldContent .LabelContent{ + padding: 5px 0px 0px 5px; + overflow: auto; + text-align: left; +} + +.UIArticle .LabelContent p a { + color: #058EE6; + text-decoration: underline; +} + +.UIArticle .DocumentRating { + margin-left: 150px; + width: 300px; +} + +.UIArticle .ContainerLinks { + border-top: dotted 1px #dcdcdc; + margin: 12px 10px 0px 10px; + padding: 5px; +} + +.UIArticle .ContentLinks { + float: left; + width: 75px; +} + +.UIArticle .WorkContentLinks { + float: left; + padding-left: 5px; +} + +.UIArticle .Links div { + padding-bottom: 3px; +} + +.UIArticle .Links a { + text-decoration: none; + color: #058ee6; +} + +.UIArticle .Links a:hover { + text-decoration: underline; + color: orange; +} + +.UIArticle .ArticleTCDecorator .Language { + text-align: left; + color: #7d7d7d; + padding: 12px 0px 0px 10px; + font-weight: bold; +} + +.UIArticle .Language a.LanguageTitle { + text-align: left; + color: #058ee6; + font-weight: normal; +} + +.UIArticle .Language a:hover.LanguageTitle { + text-align: left; + color: #ffa21d; + font-weight: normal; +} + +.UIArticle .Language a:hover.DefaultLanguageTitle { + text-align: left; + color: #ffa21d; + font-weight: bold; +} + + diff --git a/event-nodetype/Stylesheet-rt.css b/event-nodetype/Stylesheet-rt.css new file mode 100644 index 0000000..d12e325 --- /dev/null +++ b/event-nodetype/Stylesheet-rt.css @@ -0,0 +1,231 @@ +/** + RTL skin for exo:event template +*/ +.UIArticle { + background: white; + padding: 8px; + overflow: hidden; +} + +.UIArticle .ArticleTLDecorator { + background: url('/eXoDMSResources/skin/images/article/BackgroundArticle-rt.gif') no-repeat right top; + padding-right: 51px; +} + +.UIArticle .ArticleTRDecorator { + background: url('/eXoDMSResources/skin/images/article/BackgroundArticle-rt.gif') no-repeat left top; + padding-left:154px; +} + +.UIArticle .ArticleTCDecorator { + background: url('/eXoDMSResources/skin/images/article/BackgroundArticle.gif') repeat-x right -100px; + height: 100px; +} + +.UIArticle .ArticleTCDecorator .TitleLabel { + padding-top: 38px; + font: normal bold 16px Arial; + color: #0467e2; + text-align: right; + overflow: hidden; +} + +.UIArticle .ArticleMLDecorator { + background: url('/eXoDMSResources/skin/images/article/MiddleLeftArticle3x1-rt.gif') repeat-y right; + padding-right: 3px; +} + +.UIArticle .ArticleMCDecorator { + background: #fcfcfc; +} + +.UIArticle .ArticleMRDecorator { + background: url('/eXoDMSResources/skin/images/article/MiddleRightArticle10x1-rt.gif') repeat-y left; + padding: 0px 3px 0px 10px; +} + +.UIArticle .ArticleBLDecorator { + background: url('/eXoDMSResources/skin/images/article/ImageArticle-rt.gif') no-repeat right top; + padding-right: 3px; +} + +.UIArticle .ArticleBCDecorator { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') repeat-x right -8px; + height: 8px; + line-height: 8px; +} + +.UIArticle .ArticleBRDecorator { + background: url('/eXoDMSResources/skin/images/article/ImageArticle-rt.gif') no-repeat left top; + padding-left: 10px ; +} + +.UIArticle .ArticleFrame { + background: white; + padding: 0px 10px; +} + +.UIArticle .ArticleFrame .TopLeftArticleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle-rt.gif') no-repeat right -16px; + padding-right: 9px; +} + +.UIArticle .ArticleFrame .TopRightArtictleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle-rt.gif') no-repeat left -16px; + padding-left: 2px; +} + +.UIArticle .ArticleFrame .TopCenterArticleFrame { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') repeat-x left -32px; + height: 16px; +} + +.UIArticle .ArticleFrame .ArticleFrameContainer { + border: solid 1px #e0e0e0; + border-top: none; +} + +.UIArticle .TopCenterArticleFrame .ArticleField { + padding: 0px 5px 0px 0px; + width: 120px; + background: #fff; + height: 16px; + float: right; +} + +.UIArticle .MidlleLeftArticleFrame { + background: white; +} + +.UIArticle .FieldLabel { + float: right; + font-weight: bold; +} + +.UIArticle .FieldIcon { + float: right; + margin-left: 5px; + width: 16px; + height: 16px; +} + +.UIArticle .SummaryIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat right -48px; +} + +.UIArticle .AttachmentsIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat right -64px; +} + +.UIArticle .RatingIcon { + background: url('/eXoDMSResources/skin/images/article/Artitcle.gif') no-repeat right -64px; +} + +.UIArticle .AttachmentsContainer .AttachmentsContentIcon { + background: url('/eXoDMSResources/skin/images/article/AttachmentsIcon.gif') no-repeat right top; + margin: 0px 3px 0px 5px; + padding-right: 18px; + height: 15px; + float: right; +} + +.UIArticle .AttachmentsContainer .RemoveAttachments { + background: url('/eXoDMSResources/skin/images/article/DustBin.gif') no-repeat right top; + margin: 0px 3px 0px 5px; + padding-right: 18px; + height: 16px; + cursor: pointer; + float: right; +} + +.UIArticle .ContentIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat right -96px; +} + +.UIArticle .LinksIcon { + background: url('/eXoDMSResources/skin/images/article/ImageArticle.gif') no-repeat right -80px; +} + +.UIArticle .FieldContent { + padding: 1px 0px 5px 7px; + width: 90%; +} + +.UIArticle .FieldContent .FieldContainerContent { + font: normal 11px Verdana; + background: white; + margin: 5px 5px 3px 2px; +} + +.UIArticle .FieldContent .LabelContent{ + padding: 5px 5px 0px 0px; + overflow: auto; + text-align: right; +} + +.UIArticle .LabelContent p a { + color: #058EE6; + text-decoration: underline; +} + +.UIArticle .DocumentRating { + margin-right: 150px; + width: 300px; +} + +.UIArticle .ContainerLinks { + border-top: dotted 1px #dcdcdc; + margin: 12px 10px 12px 3px; + padding: 5px; +} + +.UIArticle .ContentLinks { + float: right; + width: 75px; +} + +.UIArticle .WorkContentLinks { + float: right; + padding-right: 5px; +} + +.UIArticle .Links div { + padding-bottom: 3px; +} + +.UIArticle .Links a { + text-decoration: none; + color: #058ee6; +} + +.UIArticle .Links a:hover { + text-decoration: underline; + color: orange; +} + +.UIArticle .ArticleTCDecorator .Language { + text-align: right; + color: #7d7d7d; + padding: 12px 10px 0px 0px; + font-weight: bold; +} + +.UIArticle .Language a.LanguageTitle { + text-align: right; + color: #058ee6; + font-weight: normal; +} + +.UIArticle .Language a:hover.LanguageTitle { + text-align: right; + color: #ffa21d; + font-weight: normal; +} + +.UIArticle .Language a:hover.DefaultLanguageTitle { + text-align: right; + color: #ffa21d; + font-weight: bold; +} + + diff --git a/event-nodetype/dialog1.gtmpl b/event-nodetype/dialog1.gtmpl new file mode 100644 index 0000000..319ff64 --- /dev/null +++ b/event-nodetype/dialog1.gtmpl @@ -0,0 +1,132 @@ +
+ <% + uiform.begin() + %> + + <%/* start render action*/%> + <% if (uiform.isShowActionsOnTop()) { + uiform.processRenderAction() + } + %> + <%/* end render action*/%> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <% + String[] fieldTitle = ["jcrPath=/node/exo:title", "options=noSanitization", "validate=empty"] ; + uicomponent.addTextField("title", fieldTitle) ; + %> +
+ <% + String[] fieldName = ["jcrPath=/node", "options=noSanitization", "mixintype=mix:votable,mix:commentable,mix:i18n,mix:versionable", "editable=if-null", "validate=empty,name"] ; + uicomponent.addTextField("name", fieldName) ; + %> + +
+ <% + String lang = org.exoplatform.portal.webui.util.Util.getPortalRequestContext().getLocale().toString(); + String[] fieldLang = ["jcrPath=/node/exo:language", "script=ecm-explorer/widget/FillSelectBoxWithLanguage.groovy", lang] ; + uicomponent.addSelectBoxField("content-lang", fieldLang) ; + %> +
+ <% + String[] fieldLocation = ["jcrPath=/node/exo:location", "validate=empty"] ; + uicomponent.addTextField("location", fieldLocation) ; + %> +
+ <% + String[] fieldMaps = ["jcrPath=/node/exo:maps", "defaultValues=false"]; + uicomponent.addCheckBoxField("withMap", fieldMaps); + %> +
+ <% + String[] fieldStartEvent = ["jcrPath=/node/exo:startEvent", "validate=datetime", "visible=true"] ; + uicomponent.addCalendarField("startEvent", fieldStartEvent) ; + %> +
+ <% + String[] fieldEndEvent = ["jcrPath=/node/exo:endEvent", "validate=datetime", "visible=true"] ; + uicomponent.addCalendarField("endEvent", fieldEndEvent) ; + %> +
+ <% + String[] fieldUrl = ["jcrPath=/node/exo:url"] ; + uicomponent.addTextField("url", fieldUrl) ; + %> +
+
+ <% + String[] fieldSummary = ["jcrPath=/node/exo:summary", "options=toolbar:SuperBasicWCM", ""] ; + uicomponent.addRichtextField("summary", fieldSummary) ; + %> +
+
+
+ <% + String[] fieldContent = ["jcrPath=/node/exo:text", "options=toolbar:BasicWCM", ""] ; + uicomponent.addRichtextField("content", fieldContent) ; + %> +
+
+
+ <% if (!uiform.isShowActionsOnTop()) { + uiform.processRenderAction() + } + %> + <%uiform.end()%> +
+ diff --git a/event-nodetype/event-nodetype.xml b/event-nodetype/event-nodetype.xml new file mode 100644 index 0000000..3e4aeb2 --- /dev/null +++ b/event-nodetype/event-nodetype.xml @@ -0,0 +1,51 @@ + + + +nt:base +mix:referenceable +exo:rss-enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +nt:file + + + + + diff --git a/event-nodetype/event-report.xml b/event-nodetype/event-report.xml new file mode 100644 index 0000000..014195d --- /dev/null +++ b/event-nodetype/event-report.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + <band height="69" splitType="Stretch"> + <textField> + <reportElement x="0" y="0" width="188" height="39"/> + <textElement> + <font size="26"/> + </textElement> + <textFieldExpression class="java.lang.String"><![CDATA[$P{title}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="53" y="39" width="418" height="15"/> + <textElement/> + <textFieldExpression class="java.lang.String"><![CDATA[$P{location}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="513" y="28" width="59" height="20" backcolor="#FFFFFF"/> + <textElement/> + <textFieldExpression class="java.lang.String"><![CDATA[$P{endDate}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="513" y="8" width="59" height="20" backcolor="#FFFFFF"/> + <textElement/> + <textFieldExpression class="java.lang.String"><![CDATA[$P{startDate}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="39" width="53" height="15"/> + <textElement> + <font isUnderline="false"/> + </textElement> + <text><![CDATA[Location :]]></text> + </staticText> + <line> + <reportElement x="0" y="59" width="572" height="1"/> + </line> + <staticText> + <reportElement x="476" y="8" width="31" height="20"/> + <textElement textAlignment="Right"/> + <text><![CDATA[From]]></text> + </staticText> + <staticText> + <reportElement x="476" y="28" width="31" height="20"/> + <textElement textAlignment="Right"/> + <text><![CDATA[To]]></text> + </staticText> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/event-nodetype/view1.gtmpl b/event-nodetype/view1.gtmpl new file mode 100644 index 0000000..bb53650 --- /dev/null +++ b/event-nodetype/view1.gtmpl @@ -0,0 +1,240 @@ +<% + import java.text.SimpleDateFormat ; + import org.exoplatform.ecm.webui.utils.PermissionUtil; + import org.exoplatform.ecm.webui.utils.Utils ; + import org.exoplatform.web.application.Parameter ; + import org.exoplatform.webui.core.UIPopupWindow; + import org.exoplatform.services.jcr.RepositoryService; + + UIPopupWindow uiPopupWindow = uicomponent.getAncestorOfType(UIPopupWindow.class); + def resizeBlock = "class=\"UIResizableBlock\""; + if(uiPopupWindow != null) resizeBlock = ""; + SimpleDateFormat dateFormat = new SimpleDateFormat() ; + Parameter[] params; + + RepositoryService rService = uicomponent.getApplicationComponent(RepositoryService.class); + String repository = rService.getCurrentRepository().getConfiguration().getName(); +%> + +
+ <% + def node = uicomponent.getNode() ; + def nodeId = node.getUUID(); + def relations = uicomponent.getRelations() ; + def attachments = uicomponent.getAttachments() ; + if(node.hasProperty("exo:title")) { + %> +
+
+ <%if(node.hasProperty("exo:endEvent")) { + Calendar cal = node.getProperty("exo:endEvent").getDate(); + def day = cal.get(Calendar.DAY_OF_MONTH); + dateFormat.applyPattern("MMM") ; + def month = dateFormat.format(cal.getTime()); + def year = cal.get(Calendar.YEAR); + %> +
+
+

<%=month%>

+

<%=day%>

+

<%=year%>

+
+
+
+ <%}%> + + <%if(node.hasProperty("exo:startEvent")) { + Calendar cal = node.getProperty("exo:startEvent").getDate(); + def day = cal.get(Calendar.DAY_OF_MONTH); + dateFormat.applyPattern("MMM") ; + def month = dateFormat.format(cal.getTime()); + def year = cal.get(Calendar.YEAR); + %> +
+
+

<%=month%>

+

<%=day%>

+

<%=year%>

+
+
+ <%}%> + + <%if(node.hasProperty("exo:location")) { %> +
<% print uicomponent.getInlineEditingField(node, "exo:location");%>
+ <%}%> + +
+ <%if(node.hasProperty("exo:url")) { + def strURL = node.getProperty("exo:url").getString(); + %> + + <%}%> + <%=Utils.getTitle(node)%> + <%if(node.hasProperty("exo:url")) { %> + + <%}%> +
+ +
+ +
+ <% if(node.hasProperty("exo:summary")) { %> +
+ <% + print uicomponent.getInlineEditingField(node, "exo:summary", "", "WYSIWYG", "Summary", "Content", true, "toolbar=SuperBasicWCM"); + %> +
+ <% } %> + <% if(node.hasProperty("exo:text")) { %> +
+ <% + print uicomponent.getInlineEditingField(node, "exo:text", "", "WYSIWYG", "Text", "Content", true); + %> +
+ <% } %> +
+ + <% if(node.hasProperty("exo:maps") && node.getProperty("exo:maps").getBoolean()) { %> +
+ <% System.out.println("http://maps.google.com/maps?q=" + node.getProperty("exo:location").getString() + "&output=embed"); %> +
+ " style="color:#0000FF;text-align:left" target="_maps">View Larger Map + +
+ <% } %> + + + <%if(relations.size() > 0) {%> +
+ +
+
+
+
+
+
<%=_ctx.appRes("Article.view.label.link")%> :
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+ +
+ <%}%> + + + + <% if(attachments.size() > 0) { %> +
+
+
+
+
+
+
+
<%=_ctx.appRes("Article.view.label.attachment")%> :
+ +
+
+
+
+
+
+
+
+
+ <% + def removeattachcomponent = uicomponent.getRemoveAttach(); + String wsName = ""; + for (att in attachments) { + if(att != null) { + wsName = att.getSession().getWorkspace().getName(); + params = [new Parameter("workspaceName", wsName), new Parameter("findDrive","true")]; + def viewAttachmentLink = uicomponent.getAttachmentURL(att, params); + def linkActionName = (viewAttachmentLink.startsWith("http")) ? "href" : "onclick"; + %> + +
+ + <% if (PermissionUtil.canRemoveNode(att)) { + params = [new Parameter("workspaceName", wsName), new Parameter("repository", repository)]; + if (removeattachcomponent != null) { + %> + " style="cursor: pointer;" title="<%=_ctx.appRes(uicomponent.getId() + ".tooltip.remove-attachment")%>"> +
+
+ + <% } + }%> + +
+ <% } + } %> +
+
+
+
+
+
+
+ + <% }%> + + <% _ctx.include(uicomponent.getViewTemplate("mix:votable", "view1")); %> + +
+ + <% _ctx.include(uicomponent.getViewTemplate("exo:comments", "view1")); %> + + <%} else {%> +
+
<%=_ctx.appRes("Article.msg.no-view")%>
+
+ <%}%> +
+ Get as PDF +
+
+ + diff --git a/flipfeed/FlipFeed.gtmpl b/flipfeed/FlipFeed.gtmpl index 16f4dd6..3f59209 100644 --- a/flipfeed/FlipFeed.gtmpl +++ b/flipfeed/FlipFeed.gtmpl @@ -81,6 +81,7 @@ http://localhost:8080/portal/g/:platform:web-contributors/siteExplorer?path=/DMS .FlipFeed .Content .Title { font-size: 20px; font-weight: bold; + color: black; } .FlipFeed .Content .SharedBy { @@ -217,7 +218,7 @@ http://localhost:8080/portal/g/:platform:web-contributors/siteExplorer?path=/DMS summaryLength = 240; } else if (cols== 3) { titleLength = 21; - summaryLength = 430; + summaryLength = 320; if (type==1) { w = 295; h = 120;