code: public String getPublishButton() {
  
          String publishButton = OpenCms.getWorkplaceManager().getDefaultUserSettings().getPublishButtonAppearance();
          if (CmsDefaultUserSettings.PUBLISHBUTTON_SHOW_NEVER.equals(publishButton)) {
              return "";
          }
  
          int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle();
  
          if (CmsDefaultUserSettings.PUBLISHBUTTON_SHOW_AUTO.equals(publishButton)) {
              if (getCms().isManagerOfProject()) {
                  return button(
                      "../../workplace/commons/publish_project.jsp",
                      "body",
                      "publish.png",
                      Messages.GUI_BUTTON_PUBLISH_0,
                      buttonStyle);
              } else {
                  return "";
              }
          }
  
          if (getCms().isManagerOfProject()) {
              return (button(
                  "../../workplace/commons/publish_project.jsp",
                  "body",
                  "publish.png",
                  Messages.GUI_BUTTON_PUBLISH_0,
                  buttonStyle));
          } else {
              return (button(null, null, "publish_in.png", Messages.GUI_BUTTON_PUBLISH_0, buttonStyle));
          }
      }
docs: Returns the html for the "publish project" button depending on the current users permissions and the default
  workplace settings.<p>
  
  @return the html for the "publish project" button