import org.splat.dal.bo.som.Document;
import org.splat.dal.bo.som.DocumentType;
import org.splat.dal.bo.som.KnowledgeElement;
-import org.splat.dal.bo.som.ProgressState;
import org.splat.dal.bo.som.SimulationContext;
import org.splat.dal.bo.som.Visibility;
import org.splat.manox.XDOM;
private FeedbexPopup() {
super();
- addItem(MNU_PROMOTE, new PopupItem(MNU_NAME_PROMOTE).icon(
- "image.review.png").action("promote-knowledge")
- .confirmation("message.promote.knowledge"));
- addItem(MNU_DEMOTE, new PopupItem(MNU_NAME_DEMOTE).icon(
- "image.invalidate.png").action("demote-knowledge")
- .confirmation("message.demote.knowledge"));
- addSeparator();
addItem(MNU_RENAME, new PopupItem(MNU_NAME_RENAME)
.action("edit-knowledge?action=renameKnowledge"));
addItem(MNU_EDIT, new PopupItem(MNU_NAME_EDIT)
@Override
public boolean isEnabled(final String name) {
- Item item = Item.valueOf(name);
boolean res = true;
-
- if (item == Item.promote) {
- if (_owner.getProgressState() != ProgressState.inDRAFT) {
- res = false;
- }
- } else if ((item == Item.demote)
- && (_owner.getProgressState() != ProgressState.inCHECK)) {
- res = false;
- }
return res;
}