String label = Messages.get().container( Messages.GUI_COMPARE_VIEW_VERSION_1, CmsHistoryListUtil.getDisplayVersion(version, getLocale())).key(getLocale()); String iconPath = null; try { result.append("<span class='link' onClick=\""); result.append("window.open('"); result.append(getJsp().link(CmsHistoryListUtil.getHistoryLink(getCms(), structureId, version))); result.append("','version','scrollbars=yes', 'resizable=yes', 'width=800', 'height=600')\">"); result.append("<img style='width: 16px; height: 16px;' src='");
/** * Returns the link to an historical file.<p> * * @param cms the cms context * @param structureId the structure id of the file * @param version the version number of the file * * @return the link to an historical file */ public static String getHistoryLink(CmsObject cms, CmsUUID structureId, String version) { String resourcePath; CmsResource resource; try { resource = cms.readResource(structureId, CmsResourceFilter.ALL); resourcePath = resource.getRootPath(); } catch (CmsException e) { throw new CmsRuntimeException(e.getMessageContainer(), e); } StringBuffer link = new StringBuffer(); link.append(CmsHistoryResourceHandler.HISTORY_HANDLER); link.append(resourcePath); link.append('?'); link.append(CmsHistoryResourceHandler.PARAM_VERSION); link.append('='); link.append(CmsHistoryListUtil.getVersion("" + version)); return link.toString(); }
OpenCms.getLinkManager().substituteLink( cms, CmsHistoryListUtil.getHistoryLink( cms, new CmsUUID(getItem().get(LIST_COLUMN_STRUCTURE_ID).toString()),
/** * @see org.opencms.workplace.list.I_CmsListFormatter#format(java.lang.Object, java.util.Locale) */ public String format(Object data, Locale locale) { if ((data == null) || !(data instanceof CmsVersionWrapper)) { return ""; } CmsVersionWrapper version = (CmsVersionWrapper)data; return CmsHistoryListUtil.getDisplayVersion(version.toString(), locale); }
public void buttonClick(ClickEvent event) { String v1Param = version.getVersion().getVersionNumber() != null ? "" + version.getVersion().getVersionNumber() : "" + CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION; String link = CmsHistoryListUtil.getHistoryLink(cms, version.getStructureId(), v1Param); link = OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, link); A_CmsUI.get().openPageOrWarn(link, "_blank"); }
Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion1(), getLocale()))); getList().getMetadata().getColumnDefinition(LIST_COLUMN_VERSION_2).setName(Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion2(), getLocale()))); return ret;
String link1 = CmsHistoryListUtil.getHistoryLink(getCms(), new CmsUUID(m_paramId1), m_paramVersion1); String link2 = CmsHistoryListUtil.getHistoryLink(getCms(), new CmsUUID(m_paramId2), m_paramVersion2); JspWriter out = getJsp().getJspContext().getOut(); out.println(dialogBlockStart(key(Messages.GUI_COMPARE_CONTENT_0))); key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion1, getLocale())})); out.println("</th><th>"); out.println( key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion2, getLocale())})); out.println("</th></tr>"); out.println("<tr><td> </td><td> </td></tr>"); key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion1, getLocale())})); out.print("'/></td>\n"); out.println("\t\t<td width='50%'><img src='"); key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion2, getLocale())})); out.print("'/></td>\n"); out.println("\t</tr>");
imageLink = OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsHistoryListUtil.getHistoryLink(cms, resource.getStructureId(), "" + version)); } else { imageLink = OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath()); link = OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsHistoryListUtil.getHistoryLink(cms, resource.getStructureId(), "" + version)); } else { link = OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, resource.getRootPath());
Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion1(), getLocale()))); getList().getMetadata().getColumnDefinition(LIST_COLUMN_VERSION_2).setName(Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion2(), getLocale())));
CmsHistoryListUtil.getHistoryLink(cms, v1.getStructureId(), v1Param)); String link2 = OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsHistoryListUtil.getHistoryLink(cms, v2.getStructureId(), v2Param)); int scaleWidth = 400; int scaleHeight = (2 * scaleWidth) / 3;
Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion1(), getLocale()))); getList().getMetadata().getColumnDefinition(LIST_COLUMN_VERSION_2).setName(Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion2(), getLocale()))); return result;
key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion1, getLocale())})); out.println("</th><th>"); out.println( key( Messages.GUI_COMPARE_VERSION_1, new String[] {CmsHistoryListUtil.getDisplayVersion(m_paramVersion2, getLocale())})); out.println("</th></tr>"); out.print("<tr><td><a href=\"");
Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion1(), getLocale()))); version1Col.setWidth("35%"); version1Col.setSorteable(false); Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion2(), getLocale()))); version2Col.setWidth("35%"); version2Col.setSorteable(false);
Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion1(), getLocale()))); version1Col.setWidth("35%"); version1Col.setSorteable(false); Messages.get().container( Messages.GUI_COMPARE_VERSION_1, CmsHistoryListUtil.getDisplayVersion(getParamVersion2(), getLocale()))); version2Col.setWidth("35%"); version2Col.setSorteable(false);