Commit 43fa4cb7 authored by Michel Pelletier's avatar Michel Pelletier

removed extra object find step

parent 542d0ef4
......@@ -239,6 +239,35 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
manage_tabs_message=message)
def manage_catalogFoundItems(self, REQUEST, obj_metatypes=None,
obj_ids=None, obj_searchterm=None,
obj_expr=None, obj_mtime=None,
obj_mspec=None, obj_roles=None,
obj_permission=None):
""" Find object according to search criteria and Catalog them
"""
results = self.ZopeFind(REQUEST.PARENTS[-1],
obj_metatypes=obj_metatypes,
obj_ids=obj_ids,
obj_searchterm=obj_searchterm,
obj_expr=obj_expr,
obj_mtime=obj_mtime,
obj_mspec=obj_mspec,
obj_permission=obj_permission,
obj_roles=obj_roles,
search_sub=1,
REQUEST=REQUEST)
for n in results:
self.catalog_object(n[1], n[0])
message = "Objects Cataloged"
return self.manage_main(self, REQUEST,
manage_tabs_message=message)
def manage_addColumn(self, name, REQUEST):
""" add a column """
self._catalog.addColumn(name)
......
......@@ -8,7 +8,7 @@
Use this form to locate objects to be cataloged.
<P>
<FORM ACTION="manage_catalogFindResult" METHOD="GET">
<FORM ACTION="manage_catalogFoundItems" METHOD="GET">
<TABLE>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
......@@ -77,7 +77,6 @@ Use this form to locate objects to be cataloged.
</TD>
</TR>
<!--#comment-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>have permission:</STRONG>
......@@ -90,7 +89,7 @@ Use this form to locate objects to be cataloged.
</SELECT>
</TD>
</TR>
<!--#/comment-->
<INPUT TYPE="HIDDEN" NAME="search_sub:int" VALUE="1" CHECKED>
......
<HTML>
<HEAD>
<TITLE>Find</TITLE>
</HEAD>
<FRAMESET ROWS="52%,*">
<FRAME SRC="manage_catalogFind" NAME="findForm"
MARGINWIDTH="2" MARGINHEIGHT="2" SCROLLING="auto">
<FRAME SRC="manage_catalogFindResult" NAME="findResult"
MARGINWIDTH="2" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET>
<NOFRAMES>
Management interfaces require the use of a <B>frames-capable</B> web browser.
</NOFRAMES>
</HTML>
<HTML>
<HEAD>
<TITLE>Find Results</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<P>
<!--#in expr="('obj_ids', 'obj_metatypes', 'obj_searchterm', 'obj_expr', 'obj_mtime', 'obj_mspec', 'obj_permission', 'obj_roles', 'search_sub')"-->
<!--#else expr="_.hasattr(REQUEST, _['sequence-item'])"-->
<!--#call expr="REQUEST.set(_['sequence-item'], _.None)"-->
<!--#/else-->
<!--#/in-->
<!--#if btn_submit-->
<!--#with "_.namespace(
results=ZopeFind(PARENTS[-1],
obj_ids=obj_ids,
obj_metatypes=obj_metatypes,
obj_searchterm=obj_searchterm,
obj_expr=obj_expr,
obj_mtime=obj_mtime,
obj_mspec=obj_mspec,
obj_permission=obj_permission,
obj_roles=obj_roles,
search_sub=search_sub,
REQUEST=REQUEST))"-->
<!--#if results-->
<HR>
<STRONG>
Found <!--#var results fmt=collection-length--> item<!--#if expr="_.len(results) != 1"-->s<!--#/if-->. Boo!
</STRONG>
<HR>
<form action="." method="post">
<input type="submit" name="manage_catalogObject:method" value=" Catalog Items ">
<input type="submit" name="manage_uncatalogObject:method" value=" UnCatalog Items ">
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<!--#in results-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="urls:list"
VALUE="<!--#var sequence-key-->"
CHECKED>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var SCRIPT_NAME-->/<!--#var sequence-key-->/manage_main">
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->"
ALT="<!--#var meta_type-->" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var SCRIPT_NAME-->/<!--#var sequence-key-->/manage_main">
<!--#var sequence-key-->
<!--#if title-->
(<!--#var title-->)
<!--#/if-->
</A>
</TD>
<!--#comment-->
<TD>
<!--#if "inCatalog(_['sequence-key'])"-->
In Catalog
<!--#else-->
Not in Catalog
<!--#/if-->
</TD>
<!--#/comment-->
</TR>
<!--#/in-->
</TABLE>
</form>
<!--#else-->
<HR>
<STRONG>
No items were found matching this query.
</STRONG>
<HR>
<!--#/if-->
<!--#/with-->
<!--#/if-->
</BODY>
</HTML>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment