Update of 
/var/cvs/contributions/didactor2/src/education/templates/education/wizards
In directory james.mmbase.org:/tmp/cvs-serv1804

Modified Files:
        newfromtree_tests.jsp 
Log Message:
cleaned up


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/templates/education/wizards


Index: newfromtree_tests.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/education/templates/education/wizards/newfromtree_tests.jsp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- newfromtree_tests.jsp       28 Mar 2008 10:44:41 -0000      1.17
+++ newfromtree_tests.jsp       28 Mar 2008 12:22:48 -0000      1.18
@@ -1,116 +1,35 @@
-<[EMAIL PROTECTED] uri="http://www.didactor.nl/ditaglib_1.0"; prefix="di" %>
-<[EMAIL PROTECTED] uri="http://www.mmbase.org/mmbase-taglib-2.0"; prefix="mm"%>
-
-<mm:cloud method="delegate" jspvar="cloud">
-<[EMAIL PROTECTED] file="/shared/setImports.jsp"%>
-
-<!--
-    TODO. This JSP is horrible.
--->
-
-<mm:import id="wizardjsp"       reset="true"><%= 
request.getParameter("wizardjsp") %></mm:import>
-<mm:import id="the_last_parent" reset="true"><%= 
request.getParameter("the_last_parent") %></mm:import>
-
-<mm:node number="<%= request.getParameter("node") %>">
-
-   <mm:import id="the_last_element" reset="true">true</mm:import>
-   <mm:relatednodes type="questions" max="1">
-      <mm:import id="the_last_element" reset="true">false</mm:import>
-   </mm:relatednodes>
-
-   <%
-      String[] arrstrBuilders = {"config/question/mcquestions-origin",
-                                "config/question/openquestions-origin",
-                                "config/question/rankingquestions-origin",
-                                "config/question/couplingquestions-origin",
-                                "config/question/hotspotquestions-origin",
-                                "config/question/valuequestions-origin",
-                                "config/question/dropquestions-origin",
-                                "config/question/fillquestions-origin",
-                                "config/question/fillselectquestions-origin",
-                                "config/question/opennumeralquestions-origin",
-                                "config/question/essayquestions-origin",
-                                "config/question/openvaluequestions-origin"};
-
-      String[] arrstrNames = {"education.createnewmcquestions",
-                              "education.createnewopenquestions",
-                              "education.createnewrankingquestions",
-                              "education.createnewcouplingquestions",
-                              "education.createnewhotspotquestions",
-                              "education.createnewvaluequestions",
-                              "education.createnewdropquestions",
-                              "education.createnewfillquestions",
-                              "education.createnewfillselectquestions",
-                              "education.createnewopennumeralquestions",
-                              "education.createnewessayquestions",
-                              "education.createnewopenvaluequestions"};
-      String[] arrstrDescriptionsIDs = 
{"education.createnewmcquestionsdescription",
-                                        
"education.createnewopenquestionsdescription",
-                                        
"education.createnewrankingquestionsdescription",
-                                        
"education.createnewcouplingquestionsdescription",
-                                        
"education.createnewhotspotquestionsdescription",
-                                        
"education.createnewvaluequestionsdescription",
-                                        
"education.createnewdropquestionsdescription",
-                                        
"education.createnewfillquestionsdescription",
-                                        
"education.createnewfillselectquestionsdescription",
-                                        
"education.createnewopennumeralquestionsdescription",
-                                        
"education.createnewessayquestionsdescription",
-                                        
"education.createnewopenvaluequestionsdescription"};
-
-      for(int f = 0; f < arrstrBuilders.length; f++)
-      {
-         %>
-            <table border="0" cellpadding="0" cellspacing="0">
-               <tr>
-                  <td><img src="gfx/tree_spacer.gif" width="16px" 
height="16px" border="0" align="center" valign="middle"/></td>
-                  <mm:compare referid="the_last_parent" value="true" 
inverse="true">
-                     <td><img src="gfx/tree_vertline.gif" border="0" 
align="center" valign="middle"/></td>
-                  </mm:compare>
-                  <mm:compare referid="the_last_parent" value="true">
-                     <td><img src="gfx/tree_spacer.gif" width="16px" 
height="16px" border="0" align="center" valign="middle"/></td>
-                  </mm:compare>
-
-                  <%
-                     if(f == arrstrBuilders.length - 1)
-                     {// if this is the last element we should check there are 
tests or not
-                      // and close the branch if needed
-                        %>
-                           <mm:compare referid="the_last_element" value="true" 
inverse="true">
-                              <td><img src="gfx/tree_vertline-leaf.gif" 
border="0" align="center" valign="middle"/></td>
-                           </mm:compare>
-                           <mm:compare referid="the_last_element" value="true">
-                              <td><img src="gfx/tree_leaflast.gif" border="0" 
align="center" valign="middle"/></td>
-                           </mm:compare>
-                        <%
-                     }
-                     else
-                     {
-                        %>
-                           <td><img src="gfx/tree_vertline-leaf.gif" 
border="0" align="center" valign="middle"/></td>
-                        <%
-                     }
-                  %>
-
-                  <td><img src="gfx/new_education.gif" width="16" border="0" 
align="middle" /></td>
-                  <%
-                  if(request.getParameter("testname") != null) {%>
-                   <mm:import id="newfromtreetestname" 
reset="true"><%=request.getParameter("testname")%></mm:import>
-                  <% } %>
-                  <td><nobr>
-                    <mm:link referid="wizardjsp" referids="[EMAIL 
PROTECTED],[EMAIL PROTECTED]">
-                      <mm:param name="wizard"><%= arrstrBuilders[f] 
%></mm:param>
+<jsp:root version="2.0"
+          xmlns:jsp="http://java.sun.com/JSP/Page";
+          xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+          xmlns:di="http://www.didactor.nl/ditaglib_1.0";>
+  <jsp:output omit-xml-declaration="yes" />
+
+  <mm:import externid="wizardjsp" from="request" />
+  <mm:cloud method="delegate">
+    <mm:node>
+
+      <di:getsetting setting="new_questiontypes" component="education" 
vartype="list"
+                     id="new_questiontypes" write="false" />
+
+      <mm:stringlist referid="new_questiontypes" id="questiontype">
+        <mm:hasnodemanager name="${_}">
+          <di:leaf
+              branchPath=". "
+              icon="new_education"
+              >
+            <mm:link referid="wizardjsp" referids="[EMAIL PROTECTED]">
+              <mm:param 
name="wizard">config/question/${questiontype}-origin</mm:param>
                       <mm:param name="objectnumber">new</mm:param>
+              <mm:property nodemanager="${questiontype}" name="key:new:name" 
id="name" write="false"/>
+              <mm:property nodemanager="${questiontype}" 
name="key:new:description" id="description" write="false" />
                       <a href="${_}"
-                         title='<di:translate key="<%= 
arrstrDescriptionsIDs[f] %>"/>' target="text">
-                      <di:translate key="<%= arrstrNames[f] %>"/></a>
+                 title="${di:translate(description)}" target="text">
+                ${di:translate(name)}
+              </a>
                       </mm:link>
-                    </nobr>
-                  </td>
-               </tr>
-            </table>
-         <%
-      }
-   %>
-
-</mm:node>
-</mm:cloud>
+          </di:leaf>
+        </mm:hasnodemanager>
+      </mm:stringlist>
+    </mm:node>
+  </mm:cloud>
+</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to