/** * Returns the html code for the toolbar (search bar + multiactions bar).<p> * * @return html code */ protected String htmlToolBar() { boolean showToolBar = getMetadata().isSearchable(); Iterator itMultiActions = getMetadata().getMultiActions().iterator(); while (!showToolBar && itMultiActions.hasNext()) { CmsListMultiAction multiAction = (CmsListMultiAction)itMultiActions.next(); showToolBar = showToolBar || multiAction.isVisible(); } if (!showToolBar) { // prevent empty table if there is nothing to display return ""; } StringBuffer html = new StringBuffer(512); html.append("<table width='100%' cellspacing='0' style='margin-bottom: 5px'>\n"); html.append("\t<tr>\n"); html.append(m_metadata.htmlSearchBar()); html.append(m_metadata.htmlMultiActionBar()); html.append("\t</tr>\n"); html.append("</table>\n"); return html.toString(); }
/** * Returns the html code for the toolbar (search bar + multiactions bar).<p> * * @return html code */ protected String htmlToolBar() { boolean showToolBar = getMetadata().isSearchable(); Iterator<CmsListMultiAction> itMultiActions = getMetadata().getMultiActions().iterator(); while (!showToolBar && itMultiActions.hasNext()) { CmsListMultiAction multiAction = itMultiActions.next(); showToolBar = showToolBar || multiAction.isVisible(); } if (!showToolBar) { // prevent empty table if there is nothing to display return ""; } StringBuffer html = new StringBuffer(512); html.append("<table width='100%' cellspacing='0' style='margin-bottom: 5px'>\n"); html.append("\t<tr>\n"); html.append(m_metadata.htmlSearchBar()); html.append(m_metadata.htmlMultiActionBar()); html.append("\t</tr>\n"); html.append("</table>\n"); return html.toString(); }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#buttonHtml(CmsWorkplace) */ public String buttonHtml(CmsWorkplace wp) { if (!isVisible()) { return ""; } if (isEnabled()) { String onClic = "listMAction('" + getListId() + "','" + getId() + "', '" + CmsStringUtil.escapeJavaScript(wp.resolveMacros(getConfirmationMessage().key(wp.getLocale()))) + "', " + CmsHtmlList.NO_SELECTION_HELP_VAR + ");"; return A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, getId(), getName().key(wp.getLocale()), getHelpText().key(wp.getLocale()), isEnabled(), getIconPath(), null, onClic); } return ""; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#buttonHtml(CmsWorkplace) */ public String buttonHtml(CmsWorkplace wp) { if (!isVisible()) { return ""; } if (isEnabled()) { String onClic = "listMAction('" + getListId() + "','" + getId() + "', '" + CmsStringUtil.escapeJavaScript(wp.resolveMacros(getConfirmationMessage().key(wp.getLocale()))) + "', " + CmsHtmlList.NO_SELECTION_HELP_VAR + ");"; return A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, getId(), getName().key(wp.getLocale()), getHelpText().key(wp.getLocale()), isEnabled(), getIconPath(), null, onClic); } return ""; }