<% 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