<%-- #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.

<%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditImage --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionImage --%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=ForwardEditFormImage --%> <%-- Option:caption=Sort Options --%> <%-- #EndRZ-ActionButton --%>
Categories always sorted by seq (sub-categories sorted within each category)
<%=document_center_sort_display%>
"><% // Loop through 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").replaceAll("%2C","_comma_"); String doc_recordid = rz.recordid; String listmodule = rz.listmodule; rz.listmodule = ""; boolean hasSubCat = !rz.content.equals(""); rz.listmodule = listmodule; rz.listsetup("revize_document_center", "noscript", "placement=upload"+doc_recordid, ""); int categoryCount = rz.listlength; rz.listcomplete(); String categoryCountMsg; if(categoryCount < 1) categoryCountMsg = "No documents"; else if(categoryCount == 1)categoryCountMsg = "1 document"; else categoryCountMsg = categoryCount + " documents";%>
<%-- #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 --%>

<%=doc_header%><%=categoryCountMsg%>

<% String setFolder = rz.pagesectionfolder.replaceAll("," , ""); if (setFolder == null || setFolder.equals("")) setFolder = "../"; if (true || !hasSubCat){%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionButton --%> <%}/* end if*/%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionButton --%><% /*************** * Sub Category ***************/ String sub_header = ""; String doc_subcategoryClass= ""; String doc_filter = "placement=upload" + doc_recordid;%> <% rz.listindex = -2; while(rz.listnext()){ String subcategorCountMsg = ""; 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; if (rz.nodata) continue; } else { sub_header = rz.fetch("revize_document_center","header"); doc_filter = "parent_key=" + rz.recordid; rz.listsetup("revize_document_center", "noscript", doc_filter, ""); int subcategoryCount = rz.listlength; rz.listcomplete(); if(subcategoryCount < 1) subcategorCountMsg = "No documents"; else if(subcategoryCount == 1)subcategorCountMsg = "1 document"; else subcategorCountMsg = subcategoryCount + " documents"; }%> <% if(rz.listindex == -1){%>
    <%} else if (rz.listindex > -1) { /* ISSUE */ rz.fetch("revize_document_center", "header");%>
    <%-- #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 --%>

    <%=sub_header%><%=subcategorCountMsg%>

    <% setFolder = rz.pagesectionfolder.replaceAll("," , ""); if(setFolder == null || setFolder.equals("")) setFolder = "../";%> <%-- #BeginRZ-ActionButton --%> <%-- Option:type=EditListInsertButton --%> <%-- Option:imageSrcURL=images/edit/edit_small.jpg --%> <%-- #EndRZ-ActionButton --%>
      <%}// end if rz.listindex > -1 /** * Document listindex * Lists out the document files */%> <% while ( rz.listnext() && rz.listindex>=0){%> <% String linkcontent = ""; String linkurl = ""; int index = 0 ; String searchChar = ""; String srcIco = ""; linkcontent = rz.fetch("revize_document_center","document_header"); 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")) srcIco = ""; else if(searchChar.equals("doc") || searchChar.equals("txt")) srcIco = ""; else if(searchChar.equals("pdf")) srcIco = ""; else if(searchChar.equals("ppt")) srcIco = ""; }/** end outer if/else **/%>
    • <%=srcIco%><%=linkcontent%>
      <% 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.trim()%> <% }%>
      <% if (!rz.content.equals("")){%> <%=rz.fetch("revize_document_center","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 --%>
    • <%}/** end while logo **/%>
      <% if(rz.listindex == -1){%>
    <%} else if (rz.listindex > -1){%>
<%}%> <%}/**End inner loop**/%>
<%}/** end while**/%>