<%
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);
%>
<%}%>
<%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);
%>
<%}%>
<%if(node.hasProperty("exo:location")) { %>
<% print uicomponent.getInlineEditingField(node, "exo:location");%>
<%}%>
<% 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()) { %>
<% } %>
<%if(relations.size() > 0) {%>
<%=_ctx.appRes("Article.view.label.link")%> :
<%
for(rel in relations) {
if(rel != null) {
String wsName = rel.getSession().getWorkspace().getName() ;
String actionLink ;
String relPath = rel.getPath() ;
String relName = relPath.substring(relPath.lastIndexOf("/") + 1, relPath.length()) ;
if(!uicomponent.isRssLink()) {
params = [new Parameter("workspaceName", wsName), new Parameter("findDrive","true")];
actionLink = uicomponent.event("ChangeNode", Utils.formatNodeName(relPath), params);
} else {
actionLink = uicomponent.getRssLink() + wsName + relPath ;
}
%>
<% }
}%>
<%}%>
<% 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";
%>
<% }
} %>
<% }%>
<% _ctx.include(uicomponent.getViewTemplate("mix:votable", "view1")); %>
<% _ctx.include(uicomponent.getViewTemplate("exo:comments", "view1")); %>
<%} else {%>
<%=_ctx.appRes("Article.msg.no-view")%>