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:
Uwe Steinmann 2013-03-08 17:55:14 +01:00
parent 728760f78a
commit b4ea1a922d
25 changed files with 26 additions and 28 deletions

View File

@ -42,7 +42,7 @@ class SeedDMS_View_AddFile extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -50,7 +50,7 @@ class SeedDMS_View_ApproveDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("submit_approval"));
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -208,7 +208,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
$this->folderNavigationBar($extra); $this->folderNavigationBar($extra);
break; break;
case "view_document": case "view_document":
$this->documentNavigationBar(); $this->documentNavigationBar($extra);
break; break;
case "my_documents": case "my_documents":
$this->myDocumentsNavigationBar(); $this->myDocumentsNavigationBar();
@ -267,9 +267,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
return; return;
} /* }}} */ } /* }}} */
private function documentNavigationBar() { /* {{{ */ private function documentNavigationBar($document) { /* {{{ */
global $document;
$accessMode = $document->getAccessMode($this->params['user']); $accessMode = $document->getAccessMode($this->params['user']);
$docid=".php?documentid=" . $document->getID(); $docid=".php?documentid=" . $document->getID();

View File

@ -52,7 +52,7 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
?> ?>

View File

@ -43,7 +43,7 @@ class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -49,7 +49,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("document_infos"));
$this->contentContainerStart(); $this->contentContainerStart();

View File

@ -42,7 +42,7 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("edit_attributes"));
$this->contentContainerStart(); $this->contentContainerStart();

View File

@ -42,7 +42,7 @@ class SeedDMS_View_EditComment extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -42,7 +42,7 @@ class SeedDMS_View_EditDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -41,7 +41,7 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("move_document"));
$this->contentContainerStart('warning'); $this->contentContainerStart('warning');
?> ?>

View File

@ -45,7 +45,7 @@ class SeedDMS_View_OverrideContentStatus extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("change_status"));

View File

@ -40,7 +40,7 @@ class SeedDMS_View_RemoveDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("rm_document"));
$this->contentContainerStart('warning'); $this->contentContainerStart('warning');

View File

@ -41,7 +41,7 @@ class SeedDMS_View_RemoveDocumentFile extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("rm_file"));
$this->contentContainerStart(); $this->contentContainerStart();

View File

@ -41,7 +41,7 @@ class SeedDMS_View_RemoveVersion extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("rm_version"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>

View File

@ -42,7 +42,7 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("rm_workflow"));
$currentstate = $latestContent->getWorkflowState(); $currentstate = $latestContent->getWorkflowState();

View File

@ -43,7 +43,7 @@ class SeedDMS_View_ReturnFromSubWorkflow extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("return_from_subworkflow"));
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -49,7 +49,7 @@ class SeedDMS_View_ReviewDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("submit_review"));
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -42,7 +42,7 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("rewind_workflow"));
$currentstate = $latestContent->getWorkflowState(); $currentstate = $latestContent->getWorkflowState();

View File

@ -43,7 +43,7 @@ class SeedDMS_View_RunSubWorkflow extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("run_subworkflow"));
$currentstate = $latestContent->getWorkflowState(); $currentstate = $latestContent->getWorkflowState();

View File

@ -40,7 +40,7 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("set_expiry"));
$this->contentContainerStart(); $this->contentContainerStart();

View File

@ -46,7 +46,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("change_assignments"));
// Retrieve a list of all users and groups that have review / approve privileges. // Retrieve a list of all users and groups that have review / approve privileges.

View File

@ -42,7 +42,7 @@ class SeedDMS_View_SetWorkflow extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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->contentHeading(getMLText("set_workflow"));
$this->contentContainerStart(); $this->contentContainerStart();

View File

@ -43,7 +43,7 @@ class SeedDMS_View_TriggerWorkflow extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("trigger_workflow"));
?> ?>
<script language="JavaScript"> <script language="JavaScript">

View File

@ -48,7 +48,7 @@ class SeedDMS_View_UpdateDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $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")); $this->contentHeading(getMLText("update_document"));
?> ?>

View File

@ -87,7 +87,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder); $this->globalNavigation($folder);
$this->contentStart(); $this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
if ($document->isLocked()) { if ($document->isLocked()) {
$lockingUser = $document->getLockingUser(); $lockingUser = $document->getLockingUser();