From d265e5b26ba82d0183b6b1e8a773486aa1a14acf Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 24 Jan 2003 15:09:45 +0000 Subject: [PATCH] Initial revision. --- presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 0 deletions(-) create mode 100644 presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php create mode 100644 presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php new file mode 100644 index 0000000..e462516 --- /dev/null +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyBL.php @@ -0,0 +1,77 @@ +owl_fs_root/lib/security/permission.inc"); + require_once("$default->owl_fs_root/lib/documentmanagement/Document.inc"); + require_once("$default->owl_fs_root/lib/foldermanagement/Folder.inc"); + require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc"); + require_once("$default->owl_fs_root/lib/visualpatterns/PatternEditableTableSqlQuery.inc"); + require_once("$default->owl_fs_root/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc"); + require_once("$default->owl_fs_root/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); + require_once("$default->owl_fs_root/presentation/webpageTemplate.inc"); + require_once("$default->owl_fs_root/presentation/Html.inc"); + + $aDocumentDataArray; + settype($aDocumentDataArray, "array"); + + $oDocument = & Document::get($fDocumentID); + echo $sToRender = "
\n"; + echo renderEditableGenericMetaData($oDocument); + echo "
"; + /*if (isset($fDocumentID)) { + require_once("$default->owl_fs_root/lib/security/permission.inc"); + require_once("$default->owl_fs_root/lib/documentmanagement/Document.inc"); + require_once("$default->owl_fs_root/lib/foldermanagement/Folder.inc"); + + if (Permission::userHasDocumentReadPermission($fDocumentID)) { + require_once("$default->owl_fs_root/lib/security/permission.inc"); + require_once("$default->owl_fs_root/lib/documentmanagement/Document.inc"); + require_once("$default->owl_fs_root/lib/foldermanagement/Folder.inc"); + require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc"); + require_once("$default->owl_fs_root/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc"); + require_once("$default->owl_fs_root/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); + require_once("$default->owl_fs_root/presentation/webpageTemplate.inc"); + require_once("$default->owl_fs_root/presentation/Html.inc"); + + $oDocument = & Document::get($fDocumentID); + + $aDocumentDataArray; + settype($aDocumentDataArray, "array"); + + $oPatternCustom = & new PatternCustom(); + $oPatternCustom->setHtml(getPage($oDocument)); + $main->setCentralPayload($oPatternCustom); + $main->render(); + } else { + require_once("$default->owl_fs_root/presentation/webpageTemplate.inc"); + require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc"); + + $oPatternCustom = & new PatternCustom(); + $oPatternCustom->setHtml("

Either you do not have permission to view this document,
" . + "or the document you have chosen no longer exists on the file sytem.

\n"); + $main->setCentralPayload($oPatternCustom); + $main->render(); + } + } else { + require_once("$default->owl_fs_root/presentation/webpageTemplate.inc"); + require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc"); + + $oPatternCustom = & new PatternCustom(); + $oPatternCustom->setHtml("

You have not chosen a document to view

\n"); + $main->setCentralPayload($oPatternCustom); + $main->render(); + }*/ +} + +?> diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc new file mode 100644 index 0000000..9733f0a --- /dev/null +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc @@ -0,0 +1,83 @@ +getFolderID())) . " > " . $oDocument->getName(); + return "
$sDocumentPath
\n"; +} + +/*function renderEditableDocumentData($oDocument, $aDocumentDataArray) { + global $default; + $sQuery = "SELECT D.name, D.modified, DTT.datetime AS created, U.name AS initiator, CONCAT(CONCAT(D.major_version, '.'), D.minor_version) AS version, WDSL.name AS status " . + "FROM $default->owl_documents_table AS D INNER JOIN $default->owl_web_documents_table AS WD ON WD.document_id = D.ID " . + "INNER JOIN $default->owl_web_documents_status_table AS WDSL ON WD.status_id = WDSL.id " . + "INNER JOIN $default->owl_users_table AS U ON U.id = D.creator_id " . + "INNER JOIN $default->owl_document_transactions_table AS DTT ON DTT.document_id = D.id " . + "INNER JOIN $default->owl_transaction_types_table AS TT ON DTT.transaction_id = TT.id " . + "WHERE D.id = " . $oDocument->getID() . " " . + "AND TT.name LIKE 'Create'"; + + $sql = new Owl_DB(); + $sql->query($sQuery); + $sql->next_record(); + + $sToRender = "
\n"; + $sToRender .= ""; + $sToRender .= ""; + + $aDocumentDataArray[count($aDocumentDataArray)] = "document.name.". $oDocument->getID(); + $sToRender .= "\n"; + $sToRender .= "\t\n"; + //$sToRender .= "\t\n"; + $sToRender .= "\n"; + + $sToRender .= "\n"; + $sToRender .= "\t\n"; + $sToRender .= "\n"; + + $sToRender .= "\n"; + $sToRender .= "\t\n"; + $sToRender .= "\n"; + + $sToRender .= "\n"; + $sToRender .= "\t\n"; + $sToRender .= "\n"; + + $sToRender .= "
Generic Meta Data
Document title" . textInput(("documents&name&". $oDocument->getID()), $sql->f("name")) . "Document title" . textInput("docname", $sql->f("name")) . "
Date created" . $sql->f("created") . "
Last updated" . $sql->f("last_modified") . "
Document initiator" . $sql->f("initiator") . "
\n"; + + $sToRender .= "
"; + return $sToRender; +}*/ + +/*function renderGenericMetaData() { + "SELECT DF.name, +}*/ + +function renderEditableGenericMetaData($oDocument) { + global $default; + $sQuery = "SELECT DF.name AS name, DFL.value as value, DFL.id AS id " . + "FROM $default->owl_documents_table AS D INNER JOIN $default->owl_document_fields_table AS DFL ON D.id = DFL.document_id " . + "INNER JOIN $default->owl_fields_table AS DF ON DF.id = DFL.document_field_id " . + "WHERE document_id = " . $oDocument->getID() . " " . + "AND DF.is_generic = 1"; + $aColumns = array("name", "value"); + $aColumnHeaders = array("Tag", "Value"); + $aColumnTypes = array(1,1); + $aColumnEditable = array(0,1); + $oPatternTableSqlQuery = & new PatternEditableTableSqlQuery($sQuery, $default->owl_document_fields_table, "generic_meta_data", $aColumns, $aColumnTypes, $aColumnEditable, $aColumnHeaders, "90%"); + $oPatternTableSqlQuery->setTableHeading("Generic Meta Data"); + return $oPatternTableSqlQuery->render(); + +} + + + +?> -- libgit2 0.21.4