[Yanel-commits] rev 41074 -
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/impl
michi at wyona.com
michi at wyona.com
Tue Jan 20 16:45:00 CET 2009
Author: michi
Date: 2009-01-20 16:45:00 +0100 (Tue, 20 Jan 2009)
New Revision: 41074
Modified:
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/impl/RevisionInformationMenuItem.java
Log:
also display revision date and workflow state
Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/impl/RevisionInformationMenuItem.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/impl/RevisionInformationMenuItem.java 2009-01-20 15:38:37 UTC (rev 41073)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu/impl/RevisionInformationMenuItem.java 2009-01-20 15:45:00 UTC (rev 41074)
@@ -46,12 +46,13 @@
String value = "";
try {
+ WorkflowableV1 workflowable = (WorkflowableV1) this.resource;
+ String state = workflowable.getWorkflowState(revision.getName());
value = "<li class=\"haschild\">"
+ this.revision.getName()
+ + " (" + formatDate(this.revision.getDate()) + ", " + state + ")"
+ "   ";
- WorkflowableV1 workflowable = (WorkflowableV1) this.resource;
- String state = workflowable.getWorkflowState(revision.getName());
ITransitionMenuContent x =
new TransitionMenuContentImpl(getResource(), state, getRevisionInfo().getName(), getMenuLanguageCode());
RevisionTransitionsMenuContent rt = new RevisionTransitions(getResource(), getRevisionInfo().getName(), getMenuLanguageCode(), x);
@@ -92,5 +93,12 @@
public RevisionInformation getRevisionInfo() {
return this.revision;
}
-
+
+ /**
+ *
+ */
+ private String formatDate(java.util.Date date) {
+ java.text.DateFormat df = new java.text.SimpleDateFormat();
+ return df.format(date);
+ }
}
More information about the Yanel-commits
mailing list