<%-- #RevizeProperties USE REVIZE MENU (DOCUMENT PROPERTIES) TO EDIT DATA BELOW: status=edit options=notranslate server=localhost:8080 projectName=clearwaterdemo label=document_center location=plugins/document_center/document_center.list.template_include.subcat.jsp version= docType=include subType=include moduleName= fieldName= channels=| description= --%><%! String revize_document_center = ""; %><% String document_center_category_sort = "_recordid asc"; String document_center_document_sort = "_recordid asc"; //backward compatibility before 10-16-2011 String document_center_sort_field = ""; String document_center_sort_order = ""; if (rz.isvalidfield("revize_document_center","seq")) { document_center_category_sort = "seq asc, _recordid asc"; %>" /><% if (rz.content.equals("")) rz.content = "seq"; // header = to category header - document_header for docs. Must use document header to sort docments if (rz.content.equals("name")) rz.content = "document_header"; document_center_sort_field = rz.content; %>" /><% if (rz.content.equals("")) rz.content = "asc"; document_center_sort_order = rz.content; document_center_document_sort = document_center_sort_field + " " + document_center_sort_order; //document_center_document_sort += ", _recordid " + document_center_sort_order; } out.println(""); String document_center_sort_display = "Documents sorted by "; if( document_center_sort_field.equals("document_header") ) { document_center_sort_display += " HEADER"; } else { document_center_sort_display += document_center_sort_field.toUpperCase(); } if (document_center_sort_order.indexOf("asc") != -1) document_center_sort_display += " in Ascending Order"; else document_center_sort_display += " in Descending Order"; document_center_sort_display += " within category"; %>
Doc app

Document Center

The Document Center provides easy access to public documents. Click on one of the categories below to see related documents or use the search function.

Search for file type:
<%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:caption=New Category --%> <%-- #EndRZ-ActionButton --%>
Categories always sorted by seq (sub-categories sorted within each category)
<%=document_center_sort_display%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=ForwardEditFormImage --%> <%-- Option:caption=Sort Options --%> <%-- #EndRZ-ActionButton --%>
Please click on one of the categories below to see uploaded documents.
<% //=========================== category list ============================\\ %>"><% while ( rz.listnext() && rz.listindex >= 0) { %><% String doc_header = rz.fetch("revize_document_center", "header"); String doc_header_encoded = java.net.URLEncoder.encode(doc_header,"UTF-8"); String doc_recordid = rz.recordid; String listmodule = rz.listmodule; rz.listmodule = ""; boolean hasSubCat = !rz.content.equals(""); rz.listmodule = listmodule; ///rz.fetch("revize_document_center","placement", "", "placement=upload"+rz.recordid); ///String emptyCategoryClass = rz.content.equals("") ? "empty" : ""; rz.listsetup("revize_document_center", "noscript", "placement=upload"+doc_recordid, ""); int categoryCount = rz.listlength; rz.listcomplete(); String categoryCountMsg = (categoryCount <= 0 ? "No" : categoryCount+"") + " documents"; String categoryEmptyClass = (categoryCount <= 0 ? "empty" : ""); %>
<% if (!doc_header.equals("")) { %>
<%=doc_header%> <%=categoryCountMsg%>
<%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditImage --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionImage --%> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListDeleteImage --%> <%-- Option:forwardURL= --%> <%-- Option:imageSrcURL=images/edit/delete_small.jpg --%> <%-- #EndRZ-ActionImage --%>
<% String setFolder = rz.pagesectionfolder; if (setFolder == null || setFolder.equals("")) setFolder = "../"; if (true || !hasSubCat) { %> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:caption=New Document --%> <% } %> <%-- #EndRZ-ActionButton --%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:caption=New Sub-Category --%> <%-- #EndRZ-ActionButton --%>
<%}%>
CAT:<%=rz.recordid%>
<% //========================= sub-category list ==========================\\ String sub_header = ""; String doc_subcategoryClass = ""; String doc_filter = "placement=upload" + doc_recordid; %><% rz.listindex = -2; while ( rz.listnext() ) { String subcategorCountMsg = ""; String subcategoryClass = "subcategory"; if (rz.listindex == -1) { //check for documents with no sub-category doc_filter += " and parent_key=" + rz.page_key; listmodule = rz.listmodule; rz.listmodule = ""; rz.fetch("revize_document_center","_recordid","",doc_filter); rz.listmodule = listmodule; ///out.println("doc_filter="+doc_filter+" rz.content=" + rz.content + "; nodata="+rz.nodata); if (rz.nodata) continue; } else { sub_header = rz.fetch("revize_document_center","header"); doc_filter = "parent_key=" + rz.recordid; /* listmodule = rz.listmodule; rz.listmodule = ""; rz.fetch("revize_document_center","placement","",doc_filter); rz.listmodule = listmodule; if (rz.nodata) //if no documents for subcategory subcategoryClass += " empty"; */ rz.listsetup("revize_document_center", "noscript", doc_filter, ""); int subcategoryCount = rz.listlength; rz.listcomplete(); subcategorCountMsg = (subcategoryCount <= 0 ? "No" : subcategoryCount+"") + " documents"; if (subcategoryCount <= 0) subcategoryClass += " empty"; } %><% //----- Create sub-category html table row for documents assigned to sub-category if (rz.listindex > -1) { rz.fetch("revize_document_center", "header"); doc_subcategoryClass = " revize_document_center_rz" + rz.recordid; %>

<%=rz.content%> <%=subcategorCountMsg%>

<% if (rz.isvalidfield("revize_document_center","seq")) { %> <% } %> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditImage --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionImage --%> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListDeleteImage --%> <%-- Option:forwardURL= --%> <%-- Option:imageSrcURL=images/edit/delete_small.jpg --%> <%-- #EndRZ-ActionImage --%>

<% String setFolder = rz.pagesectionfolder; if(setFolder == null || setFolder.equals("")) setFolder = "../"; %> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:caption=New Document --%> <%-- #EndRZ-ActionButton --%>
sub:<%=rz.recordid%>
<% } // end no sub-category html table row //========================= document list ==========================\\ %><% while ( rz.listnext() && rz.listindex>=0){ %>
<% String linkcontent = ""; String linkurl = ""; int index = 0 ; String searchChar = ""; String srcImg = ""; linkcontent = rz.fetch("revize_document_center","document_header"); srcImg = "/revize/plugins/document_center/_images_/link.png"; if (!rz.fetch("revize_document_center","document_external_url").equals("")) { linkurl = rz.fetch("revize_document_center","document_external_url"); if (linkurl.startsWith("www")) linkurl = "http://" + linkurl; } else { linkurl = rz.fetch("revize_document_center","document_file","file,auto,location=,extensions="); linkurl = rz.src; index = linkurl.lastIndexOf("."); searchChar = linkurl.substring(index+1,linkurl.length()); if(searchChar.equals("xls")){srcImg = "/revize/plugins/document_center/_images_/excel.png";} if(searchChar.equals("doc") || searchChar.equals("txt")){srcImg = "/revize/plugins/document_center/_images_/word.png";} if(searchChar.equals("pdf")){srcImg = "/revize/plugins/document_center/_images_/pdf.png";} if(searchChar.equals("ppt")){srcImg = "/revize/plugins/document_center/_images_/powerpoint.png";} } %>
Download File
<% if (!rz.content.equals("")) { %>
<%=rz.fetch("revize_document_center","content")%>
<%}%>
<% if (rz.isvalidfield("revize_document_center","seq")) { %><%=(!document_center_sort_field.equals("document_header")) ? ("document " + document_center_sort_field) : "document Header"%> <%= rz.content.equals("") ? "none" : rz.content %> <% } %> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditImage --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionImage --%> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListDeleteImage --%> <%-- Option:forwardURL= --%> <%-- Option:imageSrcURL=images/edit/delete_small.jpg --%> <%-- #EndRZ-ActionImage --%>
file:<%=rz.recordid%>
<% } // end documents list %>
<%} // end documents list %>
<% } // end category list %>