create or replace package body odwarprt is /***************************************************************************************** Purpose HTML Report: short list of element types per folder/application system Usage Remarks Revision history When Who Construct Revision What ------------------------------------------------------------------------------------------ $revision_history$ 25-Jan-2002 Kannan Parthasarathy - B2727189: Escape double quotes in JavaScript. 10-Dec-2002 Kannan Parthasarathy - B2701843, B2701894 : Fixed 29-jan-2002 Sandra Muller 1.29 fix for Oracle 9i: make defaults identical to package spec 31-jul-2001 Lucas Jellema 1.28 - changed procedure explorer_view * add download folder (folder or folder-recursively) 27-jul-2001 Lucas Jellema 1.27 - servlet based file download changes in: * procedure js_dynamic_content_shortlist * procedure js_dynamic_content 14-mar-2001 Lucas Jellema 1.26 - issue: in Launchpad select an element type; now all elements of that type are listed, even when they are owned by folders not accessible to the users 08-mar-2001 Lucas Jellema 1.25 - only show Upload File button if user has privilege to do so 02-mar-2001 Lucas Jellema 1.24 - provide link to Create Folder dialog - provide link to Grant Access on Folder - show nested folders! 28-feb-2001 Lucas Jellema 1.23 - should not display Folders on which user has no select privs in Explorer View 28-feb-2001 Lucas Jellema 1.22 - allow jump to browser for context Configuration 27-feb-2001 Lucas Jellema 1.21 - address issue 214 - UE gives Oracle error in explorer view [odwa project/214%]; now UE element types are listed (though with the wrong icon). 23-feb-2001 Lucas Jellema 1.20 Solve issue 207 [odwa project/207%] Folders granted to PUBLIC not shown in explorer view of navigator 05-feb-2001 Lucas Jellema 1.19 - make query on root folders in workarea (select workarea in tree, rightframe shoud display rootfolders) faster by joining with SDW_ACCESS_RIGHTS instead of using the JR_ACC_RIGHTS function 02-feb-2001 Lucas Jellema 1.18 - cannot see objects in wastebasket: procedure explorer_view: cater for wastebasket search 01-feb-2001 Lucas Jellema 1.17 Allow call of Browser for Context Workarea or Folder 26-jan-2001 Lucas Jellema 1.16 solve issue 159 - call to VHV for Folder context in right frame (explorerview) 25-jan-2001 Lucas Jellema 1.15 Solve issue 83: Select folder in Configurations; the Version Label is displayed twice. 24-jan-2001 Sandra Muller 1.14 Fix for issue 81: don't show Business Rules in list of PL/SQL Definitions 24-jan-2001 Peter Ebell 1.13 - Prevent opening of empty navigator window for file download 16-jan-2001 Lucas Jellema 1.11 - add link to Launchpad for Workarea and Configuration - for context is WA or CFG: show root folders only 05-jan-2001 Peter Ebell 1.10 - Include notes in the list, using cdwpbase.get_clean_notes 03-jan-2001 Peter Ebell 1.8 - Changed procedure explorer_view to write javascript that builds the html list of objects, instead of writing it directly from the database. This greatly reduced network traffic 20-dec-2000 Lucas Jellema 1.6 Changed: procedure short_list_of_type_instances * Allow download of file through Servlet, use file_download_request_form * the filename itself is the hyperlink for downloading instead of a separate download icon Changed: procedure explorer_view * Allow download of file through Servlet, use file_download_request_form * the filename itself is the hyperlink for downloading instead of a separate download icon * include javascript functions to invoke upload, add new, check out, check in window * show icons for check out, check in, upload, download, add file * include the refresh form 08-dec-2000 Lucas Jellema 1.5 - made more genric - include query used to search for elements in hidden forms field (visible to user when looked at the HTML source in the Browser) - added l_where as paramter to refine the query used 22-sep-2000 Lucas Jellema 1.4 Use report_link for call to Browser/Report Link 15-sep-2000 Lucas Jellema 1.3 Link to Property Palette, support right side in Repository navigator 28-aug-2000 Lucas Jellema 1.2 * Make use of odwasrch.runSearch * cater for different contexts: CFG, FOL_IN_CFG, WA, FOL_IN_WA, FOL 27-jul-2000 Lucas Jellema 1.1 generic support for icon-bar (or shortcut bar) - added show_anchor and init_short_cut_bar 26-jul-2000 Lucas Jellema 1.0 Initial creation *****************************************************************************************/ /* $add_to_revision_history $ */ -- -- private constants -- REVISION_LABEL constant varchar2(30) := '$x.y:: 1.29 $'; PACKAGE_NAME constant varchar2(30) := 'ODWARPRT'; g_anchor_ctr number(3); procedure init_short_cut_bar is begin g_anchor_ctr:= 0; end; -- init_short_cut_bar procedure show_anchor ( p_anchor_name in varchar2 , p_gif in varchar2 , p_title in varchar2 ) is begin if g_anchor_ctr > 4 then cdwp.tableRowClose; cdwp.tableRowOpen; g_anchor_ctr:= 0; end if; if g_anchor_ctr =0 then cdwp.TableDataHeading(''); end if; g_anchor_ctr:= g_anchor_ctr + 1; -- 2.0 cdwp.TableDataHeading ( cdwpbase.local_link ( p_bookmark => p_anchor_name , p_text => cdwp.add_images('{'||p_gif||'}') ||p_title ) ); end; -- show_anchor procedure js_dynamic_content_shortlist ( imagePath in varchar2 , checkedImage in varchar2 , wbasketImage in varchar2 , launchProc in varchar2 , verHistLabel in varchar2 , verHistProc in varchar2 , verHistImg in varchar2 , browserLabel in varchar2 , browserProc in varchar2 , browserImg in varchar2 , infoPopLabel in varchar2 , infoPopProc in varchar2 , infoPopImg in varchar2 ) is begin htp.p(''); end js_dynamic_content_shortlist; procedure short_list_of_type_instances ( p_session_id in number , p_el_type_of in varchar2 , p_app_irid in number default odwactxt.get_folder_irid , p_app_ivid in number default null , p_cfg_id in number default null , p_wa_id in number default odwactxt.get_workarea_irid , p_view_name in varchar2 default null , p_plural_name in varchar2 default null , p_order_by in varchar2 default 'NAME' , p_descriptor_column in varchar2 default null , p_ctxt_type in varchar2 default 'FOL_IN_WA' , p_list_or_details in varchar2 default 'details' -- values: new, details, list, tree (1.29 fix for 9i) , p_order_direction in varchar2 default 'A' -- ascending; values: A, D , p_where in varchar2 default null ) is l_where varchar2(2000); l_element_type varchar2(2000):= to_char(cdwpbase.short_name_to_type_id( p_el_type_of)); l_plural_name varchar2(2000); l_ci_view_name varchar2(100):= nvl( p_view_name , cdwpbase.get_ci_view ( p_type_id => cdwpbase.short_name_to_type_id ( p_el_type_of) ) ); l_list_or_details varchar2(10):= p_list_or_details; -- 1.13 changed #columns for summary view from 5 to 3 (issue 126) c_num_of_columns number(2):= 3; l_first boolean:= true; l_cursor varchar2(4000); l_files_per_column number(10); -- how many files will be displayed in each column of the list_view l_path varchar2(2000); l_type number; TYPE typelist IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER; types typelist; -- array that stores 'regular' types, with id < 9999 irreg_types typelist; -- sequence-based array with indecex > 10000 that stores NLS names irreg_max number := 9999; function TypeAdded (p_type_id in number) return boolean is begin if types.exists(p_type_id) then return true; else types(p_type_id) := 'Y'; return false; end if; end; function GetTypeIndex (p_nls_name in varchar2) return number is l_found_index number := -1; begin for i in 10000 .. irreg_max loop if irreg_types(i) = p_nls_name then l_found_index := i; end if; end loop; if l_found_index < 0 then irreg_max := irreg_max + 1; irreg_types(irreg_max) := p_nls_name; l_found_index := irreg_max; end if; return l_found_index; end; function url ( b_list_or_details in varchar2 default p_list_or_details , b_order_by in varchar2 default nvl( p_order_by, 'NAME') , b_order_direction in varchar2 default null , p_text in varchar2 ) return varchar2 is begin return '' ||p_text ||'' ||cdwpbase.nbsp(3) ; end; -- url begin -- short_list_of_type_instances odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'short_list_of_types_instances' , p_folder_irid => p_app_irid , p_folder_ivid => p_app_ivid , p_cfg_ivid => p_cfg_id , p_workarea_irid => p_wa_id , p_pac_irid => null , p_pac_ivid => null ); cdwpbase.start_timer; -- for the time being, BR, BRDD and FUN have their own routines to list -- the elements in the given context l_plural_name := nvl ( p_plural_name , cdwpbase.ifThenElse ( p_el_type_of = 'BRDD' , 'Business Rule Design Definitions' , cdwpbase.ifThenElse ( p_el_type_of = 'BR' , 'Business Rules' , cdwpbase.get_nls_type_plural ( p_type_id => cdwpbase.short_name_to_type_id( p_el_type_of) ) ) ) ); cdwpbase.reset_found; htp.htmlOpen; htp.headOpen; cdwp.write_about(package_name, revision_label); htp.title ( l_plural_name ||cdwpbase.ifThenElse ( p_wa_id is not null , Rob_msg.GetMsg(Rob_msg.CAP218_ODWARPRT_INWA,'','','','') ||cdwpbase.get_wa_name ( p_wa_irid => p_wa_id ) ) ||' ' ||cdwpbase.ifThenElse ( p_cfg_id is not null , cdwpbase.get_cfg_name ( p_cfg_ivid => p_cfg_id , p_format => 'VLABEL' ) ) ||cdwpbase.ifThenElse ( p_app_ivid is not null , Rob_msg.GetMsg(Rob_msg.CAP219_ODWARPRT_INPATH,'','','','') ||jr_name.get_path ( id => p_app_ivid , format => 'VLABEL' ) ) ); odwainfo.js_invoke_info; -- JavaScript function to submit the download file request form cdwp_fil.js_download_file_request; odwa_fol.js_go(p_session_id => odwactxt.get_session_id,p_target => '_NEW'); odwavrsn.js_invoke_vhv_ivid_only; odwabrow.js_invoke_browser; js_dynamic_content_shortlist ( imagePath => odwapref.get_value(p_preference_name => 'image_path') , checkedImage => 'check_mark.gif' , wbasketImage => 'wastebasket.gif' , launchProc => 'go' , verHistLabel => Rob_msg.GetMsg(Rob_msg.CAP220_ODWARPRT_VERHISVR,'','','','') , verHistProc => 'vhv' , verhistImg => 'vhv.gif' , browserLabel => Rob_msg.GetMsg(Rob_msg.DSP103_CDWP_OB,'','','','') , browserProc => 'browse' , browserImg => 'browsemed.gif' , infoPopLabel => Rob_msg.GetMsg(Rob_msg.CAP221_ODWARPRT_SHOWINFO,'','','','') , infoPopProc => 'popupInfo' , infoPopImg => 'info.gif' ); cdwp.include_report_styles; htp.headClose; htp.bodyOpen; -- include form to request file download; by using the form, we can -- cut down on the size of the file by downsizing the URL cdwp_fil.form_download_file_request; cdwpbase.open_timer_form; cdwp.tool_header('Reports'); -- cdwp.menu_bar -- ( p_level => 2 -- , p_el_short_name=> p_el_type_of -- , p_el_id => null -- ); -- cdwp.heading(2); cdwp.p ( cdwp.add_images ( '{' ||cdwpbase.get_icon ( p_el_type_of => p_el_type_of) ||'}' ) ||l_plural_name , p_style => 'reptitle' ); htp.nl; htp.nl; cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading(Rob_msg.GetMsg(Rob_msg.DSP167_ODWA_CONTEXT ,'','','','')); cdwp.TableDataValue ( odwactxt.get_context_label ( p_include_folder_versions => p_wa_id is not null ) , p_attributes => 'class="big"' ); cdwp.tableRowClose; /* cdwp.tableRowOpen; cdwp.TableDataHeading ('
Context:'); htp.p( ''); odwalpad.report_context ( p_session_id => p_session_id , p_app_id => p_app_irid , p_app_ivid => p_app_ivid , p_wa_id => p_wa_id , p_cfg_id => p_cfg_id , p_ctxt_type => p_ctxt_type ); htp.p( ''); cdwp.tableRowClose; */ cdwp.tableClose; htp.nl; htp.nl; l_where:= p_where; -- decode the encoded strings l_where:= replace( replace( replace( upper(l_where), '+',' '), 'IZZZ','='), 'KWOOT',''''); if p_el_type_of = 'BR' then l_where := ' exists ( select ''x'' from dual where cdwp_chk_fun_is_business_rule ( ci.id , ci.function_label , ci.function_type ) = ''Y'' ) '; l_element_type:='5024'; if l_list_or_details in ('tree', 'new') then l_where := l_where || ' and ci.parent_reference is null ' -- look for root BR ; end if; -- l_list_or_details in ('tree', 'new') elsif p_el_type_of = 'FUN' then l_where := ' exists ( select ''x'' from dual where cdwp_chk_fun_is_business_rule ( ci.id , ci.function_label , ci.function_type ) = ''N'' ) '; if l_list_or_details in ('tree', 'new') then l_where := l_where || ' and ci.parent_reference is null ' -- look for root functions ; end if; -- l_list_or_details in ('tree', 'new') elsif p_el_type_of ='BRDD' then l_where := ' exists (select 1 from cdi_text where txt_ref = ci.id and txt_type = ''CDINOT'' and txt_text like ''%%'' and parent_ivid = ci.ivid ) '; l_element_type:='4907'; -- 1.14 fix for issue 81, don't show brdd's with plm's elsif p_el_type_of = 'PLM' then l_where := ' not exists (select 1 from cdi_text where txt_ref = ci.id and txt_type = ''CDINOT'' and txt_text like ''%%'' and parent_ivid = ci.ivid ) '; end if; -- only select Objects if the user can see them if p_wa_id is not null then -- a folder version with a folder member for the object must -- exist in the workarea l_where := l_where ||cdwpbase.ifThenElse ( l_where is not null , ' AND' ) ||' ( exists ( select ''x'' from i$sdd_folder_members fm , i$sdd_wa_context wac , sdw_access_rights acc where fm.member_object = e.irid and fm.parent_ivid = wac.object_ivid and wac.workarea_irid = '||to_char(p_wa_id)||' and fm.folder_reference = acc.object_reference and ( acc.grantee_reference = USER or acc.grantee_reference = ''PUBLIC'') ) ) ' ; end if; -- p_wa_id is not null if p_cfg_id is not null then -- a folder version with a folder member for the object must -- exist in the configuration l_where := l_where ||cdwpbase.ifThenElse ( l_where is not null , ' AND' ) ||' ( exists ( select ''x'' from i$sdd_folder_members fm , i$sdd_configuration_members cm , sdw_access_rights acc where fm.member_object = e.irid and fm.parent_ivid = cm.object_ivid and cm.config_ivid = '||to_char(p_cfg_id)||' and fm.folder_reference = acc.object_reference and ( acc.grantee_reference = USER or acc.grantee_reference = ''PUBLIC'') ) ) ' ; end if; -- p_cfg_id is not null -- now use odwasrch to get the list of required objects odwasrch.runSearch ( qWorkareaIrid => p_wa_id , qFolderIrid => p_app_irid , qFolderIvid => p_app_ivid , qIncludeNested => null -- 'Y' to perform recursive search in child folders , qElementType => l_element_type -- , qTipVersionsOnly => qTipVersionsOnly -- , qBranchIrid => qBranchIrid , qCfgIrid => null , qCfgIvid => p_cfg_id , p_order_by => cdwpbase.ifThenElse ( p_order_by is not null , p_order_by ||' ' ||cdwpbase.ifThenElse ( p_order_direction = 'A' , 'Asc' , 'Desc' ) ) , qWhere => l_where ); cdwpbase.write_timer; if p_el_type_of = 'BR' and l_list_or_details in ('tree', 'new') then cdwp_br.root_business_rules ( p_session_id => p_session_id ); elsif p_el_type_of = 'FUN' and l_list_or_details in ('tree', 'new') then cdwp_fun.root_business_functions ( p_session_id => p_session_id ); else if l_list_or_details ='new' then l_list_or_details:= 'list'; end if; if odwasrch.g_ividTab.count > 0 and odwasrch.g_ividTab(1) > 0 then if p_list_or_details ='list' then l_files_per_column:= trunc ( odwasrch.g_ividTab.count / c_num_of_columns)+1; cdwp.tableOpen; -- START 3 COLUMN LOOP for i in 1..l_files_per_column loop -- all files collected into iridTab array cdwpbase.set_found; cdwp.tableRowOpen; if l_first then cdwp.TableDataHeading ( url -- 1.13 removed ifthenelse, we already know that we are in the summary list ( b_list_or_details => 'details' , b_order_by => p_order_by, b_order_direction => p_order_direction -- 1.13 added 'go to' (issue 127) -- + removed ifthenelse, we already know that we are in the summary list , p_text => Rob_msg.GetMsg(Rob_msg.DSP325_ODWARPRTS_DETVW,'','','','') ) ||cdwpbase.ifThenElse ( p_el_type_of in ('BR','FUN') , '
' ||url ( b_list_or_details => 'tree' , b_order_by => p_order_by, b_order_direction => p_order_direction , p_text => Rob_msg.GetMsg(Rob_msg.DSP324_ODWARPRTS_TREEVW,'','','','') ) ) ||'

' ||Rob_msg.GetMsg(Rob_msg.DSP326_ODWARPRTS_OBY,'','','','') ||htf.bold ( p_order_by ||' (' ||cdwpbase.ifThenElse ( p_order_direction = 'A' , Rob_msg.GetMsg(Rob_msg.DSP327_ODWARPRTS_ASC,'','','','') , Rob_msg.GetMsg(Rob_msg.DSP328_ODWARPRTS_DESC,'','','','') ) ||')') ||'
' ||to_char( odwasrch.g_iridTab.count) ||' ' ||l_plural_name , p_attributes => ' ROWSPAN="6" ' ); l_first:= false; else if i> 6 then cdwp.TableDataHeading(''); end if; end if; -- l_first = true for j in 1..c_num_of_columns loop if (i + (j-1)* l_files_per_column) <= odwasrch.g_iridTAB.count then cdwp.TableDataValue ( cdwp.report_link ( p_el_id => odwasrch.g_iridTab(i + (j-1)* l_files_per_column) , p_ivid => odwasrch.g_ividTab(i + (j-1)* l_files_per_column) , p_type_of => p_el_type_of , p_text => '{gif}'||odwasrch.g_nameTab(i + (j-1)* l_files_per_column) ) -- 1.13 removed type icon, is already included in report link above -- ||cdwp.add_images -- ( '{'||cdwpbase.get_icon -- ( p_type_id => odwasrch.g_typeTab(i + (j-1)* l_files_per_column) -- ) -- ||'}' -- ) -- plus:alt text with full element type display label -- 1.13 removed object name, is already included in report link above -- ||odwasrch.g_nameTab(i + (j-1)* l_files_per_column) -- 1.13 fix for issue 15: concatenate instead of comma ||htf.anchor2 -- 1.2 ( 'odwavrsn.vhv' ||'?p_ivid='||to_char(odwasrch.g_ividTab(i + (j-1)* l_files_per_column)) ||chr(38)||'p_irid='||to_char(odwasrch.g_iridTab(i + (j-1)* l_files_per_column)) , ctext => cdwp.add_images ( p_text => '{versiontree.gif}' , p_attributes=> 'width=11 alt="Show Version History Report"' ) , ctarget => '_top' ) ||odwainfo.info_url( p_ivid => odwasrch.g_ividTab(i)) -- cdwp.add_images( '{info.gif}') -- should become anchor/link to pop up info window ); end if; end loop; -- j in 1..c_num_of_columns loop cdwp.TableRowClose; end loop; -- i in 1..g_iridTAB.count -- END 3 COLUMN LOOP cdwpbase.write_no_found ( p_message => Rob_msg.GetMsg(Rob_msg.DSP322_ODWAROBS_NONEFND,l_plural_name,'','','')); cdwp.tableClose; else -- list details cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwpbase.set_found; -- cdwp.TableDataHeading(null); cdwp.TableDataHeading ( url -- 1.13 removed ifthenelse, we already know that we are in the details list ( b_list_or_details => 'list' , b_order_by => p_order_by , b_order_direction => p_order_direction -- 1.13 renamed List View to go to Summary View (issue 127) -- + removed ifthenelse, we already know that we are in the details list , p_text => Rob_msg.GetMsg(Rob_msg.DSP323_ODWARPRTS_SUMVW,'','','','') ) ||cdwpbase.ifThenElse ( p_el_type_of in ('BR','FUN') , '
' ||url ( b_list_or_details => 'tree' , b_order_by => p_order_by, b_order_direction => p_order_direction , p_text => Rob_msg.GetMsg(Rob_msg.DSP324_ODWARPRTS_TREEVW,'','','','') ) ) ||'

' ||Rob_msg.GetMsg(Rob_msg.DSP326_ODWARPRTS_OBY,'','','','') ||htf.bold ( p_order_by ||' (' ||cdwpbase.ifThenElse ( p_order_direction = 'A' , Rob_msg.GetMsg(Rob_msg.DSP327_ODWARPRTS_ASC,'','','','') , Rob_msg.GetMsg(Rob_msg.DSP328_ODWARPRTS_DESC,'','','','') ) ||')') ||'
' ||to_char( odwasrch.g_iridTab.count) ||' ' ||l_plural_name , p_attributes => 'VALIGN=TOP' ); cdwp.p( ''); cdwp.tableOpen; cdwp.tableRowOpen; cdwp.tableDataValue ( url( b_order_by => 'name' ,p_text => Rob_msg.Getmsg(Rob_msg.CAP019_CDWP_NAME,'','','','')) ||cdwpbase.ifThenElse( p_order_by = 'name', '('||p_order_direction||')') , p_attributes => 'class="t2"' ); cdwp.tableDataValue ( Rob_msg.GetMsg(Rob_msg.CAP203_ODWAPROP_VER ,'','','','') , p_attributes => 'class="t2"' ); cdwp.tableDataValue(cdwpbase.nbsp(2)); -- cdwp.tableDataValue('Path'); cdwp.TableDataValue ( ''||url( b_order_by => 'path' ,p_text =>Rob_msg.Getmsg(Rob_msg.CAP061_ODWA_PATH,'','','','')) ||cdwpbase.ifThenElse( p_order_by = 'path', '('||p_order_direction||')') ||'' , 1 ); cdwp.TableDataValue ( ''||url( b_order_by => 'last_touched' ,p_text => Rob_msg.Getmsg(Rob_msg.CAP318_ODWARPRT_MODIFIED,'','','','')) ||cdwpbase.ifThenElse( p_order_by = 'last_touched', '('||p_order_direction||')') ||'' , 1 ); cdwp.tableDataValue (' ' ); cdwp.tableDataValue (''||Rob_msg.GetMsg(Rob_msg.CAP0152_CDWP_NOTES ,'','','','')||' ' ); cdwp.tableRowClose; -- BEGIN LOOP for i in 1..odwasrch.g_ividTab.count loop if (i = 1) then htp.p(''); end if; cdwp.tableClose; end if; -- list_or_details -- htp.p(' '); else if odwasrch.g_ividTab.count = 0 or odwasrch.g_ividTab(1) = 0 then htp.p ( '' ||Rob_msg.GetMsg(Rob_msg.MSG186_ODWARPRTS_NORES ,'','','','') ||'' ); elsif odwasrch.g_ividTab(1) = -3 then htp.p ( '' ||Rob_msg.GetMsg(Rob_msg.MSG187_ODWARPRTS_QRYNOTRUN,'','','','') ||'' ); elsif odwasrch.g_ividTab(1) = -2 then htp.p ( '' ||Rob_msg.GetMsg(Rob_msg.MSG188_ODWARPRTS_EXCEP,odwasrch.g_nameTab(1),'','','') ||'' ); end if; end if; -- odwasrch.g_ividTab(1) is not null cdwp.p( ''); cdwp.p(''); cdwp.tableClose; htp.formopen ( curl => 'odwasrch' , cmethod => 'POST' , cattributes => 'NAME="searchQuery" ' , ctarget => '' ); htp.p ( ' ' ); htp.formClose; cdwpbase.write_no_found ( p_message => 'No ' ||nvl( p_plural_name , cdwpbase.get_nls_type_plural ( p_type_id => cdwpbase.short_name_to_type_id( p_el_type_of) ) ) ||Rob_msg.GetMsg(Rob_msg.DSP330_ODWARPRTS_AVAICTX,'','','','')); end if; -- p_el_type_of in ('BR','FUN') cdwpbase.write_timer; htp.formClose; htp.bodyClose; htp.htmlClose; cdwpbase.reset_context; end; -- short_list_of_type_instances -- this function will write the Javascript function to be included in the HEAD section of the HTML -- page; this function will be called to do open the Grant Access on Folder dialog procedure js_grant_request is begin htp.p (' '); end; -- js_crefol_request procedure js_dynamic_content ( imagePath in varchar2 , checkedImage in varchar2 , checkoutOK in boolean , isWastebasket in boolean , launchProc in varchar2 , checkoutLabel in varchar2 , checkoutProc in varchar2 , checkoutImg in varchar2 , wbasketImg in varchar2 , shortcutImg in varchar2 , checkinLabel in varchar2 , checkinProc in varchar2 , checkinImg in varchar2 , undoChkLabel in varchar2 , undoChkProc in varchar2 , undoChkImg in varchar2 , uploadLabel in varchar2 , uploadProc in varchar2 , uploadImg in varchar2 , verHistLabel in varchar2 , verHistProc in varchar2 , verHistImg in varchar2 , browserLabel in varchar2 , browserProc in varchar2 , browserImg in varchar2 , infoPopLabel in varchar2 , infoPopProc in varchar2 , infoPopImg in varchar2 ) is begin htp.p(''); end; --js_dynamic_content procedure explorer_view ( p_session_id in number , p_el_type_of in varchar2 , p_app_irid in number default odwactxt.get_folder_irid , p_app_ivid in number default null , p_cfg_id in number default null , p_wa_id in number default odwactxt.get_workarea_irid , p_view_name in varchar2 default null , p_plural_name in varchar2 default null , p_order_by in varchar2 default 'NAME' , p_descriptor_column in varchar2 default null , p_ctxt_type in varchar2 default 'FOL_IN_WA' , p_order_direction in varchar2 default 'A' -- ascending; values: A, D ) is TYPE typelist IS TABLE OF VARCHAR2(1) INDEX BY BINARY_INTEGER; TYPE typelist2 IS TABLE OF NUMBER(38) INDEX BY BINARY_INTEGER; types typelist; types2 typelist2; l_type number; l_where varchar2(2000); l_element_type varchar2(2000):= to_char(cdwpbase.short_name_to_type_id( p_el_type_of)); l_plural_name varchar2(2000); l_ci_view_name varchar2(100):= nvl( p_view_name , cdwpbase.get_ci_view ( p_type_id => cdwpbase.short_name_to_type_id ( p_el_type_of) ) ); c_num_of_columns number(2):= 5; l_first boolean:= true; l_cursor varchar2(4000); l_files_per_column number(10); -- how many files will be displayed in each column of the list_view l_path varchar2(2000); l_wastebasket boolean := instr(p_ctxt_type, 'WASTEBASKET') > 0; -- this variable indicates whether the current user has update privileges on -- the combination of Folder/Workarea currently shown -- if no workarea context is set, no upload is allowed l_upload_allowed boolean default false; -- this variable indicates whether the current user has insert privileges on -- the combination of Folder/Workarea currently shown -- if no workarea context is set, no insert is allowed l_insert_allowed boolean default false; -- this variable indicates whether the current user has insert privileges on -- the combination of Folder/Workarea currently shown -- and has the Manage Folders System Privilege l_create_folder_allowed boolean default false; -- this variable indicates whether the current user has Version privileges on -- the combination of Folder/Workarea currently shown -- if no workarea context is set, no check out is allowed l_checkout_allowed boolean default false; -- this procedure will check whether the Folder and Workarea have been set -- and whether the current user has update privileges on both procedure set_upload_allowed is begin -- 1.25 added checks for access rights of PUBLIC l_upload_allowed:= p_app_irid is not null and p_wa_id is not null and ( jr_acc_rights.has_access(object_irid => p_app_irid, grantee => USER, privilege => 'UPD') OR jr_acc_rights.has_access(object_irid => p_app_irid, grantee => 'PUBLIC', privilege => 'UPD') ) and ( jr_acc_rights.has_access(object_irid => p_wa_id, grantee => USER, privilege => 'UPD') or jr_acc_rights.has_access(object_irid => p_wa_id, grantee => 'PUBLIC', privilege => 'UPD') ) ; end; -- set_upload_allowed -- this procedure will check whether the Folder and Workarea have been set -- and whether the current user has insert privileges on both procedure set_insert_allowed is begin l_insert_allowed:= p_app_irid is not null and p_wa_id is not null and jr_acc_rights.has_access(object_irid => p_app_irid, grantee => USER, privilege => 'INS') and jr_acc_rights.has_access(object_irid => p_wa_id, grantee => USER, privilege => 'INS') ; end; -- set_insert_allowed -- this procedure will check whether the Folder and Workarea have been set -- and whether the current user has insert privileges on both -- and whether the user has Manage Folders System Privilege procedure set_create_folder_allowed is begin -- 1.25 added checks for access rights of PUBLIC l_create_folder_allowed:= jr_sys_privs.get_privilege ( username => USER , privilege => 'MANAGE_CONTAINER' ) = 'Y' and ( p_app_irid is null or jr_acc_rights.has_access(object_irid => p_app_irid, grantee => USER, privilege => 'INS') or jr_acc_rights.has_access(object_irid => p_app_irid, grantee => 'PUBLIC', privilege => 'INS') ) and p_wa_id is not null and ( jr_acc_rights.has_access(object_irid => p_wa_id, grantee => USER, privilege => 'INS') or jr_acc_rights.has_access(object_irid => p_wa_id, grantee => 'PUBLIC', privilege => 'INS') ) ; end; -- set_create_folder_allowed -- this procedure will check whether the Folder and Workarea have been set -- and whether the current user has version privileges on both procedure set_checkout_allowed is begin -- 1.25 added checks for access rights of PUBLIC l_checkout_allowed:= p_app_irid is not null and p_wa_id is not null and ( jr_acc_rights.has_access(object_irid => p_app_irid, grantee => USER, privilege => 'VER') or jr_acc_rights.has_access(object_irid => p_app_irid, grantee => 'PUBLIC', privilege => 'VER') ) and ( jr_acc_rights.has_access(object_irid => p_wa_id, grantee => USER, privilege => 'VER') or jr_acc_rights.has_access(object_irid => p_wa_id, grantee => 'PUBLIC', privilege => 'VER') ) ; end; -- set_checkout_allowed function url ( b_order_by in varchar2 default nvl( p_order_by, 'NAME') , b_order_direction in varchar2 default null , p_text in varchar2 ) return varchar2 is begin return '' ||p_text ||'' ||cdwpbase.nbsp(3) ; end; -- url -- this form is only included to be submitted, resulting in a refresh of the current page -- it will call the current procedure with all the current parameters; it will refresh to -- get the latest values from the database; -- the form is called by the Check Out/Check In and Undo Check Out forms upon successful return -- I did not succeed in calling a JavaScript function from another window; however, I did -- find out how to submit a form from another window. procedure refreshForm is begin htp.formopen( curl => 'odwarprt.explorer_view', cmethod => 'POST', cattributes => 'NAME="refreshForm"'); htp.formhidden( cname => 'p_session_id' , cvalue => to_char(odwactxt.get_session_id) ); htp.formhidden( cname => 'p_el_type_of' , cvalue => p_el_type_of ); htp.formhidden( cname => 'p_app_irid' , cvalue => to_char(odwactxt.get_folder_irid) ); htp.formhidden( cname => 'p_app_ivid' , cvalue => to_char(odwactxt.get_folder_ivid) ); htp.formhidden( cname => 'p_cfg_id' , cvalue => to_char(odwactxt.get_cfg_id) ); htp.formhidden( cname => 'p_wa_id' , cvalue => to_char(odwactxt.get_workarea_irid) ); htp.formhidden( cname => 'p_view_name' , cvalue => p_view_name ); htp.formhidden( cname => 'p_plural_name' , cvalue => p_plural_name ); htp.formhidden( cname => 'p_order_by' , cvalue => p_order_by); htp.formhidden( cname => 'p_descriptor_column' , cvalue => p_descriptor_column); htp.formhidden( cname => 'p_ctxt_type' , cvalue => p_ctxt_type ); htp.formhidden( cname => 'p_order_direction' , cvalue => p_order_direction ); htp.formclose; end; -- refreshForm function TypeAdded (p_type_id in number) return boolean is begin if p_type_id < 99999999 then if types.exists(p_type_id) then return true; else types(p_type_id) := 'Y'; return false; end if; else for i in 1..types2.count loop if types2(i) = p_type_id then return true; end if; end loop; types2( types2.count+1):= p_type_id; return false; end if; -- l_p_type_id < 99999999 end; -- TypeAdded begin odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'explorer_view' , p_folder_irid => p_app_irid , p_folder_ivid => p_app_ivid , p_cfg_ivid => p_cfg_id , p_workarea_irid => p_wa_id , p_pac_irid => null , p_pac_ivid => null ); cdwpbase.start_timer; -- for the time being, BR, BRDD and FUN have their own routines to list -- the elements in the given context l_plural_name:= nvl ( p_plural_name , cdwpbase.ifThenElse ( p_el_type_of = 'BRDD' , 'Business Rule Design Definitions' , cdwpbase.ifThenElse ( p_el_type_of = 'BR' , 'Business Rules' , cdwpbase.get_nls_type_plural ( p_type_id => cdwpbase.short_name_to_type_id( p_el_type_of) ) ) ) ); set_upload_allowed; set_create_folder_allowed; set_insert_allowed; set_checkout_allowed; cdwpbase.reset_found; htp.htmlOpen; htp.headOpen; cdwp.write_about(package_name, revision_label); htp.title ( l_plural_name ||cdwpbase.ifThenElse ( p_wa_id is not null , Rob_msg.GetMsg(Rob_msg.CAP218_ODWARPRT_INWA ,'','','','') ||cdwpbase.get_wa_name ( p_wa_irid => p_wa_id ) ) ||' ' ||cdwpbase.ifThenElse ( p_cfg_id is not null , cdwpbase.get_cfg_name ( p_cfg_ivid => p_cfg_id , p_format => 'VLABEL' ) ) ||cdwpbase.ifThenElse ( p_app_ivid is not null , Rob_msg.GetMsg(Rob_msg.CAP219_ODWARPRT_INPATH,'','','','') ||jr_name.get_path ( id => p_app_ivid , format => 'VLABEL' ) ) ||cdwpbase.ifThenElse ( l_wastebasket , Rob_msg.GetMsg(Rob_msg.CAP222_ODWARPRT_INWB,'','','','') ) ); odwainfo.js_invoke_info; -- JavaScript function to submit the download file request form cdwp_fil.js_download_file_request; odwaupld.js_upload_request; odwaupld.js_crefol_request; cdwp.include_report_styles; -- JavaScript function to do the Check Out request odwachck.js_checkout_request; odwachki.js_checkin_request; odwachck.js_undocheckout_request; odwabrow.js_invoke_browser; odwavrsn.js_invoke_vhv_ivid_only; odwa_fol.js_go( p_session_id => p_session_id , p_target => '_NEW' ); js_grant_request; js_dynamic_content ( imagePath => odwapref.get_value(p_preference_name => 'image_path') , checkedImage => 'check_mark.gif' , checkoutOK => l_checkout_allowed , isWastebasket => l_wastebasket , launchProc => 'go' , checkoutLabel => Rob_msg.GetMsg(Rob_msg.CAP092_ODWACHKI_CO,'','','','') , checkoutProc => 'co' , checkoutImg => 'checkout.gif' , wbasketImg => 'wastebasket.gif' , shortcutImg => 'shared_indicator.gif' , checkinLabel => Rob_msg.GetMsg(Rob_msg.DSP331_ODWARPRTS_CIN,'','','','') , checkinProc => 'ci' , checkinImg => 'checkin.gif' , undoChkLabel => Rob_msg.GetMsg(Rob_msg.DSP332_ODWARPRTS_UNDOCOUT,'','','','') , undoChkProc => 'undoco' , undoChkImg => 'undocheckout.gif' , uploadLabel => Rob_msg.GetMsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','') , uploadProc => 'upl' , uploadImg => 'upload.gif' , verHistLabel => Rob_msg.GetMsg(Rob_msg.CAP220_ODWARPRT_VERHISVR ,'','','','') , verHistProc => 'vhv' , verhistImg => 'vhv.gif' , browserLabel => Rob_msg.GetMsg(Rob_msg.DSP103_CDWP_OB ,'','','','') , browserProc => 'browse' , browserImg => 'browsemed.gif' , infoPopLabel => Rob_msg.GetMsg(Rob_msg.CAP221_ODWARPRT_SHOWINFO ,'','','','') , infoPopProc => 'popupInfo' , infoPopImg => 'info.gif' ); htp.headClose; htp.bodyOpen(Cattributes => ''); -- cdwp_fil.js_include_marlin_core; -- include form to request file download; by using the form, we can -- cut down on the size of the file by downsizing the URL cdwp_fil.form_download_file_request; refreshForm; cdwpbase.open_timer_form; if p_el_type_of = 'BR' then l_where := ' exists ( select ''x'' from dual where cdwp_chk_fun_is_business_rule ( ci.id , ci.function_label , ci.function_type ) = ''Y'' ) '; l_element_type:='5024'; elsif p_el_type_of = 'FUN' then l_where := ' exists ( select ''x'' from dual where cdwp_chk_fun_is_business_rule ( ci.id , ci.function_label , ci.function_type ) = ''N'' ) '; elsif p_el_type_of ='BRDD' then l_where := ' exists (select 1 from cdi_text where txt_ref = ci.id and txt_type = ''CDINOT'' and txt_text like ''%%'' and parent_ivid = ci.ivid ) '; l_element_type:='4907'; end if; -- p_el_type_of = 'BR' if nvl( p_wa_id, p_cfg_id) is not null and nvl(p_app_irid,p_app_ivid) is null and not l_wastebasket then -- only select root folders! l_where := l_where ||cdwpbase.ifThenElse ( l_where is not null , ' AND' ) ||' exists (select ''x'' from i$sdd_folders fol , sdw_access_rights acc where fol.root_flag =''Y'' and fol.ivid = e.ivid and fol.irid = acc.object_reference and ( acc.grantee_reference = USER or acc.grantee_reference = ''PUBLIC'') )' -- 1.20 added PUBLIC as option to solve issue 207 ; else if l_element_type is null then -- only select Folders if the user can see them l_where := l_where ||cdwpbase.ifThenElse ( l_where is not null , ' AND' ) ||' ( e.logical_type_id not in (5009, 4844) or exists ( select ''x'' from i$sdd_folders fol , sdw_access_rights acc where fol.ivid = e.ivid and fol.irid = acc.object_reference and ( acc.grantee_reference = USER or acc.grantee_reference = ''PUBLIC'') ) ) ' ; end if; -- l_element_type is null end if; -- no folder context, but a WA or CFG context -- now use odwasrch to get the list of required objects if l_wastebasket then jr_context.set_wastebasket; -- at this moment, when we search for a certain element type -- the search code joins with the CI-views; the CI-views are version resolved (jr_context.set_workarea) -- and also wastebasket revolved: either only contents of Wastebasket is retrieved or no contents at all -- depending on jr_context.set_wastebasket end if; odwasrch.runSearch ( qWorkareaIrid => p_wa_id , qFolderIrid => p_app_irid , qFolderIvid => p_app_ivid , qIncludeNested => null -- 'Y' to perform recursive search in child folders , qElementType => l_element_type -- , qTipVersionsOnly => 'Y' -- , qBranchIrid => qBranchIrid , qWastebasket => cdwpbase.ifThenElse ( l_wastebasket , 'Y' , 'N' ) , qCfgIrid => null , qCfgIvid => p_cfg_id , p_order_by => cdwpbase.ifThenElse ( p_order_by is not null , p_order_by ||' ' ||cdwpbase.ifThenElse ( p_order_direction = 'A' , 'Asc' , 'Desc' ) ) , qWhere => l_where , p_enforce_acc_privs => false -- 1.19 we should only look for objects in containers we have access to ); cdwpbase.write_timer; cdwpbase.set_found; cdwp.tableOpen; cdwp.tableRowOpen; cdwp.TableDataValue ( cdwpbase.ifthenelse ( odwactxt.get_workarea_irid is not null , htf.anchor2 ( curl => 'odwalpad.launchpad?p_session_id='||to_char(odwactxt.get_session_id) ||chr(38)||'p_wa_id='||to_char(odwactxt.get_workarea_irid) ||chr(38)||'p_ctxt_type=WA' , ctext => odwactxt.get_context_label ( p_include_folder_versions => p_wa_id is null , p_include_folder => false ) , ctarget => '_new' ) ||htf.anchor2 ( curl => 'odwabrow.object_browser' ||'?p_session_id='||to_char(odwactxt.get_session_id) ||chr(38)||'p_workarea_irid='||to_char(odwactxt.get_workarea_irid) , ctext => cdwp.add_images ( p_text => '{browsemed.gif}' -- browser + gray , p_attributes=>' Awidth="30"' ||'alt="Object Browser"' ) , ctarget=> '_new' ) ||cdwpbase.ifThenElse ( p_app_irid is null -- no folder context set and l_create_folder_allowed , odwaupld.url_create_folder( null) ) , cdwpbase.ifthenelse ( odwactxt.get_cfg_id is not null , htf.anchor2 ( curl => 'odwalpad.launchpad?p_session_id='||to_char(odwactxt.get_session_id) ||chr(38)||'p_cfg_id='||to_char(odwactxt.get_cfg_id) ||chr(38)||'p_ctxt_type=CFG' , ctext => odwactxt.get_context_label ( p_include_folder_versions => p_wa_id is null , p_include_folder => false ) , ctarget => '_new' ) ||htf.anchor2 ( curl => 'odwabrow.object_browser' ||'?p_session_id='||to_char(odwactxt.get_session_id) ||chr(38)||'p_cfg_ivid='||to_char(odwactxt.get_cfg_id) ||chr(38)||'p_ivid='||to_char(odwactxt.get_cfg_id) , ctext => cdwp.add_images ( p_text => '{browsemed.gif}' -- browser + gray , p_attributes=>' Awidth="30"' ||'alt="Object Browser"' ) , ctarget=> '_new' ) , odwactxt.get_context_label ( p_include_folder_versions => p_wa_id is null , p_include_folder => false ) ) ) /* ||'
' ||cdwpbase.ifThenElse ( odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked Out' , cdwp.add_images ( '{check_mark.gif}' ) ) */ , p_colspan => 5 , p_attributes => 'NOWRAP class=partitle' ); cdwp.tableRowClose; -- XXXXXXXXXXXXXXXXX if not l_wastebasket and odwactxt.get_folder_ivid is not null then cdwp.tableRowOpen; cdwp.TableDataValue ( cdwpbase.ifThenElse ( odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked Out' , cdwp.add_images ( '{check_mark.gif}' ) ) ||odwactxt.get_context_label ( p_include_folder_versions => nvl( odwactxt.get_cfg_id, p_wa_id) is null , p_include_workarea => false , p_include_config => false ) ||' (' ||odwavrsn.get_version_label(odwactxt.get_folder_ivid) ||')' ||cdwpbase.nbsp(2) ||cdwpbase.ifThenElse ( l_checkout_allowed AND odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' , odwachck.url_checkout ( p_ivid => odwactxt.get_folder_ivid ) ) ||cdwpbase.ifThenElse ( l_checkout_allowed AND odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked Out' , odwachck.url_undoCheckout ( p_ivid => odwactxt.get_folder_ivid ) ) ||cdwpbase.ifThenElse ( l_checkout_allowed AND odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) in ( 'Checked Out','Unversioned') , odwachki.url_checkin ( p_ivid => odwactxt.get_folder_ivid ) ) ||cdwpbase.ifThenElse ( odwaupld.uploadEnabled and l_upload_allowed -- 1.25 added to only show upload file button when user has privilege to do so AND ( --1.8 since automatic check out of the folder is supported, the upload file icon can be shown either -- when the folder is checked out or if the user has the check out privilege odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) in ( 'Checked Out','Unversioned') OR l_checkout_allowed ) , odwaupld.url_upload ( p_ivid => null ) ) ||cdwpbase.ifThenElse ( l_create_folder_allowed AND ( -- since automatic check out of the folder is supported, the create foldericon can be shown either -- when the folder is checked out or if the user has the check out privilege odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) in ( 'Checked Out','Unversioned') OR l_checkout_allowed ) , odwaupld.url_create_folder(p_parent_folder_ivid => odwactxt.get_folder_ivid) ) ||cdwpbase.ifthenelse ( jr_acc_rights.has_access ( object_irid => cdwpbase.get_irid(p_ivid => odwactxt.get_folder_ivid) , grantee => 'USER' , privilege => 'ADM' ) or -- USER is GOVERNOR odwapriv.get_governor(object_irid => cdwpbase.get_irid(p_ivid => odwactxt.get_folder_ivid) ) = USER , '' ||cdwp.add_images('{db_user_role.gif}', p_attributes => 'ALT="'||Rob_msg.GetMsg(Rob_msg.DSP333_ODWARPRTS_GRANT,'','','','')||'"') ||'' ) ||odwavrsn.url_for_vhv(p_ivid => odwactxt.get_folder_ivid, p_js_included => true, p_ivid_only => true) ||odwainfo.info_url( p_ivid => odwactxt.get_folder_ivid) ||htf.anchor2 ( curl => 'odwabrow.object_browser' ||'?p_session_id='||to_char(p_session_id) ||chr(38)||'p_ivid='||to_char(odwactxt.get_folder_ivid) , ctext => cdwp.add_images ( p_text => '{browsemed.gif}' -- browser + gray , p_attributes=>' Awidth="30"' ||'alt="'||Rob_msg.GetMsg(Rob_msg.CAP072_ODWA_OB ,'','','','')||'"' ) , ctarget=> '_new' ) ||cdwpbase.ifThenElse( nvl( odwactxt.get_workarea_irid, odwactxt.get_cfg_id) is not null , htf.anchor2 ( curl => cdwp_fil.servlet_urlbase||'oracle.des.rob.standardServices.Download' ||'?ivid='||to_char(odwactxt.get_folder_ivid) ||chr(38)||'folderName=' ||replace(jr_name.get_crn_from_ivid(i_ivid => odwactxt.get_folder_ivid,format => 'NAME'),' ','+') ||chr(38)||'waIrid='||to_char(odwactxt.get_workarea_irid) ||chr(38)||'waName='||replace(cdwpbase.get_wa_name(p_wa_irid => to_char(odwactxt.get_workarea_irid)),' ','+') ||chr(38)||'cfgIvid='||to_char(odwactxt.get_cfg_id) ||chr(38)||'recursive=N' , ctext => cdwp.add_images ( p_text => '{folder$o$m.gif}' -- Folder Map icon , p_attributes=>' Awidth="30"' ||'alt="'||Rob_msg.GetMsg(Rob_msg.DSP334_ODWARPRTS_DWNLDZIP,'','','','')||'"' ) ) ||htf.anchor2 ( curl => cdwp_fil.servlet_urlbase||'oracle.des.rob.standardServices.Download' ||'?ivid='||to_char(odwactxt.get_folder_ivid) ||chr(38)||'folderName=' ||replace(jr_name.get_crn_from_ivid(i_ivid => odwactxt.get_folder_ivid,format => 'NAME'),' ','+') ||chr(38)||'waIrid='||to_char(odwactxt.get_workarea_irid) ||chr(38)||'waName='||replace(cdwpbase.get_wa_name(p_wa_irid => to_char(odwactxt.get_workarea_irid)),' ','+') ||chr(38)||'cfgIvid='||to_char(odwactxt.get_cfg_id) ||chr(38)||'recursive=Y' , ctext => cdwp.add_images ( p_text => '{AllFolders.gif}' -- Folder Map icon , p_attributes=>' Awidth="30"' ||'alt="'||Rob_msg.GetMsg(Rob_msg.DSP335_ODWARPRTS_DWNLDRZIP,'','','','')||'"' ) ) ) -- ifThenElse nvl( odwactxt.get_workarea_irid, odwactxt.get_cfg_id) is not null ||cdwpbase.nbsp(9) ||'('||to_char(odwasrch.g_ividTab.count) ||Rob_msg.GetMsg(Rob_msg.CAP224_ODWARPRT_REC,'','','','')||')' , p_colspan => 5 , p_attributes => 'NOWRAP class=big' ); cdwp.tableRowClose; else if l_wastebasket then cdwp.tableRowOpen; cdwp.TableDataValue (Rob_msg.GetMsg(Rob_msg.CAP222_ODWARPRT_INWB ,'','','','') ||cdwp.add_images('{wastebasket.gif}') ); cdwp.tableRowClose; end if; -- l_wastebasket end if; -- not l_wastebasket cdwp.tableClose; htp.p('
'); if odwasrch.g_ividTab.count > 0 and odwasrch.g_ividTab(1) > 0 then cdwp.tableOpen; cdwp.tableRowOpen; cdwp.tableDataValue(' '); -- wastebasket cdwp.tableDataValue(' '); -- checkmark cdwp.tableDataValue(' '); -- shortcut cdwp.tableDataValue ( '' ||url( b_order_by => 'name' ,p_text => Rob_msg.Getmsg(Rob_msg.CAP019_CDWP_NAME,'','','','')) ||cdwpbase.ifThenElse( p_order_by = 'name', '('||p_order_direction||')') ||''); cdwp.tableDataValue ( '' ||Rob_msg.GetMsg(Rob_msg.CAP203_ODWAPROP_VER ,'','','','') ||''); cdwp.tableDataValue(cdwpbase.nbsp(2)); cdwp.TableDataValue ( '' ||url( b_order_by => 'last_touched' ,p_text =>Rob_msg.Getmsg(Rob_msg.CAP318_ODWARPRT_MODIFIED,'','','','')) ||cdwpbase.ifThenElse( p_order_by = 'last_touched', '('||p_order_direction||')') ||'' , 1 ); cdwp.tableDataValue ('' ||'' ||' ' , p_attributes => ' NOWRAP ' ); cdwp.tableDataValue ('' ||Rob_msg.GetMsg(Rob_msg.CAP0152_CDWP_NOTES,'','','','') ||' ' ); cdwp.tableRowClose; /* START LOOP */ for i in 1..odwasrch.g_ividTab.count loop if (i = 1) then htp.p(''); end if; -- odwasrch.g_ividTab.count > 0 /* END LOOP */ cdwp.tableClose; end if; -- if g_ividTab.count > 0 and g_ividTab(1) > 0 cdwpbase.write_timer; htp.formClose; htp.formopen ( curl => 'odwasrch' , cmethod => 'POST' , cattributes => 'NAME="searchQuery" ' , ctarget => '' ); htp.p ( ' ' ); htp.formClose; htp.bodyClose; htp.htmlClose; cdwpbase.reset_context; end; -- explorer_view begin null; end; -- odwarprt /