/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getIconPath() */ @Override public String getIconPath() { String iconpath = super.getIconPath(); if (iconpath == null) { if (isEnabled()) { iconpath = "list/resource_edit.png"; } else { iconpath = "list/resource_edit_disabled.png"; } } return iconpath; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getIconPath() */ @Override public String getIconPath() { String iconpath = super.getIconPath(); if (iconpath == null) { if (isEnabled()) { iconpath = "list/resource_edit.png"; } else { iconpath = "list/resource_edit_disabled.png"; } } return iconpath; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getHelpText() */ @Override public CmsMessageContainer getHelpText() { CmsMessageContainer helptext = super.getHelpText(); if (helptext == null) { if (isEnabled()) { helptext = Messages.get().container(Messages.GUI_EDITRESOURCE_ACTION_HELP_0); } else { helptext = Messages.get().container(Messages.GUI_EDITRESOURCE_DISABLED_ACTION_HELP_0); } } return helptext; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getName() */ @Override public CmsMessageContainer getName() { CmsMessageContainer name = super.getName(); if (name == null) { if (isEnabled()) { name = Messages.get().container(Messages.GUI_EDITRESOURCE_ACTION_NAME_0); } else { name = Messages.get().container(Messages.GUI_EDITRESOURCE_DISABLED_ACTION_NAME_0); } } return name; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getName() */ @Override public CmsMessageContainer getName() { CmsMessageContainer name = super.getName(); if (name == null) { if (isEnabled()) { name = Messages.get().container(Messages.GUI_EDITRESOURCE_ACTION_NAME_0); } else { name = Messages.get().container(Messages.GUI_EDITRESOURCE_DISABLED_ACTION_NAME_0); } } return name; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#getHelpText() */ @Override public CmsMessageContainer getHelpText() { CmsMessageContainer helptext = super.getHelpText(); if (helptext == null) { if (isEnabled()) { helptext = Messages.get().container(Messages.GUI_EDITRESOURCE_ACTION_HELP_0); } else { helptext = Messages.get().container(Messages.GUI_EDITRESOURCE_DISABLED_ACTION_HELP_0); } } return helptext; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getResourceName() != null) { try { // if resource type if editable if (OpenCms.getWorkplaceManager().getEditorHandler().getEditorUri(getResourceName(), getWp().getJsp()) != null) { // check lock state CmsLock lock = getResourceUtil().getLock(); if (lock.isNullLock() || lock.isOwnedBy((getWp().getCms().getRequestContext().currentUser()))) { return isEnabled(); } } } catch (Throwable e) { // ignore } } return !isEnabled(); }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getResourceName() != null) { try { // if resource type if editable if (OpenCms.getWorkplaceManager().getEditorHandler().getEditorUri( getResourceName(), getWp().getJsp()) != null) { // check lock state CmsLock lock = getResourceUtil().getLock(); if (lock.isNullLock() || lock.isOwnedBy((getWp().getCms().getRequestContext().getCurrentUser()))) { return isEnabled(); } } } catch (Throwable e) { // ignore } } return !isEnabled(); }