if(eventId != null && !eventId.equals("") && useApprovalFlow.equals("true"))
{
try
{
EventVO event = EventController.getEventVOWithId(new Integer(eventId));
logger.info("event:" + event.getEntityClass() + ":" + event.getEntityId());
if(event.getTypeId() != 2)
{
if(event.getEntityClass().contains("SiteNodeVersion"))
{
SiteNodeVersionVO snvVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(event.getEntityId());
if(snvVO.getSiteNodeId().toString().equals(approveEntityId) || showEvent)
{
this.getResponse().setContentType("text/plain");
this.getResponse().setCharacterEncoding("UTF-8");
this.getResponse().getWriter().print("" + getLocalizedString(getLocale(), "deliver.editOnSight.pendingPageApproval.title") + " <a href='#' onclick='$(\"#comment\").toggle();' style='background-image: url(css/images/v3/info.png); width: 16px; height:16px; display: inline-block;'> </a><div id='comment' style='display: none; position: fixed; padding: 6px; bottom: 42px; margin-left: -55px; width: 250px; height: 70px; color: black; background-color: white; box-shadow: rgba(0, 0, 0, 0.2) 0px -3px 3px;'><b>" + getLocalizedString(getLocale(), "tool.contenttool.versionComment") + ":</b> " + event.getDescription() + "<br/><b>" + getLocalizedString(getLocale(), "tool.contenttool.versionModifier") + ":</b> " + event.getCreator() + "</div><!-- approve=true eventId=" + event.getId() + " -->");
return NONE;
}
}
else if(event.getEntityClass().contains("ContentVersion"))
{
ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getContentVersionVOWithId(event.getEntityId());
logger.info("cvVO:" + cvVO);
if(cvVO.getContentId().toString().equals(approveEntityId) || showEvent)
{
this.getResponse().setContentType("text/plain");
this.getResponse().setCharacterEncoding("UTF-8");
this.getResponse().getWriter().print("" + getLocalizedString(getLocale(), "deliver.editOnSight.pendingContentApproval.title") + " <a href='#' onclick='$(\"#comment\").toggle();' style='background-image: url(css/images/v3/info.png); width: 16px; height:16px; display: inline-block;'> </a><div id='comment' style='display: none; position: fixed; padding: 6px; bottom: 42px; margin-left: -55px; width: 250px; height: 70px; color: black; background-color: white; box-shadow: rgba(0, 0, 0, 0.2) 0px -3px 3px;'><b>" + getLocalizedString(getLocale(), "tool.contenttool.versionComment") + ":</b> " + event.getDescription() + "<br/><b>" + getLocalizedString(getLocale(), "tool.contenttool.versionModifier") + ":</b> " + event.getCreator() + "</div><!-- approve=true eventId=" + event.getId() + " -->");
return NONE;
}
}
}
}