mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
pass current document to pageNavigation()
pageNavigation() still uses a global variable $document which is replaced by a parameter passed to the function. All calls of pageNavigation() needs a third parameter with the document.
This commit is contained in:
parent
728760f78a
commit
b4ea1a922d
|
@ -42,7 +42,7 @@ class SeedDMS_View_AddFile extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -50,7 +50,7 @@ class SeedDMS_View_ApproveDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("submit_approval"));
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -208,7 +208,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
$this->folderNavigationBar($extra);
|
||||
break;
|
||||
case "view_document":
|
||||
$this->documentNavigationBar();
|
||||
$this->documentNavigationBar($extra);
|
||||
break;
|
||||
case "my_documents":
|
||||
$this->myDocumentsNavigationBar();
|
||||
|
@ -267,9 +267,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
return;
|
||||
} /* }}} */
|
||||
|
||||
private function documentNavigationBar() { /* {{{ */
|
||||
global $document;
|
||||
|
||||
private function documentNavigationBar($document) { /* {{{ */
|
||||
$accessMode = $document->getAccessMode($this->params['user']);
|
||||
$docid=".php?documentid=" . $document->getID();
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -49,7 +49,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("document_infos"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
$this->contentHeading(getMLText("edit_attributes"));
|
||||
$this->contentContainerStart();
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_EditComment extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_EditDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -41,7 +41,7 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("move_document"));
|
||||
$this->contentContainerStart('warning');
|
||||
?>
|
||||
|
|
|
@ -45,7 +45,7 @@ class SeedDMS_View_OverrideContentStatus extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
$this->contentHeading(getMLText("change_status"));
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class SeedDMS_View_RemoveDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rm_document"));
|
||||
$this->contentContainerStart('warning');
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class SeedDMS_View_RemoveDocumentFile extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rm_file"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class SeedDMS_View_RemoveVersion extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rm_version"));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rm_workflow"));
|
||||
|
||||
$currentstate = $latestContent->getWorkflowState();
|
||||
|
|
|
@ -43,7 +43,7 @@ class SeedDMS_View_ReturnFromSubWorkflow extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("return_from_subworkflow"));
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -49,7 +49,7 @@ class SeedDMS_View_ReviewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("submit_review"));
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rewind_workflow"));
|
||||
|
||||
$currentstate = $latestContent->getWorkflowState();
|
||||
|
|
|
@ -43,7 +43,7 @@ class SeedDMS_View_RunSubWorkflow extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("run_subworkflow"));
|
||||
|
||||
$currentstate = $latestContent->getWorkflowState();
|
||||
|
|
|
@ -40,7 +40,7 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("set_expiry"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("change_assignments"));
|
||||
|
||||
// Retrieve a list of all users and groups that have review / approve privileges.
|
||||
|
|
|
@ -42,7 +42,7 @@ class SeedDMS_View_SetWorkflow extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("set_workflow"));
|
||||
|
||||
$this->contentContainerStart();
|
||||
|
|
|
@ -43,7 +43,7 @@ class SeedDMS_View_TriggerWorkflow extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("trigger_workflow"));
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
|
|
@ -48,7 +48,7 @@ class SeedDMS_View_UpdateDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("update_document"));
|
||||
?>
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document");
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
if ($document->isLocked()) {
|
||||
$lockingUser = $document->getLockingUser();
|
||||
|
|
Loading…
Reference in New Issue
Block a user