Update of
/var/cvs/contributions/CMSContainer/cmsc/maintenance/src/webapp/editors/maintenance
In directory james.mmbase.org:/tmp/cvs-serv11135/webapp/editors/maintenance
Modified Files:
create-relations-asset-channel.jsp
Log Message:
CMSC-1206 Asset: enhance the create-relations-asset-channel.jsp script to
find a good channel
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/maintenance/src/webapp/editors/maintenance
See also: http://www.mmbase.org/jira/browse/CMSC-1206
Index: create-relations-asset-channel.jsp
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/maintenance/src/webapp/editors/maintenance/create-relations-asset-channel.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- create-relations-asset-channel.jsp 24 Dec 2008 12:08:15 -0000 1.2
+++ create-relations-asset-channel.jsp 26 Dec 2008 09:36:04 -0000 1.3
@@ -10,35 +10,51 @@
<link href="../style.css" type="text/css" rel="stylesheet"/>
</head>
<body>
- <h2>Create relations from assets to channels</h2>
+ <h2>Create relations from assets to channels.</h2>
<mm:cloud jspvar="cloud" loginpage="../editors/login.jsp" rank="administrator">
<mm:log jspvar="log">
-Note:please insert a channel number which you want to create relation from
asset elements to.if you keep it blank, the root node will be used.
+Note:<ul>
+<li>if 'Relate to root channel' is choosed,the asset elements will be related
to the channel node which you fill in the input text.if it's empty ,the root
node will be used.</li>
+<li>if 'Self-determination' is choosed,The asset elements will be related to
the channel node which relates to a article and the article relates to the
asset</li>
+
+</ul>
<br/><br/>
<form method="post">
<input type="hidden" name="action" value="add"/>
- Parent channel Node Number:<input type="text" name="number"/>
+ <select name="type">
+ <option value="root">Relate to root channel</option>
+ <option value="selfselect">Self-determination</option>
+ </select><br/><br/>
+ Parent channel Node Number:<input type="text" name="number"/><br/><br/>
<input type="submit" name="action" value="Create"/>
</form>
<mm:import externid="action"/>
<mm:import externid="number"/>
<mm:present referid="action">
+ <c:if test="${param.type == 'root'}">
<mm:write referid="number" jspvar="number" vartype="Integer">
<% if(number < 1) {
- new CreateRelationsForSecondaryContent(cloud,number).execute();
+ new CreateRelationsForSecondaryContent(cloud).execute(number,null);
}
else {
if(RepositoryUtil.isChannel(String.valueOf(number))) {
- new CreateRelationsForSecondaryContent(cloud,number).execute();
+ new CreateRelationsForSecondaryContent(cloud).execute(number,null);
}
else {
out.println("The number should be a channel number!");
}
}
%>
-
</mm:write>
+ </c:if>
+ <c:if test="${param.type == 'selfselect'}">
+ <mm:write referid="number" jspvar="number" vartype="Integer">
+ <%
+ new
CreateRelationsForSecondaryContent(cloud).execute(number,"selfselect");
+ %>
+ </mm:write>
+ </c:if>
</mm:present>
</mm:log>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs