<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %><%-- --%><%@ page session="false" import=" org.opencms.workplace.*, org.opencms.workplace.editors.*, org.opencms.jsp.*, org.opencms.workplace.editors.directedit.*, java.util.* "%><% // Create a JSP action element CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); String uri = cms.getRequestContext().getUri(); CmsEditorBase wp = new CmsEditorBase(cms); String editTarget = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_TARGET); String editElement = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_ELEMENT); String editLocale = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_LOCALE); String editButtonStyleParam = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_BUTTONSTYLE); String editOptions = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_OPTIONS); String editNewLink = request.getParameter(CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_NEWLINK); String editAction = CmsDirectEditButtonSelection.VALUE_EDIT; String deleteAction = CmsDirectEditButtonSelection.VALUE_DELETE; String newAction = CmsDirectEditButtonSelection.VALUE_NEW; boolean showEdit = true; boolean showDelete = false; boolean showNew = false; if (editOptions != null) { showEdit = (editOptions.indexOf(editAction) >= 0); showDelete = (editOptions.indexOf(deleteAction) >= 0); showNew = (editOptions.indexOf(newAction) >= 0); } int editButtonStyle = 1; try { editButtonStyle = Integer.parseInt(editButtonStyleParam); } catch (Exception e) { // ignore } String editLink = cms.link("/system/workplace/editors/editor.jsp"); String deleteLink = cms.link("/system/workplace/commons/delete.jsp"); // random direct edit id generation Random rnd = (Random)request.getAttribute("__Random"); if (rnd == null) { rnd = new Random(); request.setAttribute("__Random", rnd); } String editId = "directedit_".concat(String.valueOf(rnd.nextInt())); %><%-- --%>
<% if (showEdit) { %> <% } if (showDelete) { %> <% } if (showNew) { %> <% } %>
<% if (editButtonStyle == 1) { %> <%= wp.key(org.opencms.workplace.editors.Messages.GUI_EDITOR_FRONTEND_BUTTON_EDIT_0)%><% } else if (editButtonStyle == 2) { %><%= wp.key(org.opencms.workplace.editors.Messages.GUI_EDITOR_FRONTEND_BUTTON_EDIT_0) %><% } else { %> <% } %><% if (editButtonStyle == 1) { %> <%= wp.key(org.opencms.workplace.editors.Messages.GUI_BUTTON_DELETE_0) %><% } else if (editButtonStyle == 2) { %><%= wp.key(org.opencms.workplace.editors.Messages.GUI_BUTTON_DELETE_0) %><% } else { %><% } %><% if (editButtonStyle == 1) { %> <%= wp.key(org.opencms.workplace.editors.Messages.GUI_BUTTON_NEW_0)%><% } else if (editButtonStyle == 2) { %><%= wp.key(org.opencms.workplace.editors.Messages.GUI_BUTTON_NEW_0)%><% } else { %><% } %>
<%-- --%>
<%-- --%>
<% if (editButtonStyle == 1) { %> <%= wp.key(org.opencms.workplace.editors.Messages.GUI_EDITOR_FRONTEND_BUTTON_LOCKED_0)%><% } else if (editButtonStyle == 2) { %><%= wp.key(org.opencms.workplace.editors.Messages.GUI_EDITOR_FRONTEND_BUTTON_LOCKED_0) %><% } else { %><% } %>
<%-- --%>
<%-- --%> <%-- --%> <%-- --%>