Author: billyxie Date: 2009-08-14 05:54:49 +0200 (Fri, 14 Aug 2009) New Revision: 37803
Modified: CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleContentWorkflowAction.java CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleEditorChannelAction.java CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/simple/simplecontent.jsp Log: CMSC-1477 - 4 Based on the FD, implement the main function in simple editor overview page: edit, preview, workfolw, sorting, pageing Modified: CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleContentWorkflowAction.java =================================================================== --- CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleContentWorkflowAction.java 2009-08-14 03:49:52 UTC (rev 37802) +++ CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleContentWorkflowAction.java 2009-08-14 03:54:49 UTC (rev 37803) @@ -42,12 +42,8 @@ } else { workflowmessage = resources.getMessage(locale, "simple.editor.finish.failed"); } - - String path = mapping.findForward(SUCCESS).getPath(); - path += "?workflowmessage=" + workflowmessage; - ActionForward actionForward = new ActionForward(path); - actionForward.setRedirect(false); - return actionForward; + request.setAttribute("workflowmessage", workflowmessage); + return mapping.findForward(SUCCESS); } Modified: CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleEditorChannelAction.java =================================================================== --- CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleEditorChannelAction.java 2009-08-14 03:49:52 UTC (rev 37802) +++ CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/repository/forms/SimpleEditorChannelAction.java 2009-08-14 03:54:49 UTC (rev 37803) @@ -3,16 +3,16 @@ */ package com.finalist.cmsc.repository.forms; +import java.util.List; + import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.mmbase.bridge.Cloud; import org.mmbase.bridge.Node; -import org.mmbase.bridge.NodeList; -import org.mmbase.security.implementation.cloudcontext.User; -import com.finalist.cmsc.security.SecurityUtil; +import com.finalist.cmsc.repository.SimpleContentUtil; import com.finalist.cmsc.struts.MMBaseFormlessAction; @@ -28,19 +28,8 @@ @Override public ActionForward execute(ActionMapping mapping, HttpServletRequest request, Cloud cloud) throws Exception { - NodeList channelList = cloud.createNodeList(); - NodeList groups = SecurityUtil.getGroups(cloud.getNode(Integer.valueOf(((User)cloud.getUser()).getNode().getNumber()))); - for(Object obj : groups){ - Node group = (Node)obj; - NodeList channels = group.getRelatedNodes("contentchannel", "mmbasegrouprel", "DESTINATION"); - if(channels != null && channels.size() > 0){ - for(Object channel : channels){ - if(!channelList.contains(channel)) { - channelList.add(channel); - } - } - } - } + + List<Node> channelList = SimpleContentUtil.getRelatedChannelsByUser(cloud); addToRequest(request, "channelList", channelList); addToRequest(request, "returnpath", request.getParameter("returnpath")); Modified: CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/simple/simplecontent.jsp =================================================================== --- CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/simple/simplecontent.jsp 2009-08-14 03:49:52 UTC (rev 37802) +++ CMSContainer/trunk/CMSContainer/cmsc/contentrepository/src/webapp/editors/simple/simplecontent.jsp 2009-08-14 03:54:49 UTC (rev 37803) @@ -11,8 +11,8 @@ <c:if test="${not empty param.message}"> addLoadEvent(alert('${param.message}')); </c:if> - <c:if test="${not empty param.workflowmessage}"> - addLoadEvent(alert('${param.workflowmessage}')); + <c:if test="${not empty requestScope.workflowmessage}"> + addLoadEvent(alert('${requestScope.workflowmessage}')); </c:if> function selectChannel(channel, returnpath){ var newDirection=document.forms[0].direction.value; @@ -38,7 +38,7 @@ <div class="${(statustype == 'draft' || statustype == null)?'tab_active':'tab'}"> <div class="body"> <div> - <a href="../simple/SimpleContentDraftAction.do" name="activetab"><fmt:message key="simple.editor.draft" /></a> + <a href="../simple/SimpleContentDraftAction.do?cleartitle=true" name="activetab"><fmt:message key="simple.editor.draft" /></a> </div> </div> </div> @@ -46,7 +46,7 @@ <div class="${statustype == 'ready'?'tab_active':'tab'}"> <div class="body"> <div> - <a href="../simple/SimpleContentReadyAction.do"><fmt:message key="simple.editor.ready" /></a> + <a href="../simple/SimpleContentReadyAction.do?cleartitle=true"><fmt:message key="simple.editor.ready" /></a> </div> </div> </div> _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs