diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc b/presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc
index f5c0578..f611441 100644
--- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc
@@ -1,35 +1,25 @@
siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
- $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
- $sToRender = "
\n";
- $sToRender .= "| Modify Folder |
\n";
- $sToRender .= "
\n";
- $sToRender .= "
\n";
- $sToRender .= "
\n";
- return $sToRender;
-}*/
+ * $Id$
+ *
+ * Presentation information used for folder editing. Used by editBL.php
+ *
+ * Licensed under the GNU GPL. For full terms see the file DOCS/COPYING.
+ *
+ * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa
+ * @date 2 February 2003
+ * @package presentation.lookAndFeel.knowledgeTree.foldermanagement
+ */
function getFolderPath($iFolderID) {
global $default;
global $default;
$sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
$sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
- return "| " . displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " |
\n";
+ return "| " . displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " |
\n";
}
-
-function getFolderData($iFolderID) {
+function getFolderData($iFolderID, $sDivName) {
global $default;
$sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
$sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
@@ -40,6 +30,7 @@ function getFolderData($iFolderID) {
$sql = $default->db;
$sql->query($sQuery);
$sToRender = "\n";
-
-
- /*$aDisplayColumns = array("folder_name", "description", "is_public");
- $aStoreColumns = array("name", "description" , "is_public");
- $aColumnNames = array("Name", "Description", "Public");
- $aDisplayColumnTypes = array(1,1,2);
- $aDatabaseColumnTypes = array(1,1,2);
- $aDropDownListTableNames = array(2 => "$default->owl_document_types_table");
-
- $oPatternEditableListFromQuery = & new PatternEditableListFromQuery($sQuery, $default->owl_folders_table, $aDisplayColumns, $aStoreColumns, $aColumnNames, $aDisplayColumnTypes, $aDatabaseColumnTypes);
- $oPatternEditableListFromQuery->setUniqueName("folderEdit");
- $oPatternEditableListFromQuery->setDropDownListTableNames($aDropDownListTableNames);
- $oPatternEditableListFromQuery->setColumnsRequired(array(1,0,1,0));
-
- return $oPatternEditableListFromQuery->render();*/
-
- return $sToRender;
-
-}
-function getFolderDocTypes($iFolderID) {
- global $default;
- $sQuery = "SELECT FDL.id, FDL.folder_id, FDL.document_type_id, DTL.name, 'Remove' AS del " .
- "FROM $default->owl_folder_doctypes_table AS FDL INNER JOIN $default->owl_document_types_table AS DTL ON FDL.document_type_id = DTL.id " .
- "WHERE FDL.folder_id = $iFolderID " .
- "ORDER BY DTL.name ASC";
-
- $aColumns = array("name", "del");
- $aColumnHeaders = array("","");
- $aColumnTypes = array(1,3,3);
- $aDBColumnArray = array("id","folder_id");
- $aQueryStringVariableNames = array("fFolderDocTypeID", "fFolderID");
- $aLinkURLs = array(1=>"$default->rootUrl/control.php?action=deleteFolderDocType");
-
- $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "90%", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
- $oPatternTableSqlQuery->setTableHeading("Document Types");
- $oPatternTableSqlQuery->setDisplayColumnHeadings(true);
- return $oPatternTableSqlQuery->render();
-
+ return renderSectionDiv($sDivName, $sToRender);
}
-function getFolderRouting($iFolderID) {
+function getFolderRouting($iFolderID, $sDivName, $bCollaboration) {
global $default;
//had to use coalesce and left outer join for user_id because this column was a new addition
//and the user_ids for existing documents before this change will be null
@@ -122,14 +77,49 @@ function getFolderRouting($iFolderID) {
$aQueryStringVariableNames = array("fFolderCollaborationID", "fFolderID", "fGroupID","fUserID","fSequenceNumber","fRoleID");
$aLinkURLs = array(4=>"$default->rootUrl/control.php?action=modifyFolderCollaboration",5=>"$default->rootUrl/control.php?action=deleteFolderCollaboration", 6=>"$default->rootUrl/control.php?action=viewDependantDocument");
- $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "90%", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
+ $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
$oPatternTableSqlQuery->setTableHeading("Document Routing");
$oPatternTableSqlQuery->setDisplayColumnHeadings(true);
- return $oPatternTableSqlQuery->render();
+ $sToRender .= "";
+ return renderSectionDiv($sDivName, $sToRender);
}
-function getFolderGroupAccess($iFolderID) {
+function getFolderDocTypes($iFolderID, $sDivName) {
+ global $default;
+ $sQuery = "SELECT FDL.id, FDL.folder_id, FDL.document_type_id, DTL.name, 'Remove' AS del " .
+ "FROM $default->owl_folder_doctypes_table AS FDL INNER JOIN $default->owl_document_types_table AS DTL ON FDL.document_type_id = DTL.id " .
+ "WHERE FDL.folder_id = $iFolderID " .
+ "ORDER BY DTL.name ASC";
+
+ $aColumns = array("name", "del");
+ $aColumnHeaders = array("","");
+ $aColumnTypes = array(1,3,3);
+ $aDBColumnArray = array("id","folder_id");
+ $aQueryStringVariableNames = array("fFolderDocTypeID", "fFolderID");
+ $aLinkURLs = array(1=>"$default->rootUrl/control.php?action=deleteFolderDocType");
+
+ $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
+ $oPatternTableSqlQuery->setTableHeading("Document Types");
+ $oPatternTableSqlQuery->setDisplayColumnHeadings(true);
+
+ $sToRender .= "";
+ return renderSectionDiv($sDivName, $sToRender);
+}
+
+function getFolderGroupAccess($iFolderID, $sDivName) {
global $default;
$sQuery = "SELECT GFL.id as id, GFL.group_id AS group_id, GFL.folder_id AS folder_id, GFL.can_read AS can_read, GFL.can_write AS can_write, GL.name AS group_name, 'Edit' as edit, 'Delete' as del " .
"FROM $default->owl_groups_folders_table AS GFL " .
@@ -143,27 +133,54 @@ function getFolderGroupAccess($iFolderID) {
$aQueryStringVariableNames = array("fGroupFolderLinkID", "fFolderID");
$aLinkURLs = array(3=>"$default->rootUrl/control.php?action=modifyGroupFolderLink",4=>"$default->rootUrl/control.php?action=deleteGroupFolderLink");
- $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "90%", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
+ $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames);
$oPatternTableSqlQuery->setTableHeading("Folder Permissions");
$oPatternTableSqlQuery->setDisplayColumnHeadings(true);
- return $oPatternTableSqlQuery->render();
+
+ $sToRender .= "";
+ return renderSectionDiv($sDivName, $sToRender);
+}
+
+function renderSectionDiv($sDivName, $sHtml) {
+ global $default;
+
+ if ( $default->browser == "ie" ) {
+ return "$sHtml
";
+ } else {
+ return "$sHtml
";
+ }
+}
+
+function renderFolderSection($sHeading) {
+ return "| $sHeading |
\n";
}
function getPage($iFolderID, $bCollaboration = false) {
global $default;
-
- $sToRender = renderHeading("Modify Folder");
- $sToRender .= getFolderPath($iFolderID);
- $sToRender .= "\n";
- $sToRender .= "\n";
- $sToRender .= "| \n";
- $sToRender .= getLeftSide($iFolderID, $bCollaboration);
- $sToRender .= " | \n";
- $sToRender .= "\n";
- $sToRender .= getRightSide($iFolderID);
- $sToRender .= " | \n";
- $sToRender .= "
\n";
- $sToRender .= "
\n";
+
+ if ( $default->browser == "ie" ) {
+ $sToRender = "";
+ } else {
+ $sToRender = "
";
+ }
+ $sToRender .= renderHeading("Modify Folder Properties");
+ $sToRender .= getFolderPath($iFolderID);
+
+ $sToRender .= "
";
+ $sToRender .= "
";
+
+ $sToRender .= getFolderData($iFolderID, "folderData");
+ $sToRender .= getFolderRouting($iFolderID, "folderRouting", $bCollaboration);
+ $sToRender .= getFolderDocTypes($iFolderID, "documentTypes");
+ $sToRender .= getFolderGroupAccess($iFolderID, "folderPermissions");
return $sToRender;
}