code: public Button createButton(final CmsObject cms, final CmsHistoryResourceBean version) {
  
          String label = CmsVaadinUtils.getMessageText(
              Messages.GUI_HISTORY_DIALOG_SHOW_VERSION_BUTTON_1,
              CmsHistoryRow.formatVersion(version));
          Button result = new Button(label);
          result.addClickListener(new ClickListener() {
  
              private static final long serialVersionUID = 1L;
  
              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");
              }
  
          });
          return result;
      }
docs: Creates a 'show version' button.<p>
  
  @param cms the CMS context to use
  @param version the version
  
  @return the new button