mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
Merge branch 'develop' into hooks
This commit is contained in:
commit
1f73a6150e
10
CHANGELOG
10
CHANGELOG
|
@ -1,7 +1,17 @@
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Changes in version 4.3.0
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
- create preview images for attachted document files
|
||||||
|
- expiration date cannot be set for the version as indicated by the gui.
|
||||||
|
I was always set for the document, but this was not clear from the
|
||||||
|
gui.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 4.2.1
|
Changes in version 4.2.1
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- fixing jumploader upload, added missing file for uploading attachments
|
- fixing jumploader upload, added missing file for uploading attachments
|
||||||
|
- various improvements of user interface
|
||||||
|
- fixed bug when adding individual approver (Core)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 4.2.0
|
Changes in version 4.2.0
|
||||||
|
|
|
@ -523,10 +523,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
* set to S_EXPIRED but the document isn't actually expired.
|
* set to S_EXPIRED but the document isn't actually expired.
|
||||||
* The method will update the document status log database table
|
* The method will update the document status log database table
|
||||||
* if needed.
|
* if needed.
|
||||||
* FIXME: Why does it not set a document to S_EXPIRED if it is
|
|
||||||
* currently in state S_RELEASED
|
|
||||||
* FIXME: some left over reviewers/approvers are in the way if
|
* FIXME: some left over reviewers/approvers are in the way if
|
||||||
* no workflow is set an traditional workflow mode is on. In that
|
* no workflow is set and traditional workflow mode is on. In that
|
||||||
* case the status is set to S_DRAFT_REV or S_DRAFT_APP
|
* case the status is set to S_DRAFT_REV or S_DRAFT_APP
|
||||||
*
|
*
|
||||||
* @return boolean true if status has changed
|
* @return boolean true if status has changed
|
||||||
|
@ -536,7 +534,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if($lc) {
|
if($lc) {
|
||||||
$st=$lc->getStatus();
|
$st=$lc->getStatus();
|
||||||
|
|
||||||
if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP || $st["status"]==S_IN_WORKFLOW) && $this->hasExpired()){
|
if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP || $st["status"]==S_IN_WORKFLOW || $st["status"]==S_RELEASED) && $this->hasExpired()){
|
||||||
return $lc->setStatus(S_EXPIRED,"", $this->getOwner());
|
return $lc->setStatus(S_EXPIRED,"", $this->getOwner());
|
||||||
}
|
}
|
||||||
elseif ($st["status"]==S_EXPIRED && !$this->hasExpired() ){
|
elseif ($st["status"]==S_EXPIRED && !$this->hasExpired() ){
|
||||||
|
@ -2640,7 +2638,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $indstatus || (isset($indstatus["status"]) && $indstatus["status"]!=-2)) {
|
if ( !$indstatus || (isset($indstatus["status"]) && $indstatus["status"]!=-2)) {
|
||||||
// Add the user into the approvers database.
|
// Add the user into the approvers database.
|
||||||
$queryStr = "INSERT INTO `tblDocumentApprovers` (`documentID`, `version`, `type`, `required`) ".
|
$queryStr = "INSERT INTO `tblDocumentApprovers` (`documentID`, `version`, `type`, `required`) ".
|
||||||
"VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '0', '". $userID ."')";
|
"VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '0', '". $userID ."')";
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2013-04-22</date>
|
<date>2013-04-30</date>
|
||||||
<time>09:18:47</time>
|
<time>07:43:29</time>
|
||||||
<version>
|
<version>
|
||||||
<release>4.2.0</release>
|
<release>4.2.1</release>
|
||||||
<api>4.2.0</api>
|
<api>4.2.1</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
- added method SeedDMS_Core_DMS::filterDocumentLinks()
|
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
@ -497,5 +497,21 @@ New release
|
||||||
- stay in sync with seeddms application
|
- stay in sync with seeddms application
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
|
<release>
|
||||||
|
<date>2013-04-22</date>
|
||||||
|
<time>09:18:47</time>
|
||||||
|
<version>
|
||||||
|
<release>4.2.0</release>
|
||||||
|
<api>4.2.0</api>
|
||||||
|
</version>
|
||||||
|
<stability>
|
||||||
|
<release>stable</release>
|
||||||
|
<api>stable</api>
|
||||||
|
</stability>
|
||||||
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
|
<notes>
|
||||||
|
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||||
|
</notes>
|
||||||
|
</release>
|
||||||
</changelog>
|
</changelog>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
@ -50,27 +50,50 @@ class SeedDMS_Preview_Previewer {
|
||||||
$this->width = intval($width);
|
$this->width = intval($width);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPreview($documentcontent, $width=0) { /* {{{ */
|
/**
|
||||||
|
* Retrieve the physical filename of the preview image on disk
|
||||||
|
*
|
||||||
|
* @param object $object document content or document file
|
||||||
|
* @param integer $width width of preview image
|
||||||
|
* @return string file name of preview image
|
||||||
|
*/
|
||||||
|
protected function getFileName($object, $width) { /* }}} */
|
||||||
|
$document = $object->getDocument();
|
||||||
|
$dir = $this->previewDir.'/'.$document->getDir();
|
||||||
|
switch(get_class($object)) {
|
||||||
|
case "SeedDMS_Core_DocumentContent":
|
||||||
|
$target = $dir.'p'.$object->getVersion().'-'.$width.'.png';
|
||||||
|
break;
|
||||||
|
case "SeedDMS_Core_DocumentFile":
|
||||||
|
$target = $dir.'f'.$object->getID().'-'.$width.'.png';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return $target;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
public function createPreview($object, $width=0) { /* {{{ */
|
||||||
if($width == 0)
|
if($width == 0)
|
||||||
$width = $this->width;
|
$width = $this->width;
|
||||||
else
|
else
|
||||||
$width = intval($width);
|
$width = intval($width);
|
||||||
if(!$this->previewDir)
|
if(!$this->previewDir)
|
||||||
return false;
|
return false;
|
||||||
$document = $documentcontent->getDocument();
|
$document = $object->getDocument();
|
||||||
$dir = $this->previewDir.'/'.$document->getDir();
|
$dir = $this->previewDir.'/'.$document->getDir();
|
||||||
if(!is_dir($dir)) {
|
if(!is_dir($dir)) {
|
||||||
if (!SeedDMS_Core_File::makeDir($dir)) {
|
if (!SeedDMS_Core_File::makeDir($dir)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$file = $document->_dms->contentDir.$documentcontent->getPath();
|
$file = $document->_dms->contentDir.$object->getPath();
|
||||||
if(!file_exists($file))
|
if(!file_exists($file))
|
||||||
return false;
|
return false;
|
||||||
$target = $dir.'p'.$documentcontent->getVersion().'-'.$width.'.png';
|
$target = $this->getFileName($object, $width);
|
||||||
if(!file_exists($target)) {
|
if($target !== false && !file_exists($target)) {
|
||||||
$cmd = '';
|
$cmd = '';
|
||||||
switch($documentcontent->getMimeType()) {
|
switch($object->getMimeType()) {
|
||||||
case "image/png":
|
case "image/png":
|
||||||
case "image/gif":
|
case "image/gif":
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
|
@ -89,46 +112,43 @@ class SeedDMS_Preview_Previewer {
|
||||||
|
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function hasPreview($documentcontent, $width=0) { /* {{{ */
|
public function hasPreview($object, $width=0) { /* {{{ */
|
||||||
if($width == 0)
|
if($width == 0)
|
||||||
$width = $this->width;
|
$width = $this->width;
|
||||||
else
|
else
|
||||||
$width = intval($width);
|
$width = intval($width);
|
||||||
if(!$this->previewDir)
|
if(!$this->previewDir)
|
||||||
return false;
|
return false;
|
||||||
$document = $documentcontent->getDocument();
|
$target = $this->getFileName($object, $width);
|
||||||
$dir = $this->previewDir.'/'.$document->getDir();
|
if($target && file_exists($target)) {
|
||||||
$target = $dir.'p'.$documentcontent->getVersion().'-'.$width.'.png';
|
|
||||||
if(file_exists($target)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getPreview($documentcontent, $width=0) { /* {{{ */
|
public function getPreview($object, $width=0) { /* {{{ */
|
||||||
if($width == 0)
|
if($width == 0)
|
||||||
$width = $this->width;
|
$width = $this->width;
|
||||||
else
|
else
|
||||||
$width = intval($width);
|
$width = intval($width);
|
||||||
if(!$this->previewDir)
|
if(!$this->previewDir)
|
||||||
return false;
|
return false;
|
||||||
$document = $documentcontent->getDocument();
|
|
||||||
$dir = $this->previewDir.'/'.$document->getDir();
|
$target = $this->getFileName($object, $width);
|
||||||
$target = $dir.'p'.$documentcontent->getVersion().'-'.$width.'.png';
|
if($target && file_exists($target)) {
|
||||||
if(file_exists($target)) {
|
|
||||||
readfile($target);
|
readfile($target);
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function deletePreview($document, $documentcontent) { /* {{{ */
|
public function deletePreview($document, $object, $width=0) { /* {{{ */
|
||||||
if($width == 0)
|
if($width == 0)
|
||||||
$width = $this->width;
|
$width = $this->width;
|
||||||
else
|
else
|
||||||
$width = intval($width);
|
$width = intval($width);
|
||||||
if(!$this->previewDir)
|
if(!$this->previewDir)
|
||||||
return false;
|
return false;
|
||||||
$dir = $this->previewDir.'/'.$document->getDir();
|
|
||||||
$target = $dir.'p'.$documentcontent->getVersion().'-'.$width.'.png';
|
$target = $this->getFileName($object, $width);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2012-11-20</date>
|
<date>2013-04-29</date>
|
||||||
<time>08:05:38</time>
|
<time>19:34:07</time>
|
||||||
<version>
|
<version>
|
||||||
<release>1.0.0</release>
|
<release>1.1.0</release>
|
||||||
<api>1.0.0</api>
|
<api>1.1.0</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
initial version
|
preview image can also be created from a document file (SeedDMS_Core_DocumentFile)
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
@ -52,6 +52,20 @@ initial version
|
||||||
<phprelease />
|
<phprelease />
|
||||||
<changelog>
|
<changelog>
|
||||||
<release>
|
<release>
|
||||||
|
<date>2012-11-20</date>
|
||||||
|
<time>08:05:38</time>
|
||||||
|
<version>
|
||||||
|
<release>1.0.0</release>
|
||||||
|
<api>1.0.0</api>
|
||||||
|
</version>
|
||||||
|
<stability>
|
||||||
|
<release>stable</release>
|
||||||
|
<api>stable</api>
|
||||||
|
</stability>
|
||||||
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
|
<notes>
|
||||||
|
initial version
|
||||||
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
</changelog>
|
</changelog>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
@ -129,16 +129,13 @@ class SeedDMS_AccessOperation {
|
||||||
* Check if expiration date may be set
|
* Check if expiration date may be set
|
||||||
*
|
*
|
||||||
* This check can only be done for documents. Setting the documents
|
* This check can only be done for documents. Setting the documents
|
||||||
* expiration date is only allowed if version modification is turned on in
|
* expiration date is only allowed if the document has not been obsoleted.
|
||||||
* the settings and the document has not been obsoleted.
|
|
||||||
* The admin may set the expiration date even if is
|
|
||||||
* disallowed in the settings.
|
|
||||||
*/
|
*/
|
||||||
function maySetExpires() { /* {{{ */
|
function maySetExpires() { /* {{{ */
|
||||||
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||||
$latestContent = $this->obj->getLatestContent();
|
$latestContent = $this->obj->getLatestContent();
|
||||||
$status = $latestContent->getStatus();
|
$status = $latestContent->getStatus();
|
||||||
if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) {
|
if ((($this->obj->getAccessMode($this->user) == M_ALL) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ function formatted_size($size_bytes) { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getReadableDate($timestamp) {
|
function getReadableDate($timestamp) {
|
||||||
return date("d.m.Y", $timestamp);
|
return date("d/m/Y", $timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLongReadableDate($timestamp) {
|
function getLongReadableDate($timestamp) {
|
||||||
|
|
|
@ -234,7 +234,7 @@ $text = array(
|
||||||
'edit_existing_notify' => "Benachrichtigungen bearbeiten",
|
'edit_existing_notify' => "Benachrichtigungen bearbeiten",
|
||||||
'edit_folder_access' => "Zugriffsrechte bearbeiten",
|
'edit_folder_access' => "Zugriffsrechte bearbeiten",
|
||||||
'edit_folder_notify' => "Ordner Benachrichtigungen bearbeiten",
|
'edit_folder_notify' => "Ordner Benachrichtigungen bearbeiten",
|
||||||
'edit_folder_props' => "Ordner bearbeiten",
|
'edit_folder_props' => "Bearbeiten",
|
||||||
'edit_group' => "Gruppe bearbeiten",
|
'edit_group' => "Gruppe bearbeiten",
|
||||||
'edit_user_details' => "Benutzerdetails bearbeiten",
|
'edit_user_details' => "Benutzerdetails bearbeiten",
|
||||||
'edit_user' => "Benutzer bearbeiten",
|
'edit_user' => "Benutzer bearbeiten",
|
||||||
|
@ -395,7 +395,7 @@ $text = array(
|
||||||
'month_view' => "Monatsansicht",
|
'month_view' => "Monatsansicht",
|
||||||
'monthly' => "monatlich",
|
'monthly' => "monatlich",
|
||||||
'move_document' => "Verschieben",
|
'move_document' => "Verschieben",
|
||||||
'move_folder' => "Ordner verschieben",
|
'move_folder' => "Verschieben",
|
||||||
'move' => "Verschieben",
|
'move' => "Verschieben",
|
||||||
'my_account' => "Mein Profil",
|
'my_account' => "Mein Profil",
|
||||||
'my_documents' => "Meine Dokumente",
|
'my_documents' => "Meine Dokumente",
|
||||||
|
@ -511,7 +511,7 @@ $text = array(
|
||||||
'rm_document' => "Löschen",
|
'rm_document' => "Löschen",
|
||||||
'rm_document_category' => "Lösche Kategorie",
|
'rm_document_category' => "Lösche Kategorie",
|
||||||
'rm_file' => "Datei Löschen",
|
'rm_file' => "Datei Löschen",
|
||||||
'rm_folder' => "Ordner löschen",
|
'rm_folder' => "Löschen",
|
||||||
'rm_from_clipboard' => "Aus Zwischenablage löschen",
|
'rm_from_clipboard' => "Aus Zwischenablage löschen",
|
||||||
'rm_group' => "Diese Gruppe löschen",
|
'rm_group' => "Diese Gruppe löschen",
|
||||||
'rm_user' => "Diesen Benutzer löschen",
|
'rm_user' => "Diesen Benutzer löschen",
|
||||||
|
@ -768,7 +768,7 @@ $text = array(
|
||||||
'settings_viewOnlineFileTypes' => "Dateitypen für Online-Ansicht",
|
'settings_viewOnlineFileTypes' => "Dateitypen für Online-Ansicht",
|
||||||
'settings_workflowMode_desc' => "Der erweiterte Workflow-Modes erlaubt es eigene Workflows zu erstellen.",
|
'settings_workflowMode_desc' => "Der erweiterte Workflow-Modes erlaubt es eigene Workflows zu erstellen.",
|
||||||
'settings_workflowMode' => "Workflow mode",
|
'settings_workflowMode' => "Workflow mode",
|
||||||
'settings_workflowMode_valtraditional' => "traditional",
|
'settings_workflowMode_valtraditional' => "traditionell",
|
||||||
'settings_workflowMode_valadvanced' => "erweitert",
|
'settings_workflowMode_valadvanced' => "erweitert",
|
||||||
'settings_zendframework' => "Zend Framework",
|
'settings_zendframework' => "Zend Framework",
|
||||||
'signed_in_as' => "Angemeldet als",
|
'signed_in_as' => "Angemeldet als",
|
||||||
|
@ -827,7 +827,7 @@ $text = array(
|
||||||
'update_info' => "Informationen zur Aktualisierung",
|
'update_info' => "Informationen zur Aktualisierung",
|
||||||
'update_locked_msg' => "Dieses Dokument wurde gesperrt<p>Die Sperrung wurde von <a href=\"mailto:[email]\">[username]</a> eingerichtet.<br>",
|
'update_locked_msg' => "Dieses Dokument wurde gesperrt<p>Die Sperrung wurde von <a href=\"mailto:[email]\">[username]</a> eingerichtet.<br>",
|
||||||
'update_reviewers' => "Liste der Prüfer aktualisieren",
|
'update_reviewers' => "Liste der Prüfer aktualisieren",
|
||||||
'update' => "aktualisieren",
|
'update' => "Aktualisieren",
|
||||||
'uploaded_by' => "Hochgeladen durch",
|
'uploaded_by' => "Hochgeladen durch",
|
||||||
'uploading_failed' => "Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.",
|
'uploading_failed' => "Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.",
|
||||||
'uploading_zerosize' => "Versuch eine leere Datei hochzuladen. Vorgang wird abgebrochen.",
|
'uploading_zerosize' => "Versuch eine leere Datei hochzuladen. Vorgang wird abgebrochen.",
|
||||||
|
|
|
@ -76,7 +76,15 @@ if (!is_numeric($sequence)) {
|
||||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence"));
|
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$expires = (isset($_POST["expires"]) && $_POST["expires"] == "true") ? mktime(0,0,0, intval($_POST["expmonth"]), intval($_POST["expday"]), intval($_POST["expyear"])) : false;
|
$expires = false;
|
||||||
|
if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
|
||||||
|
if($_POST["expdate"]) {
|
||||||
|
$tmp = explode('-', $_POST["expdate"]);
|
||||||
|
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
|
||||||
|
} else {
|
||||||
|
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the list of reviewers and approvers for this document.
|
// Get the list of reviewers and approvers for this document.
|
||||||
$reviewers = array();
|
$reviewers = array();
|
||||||
|
|
|
@ -161,6 +161,41 @@ if (($oldcomment = $document->getComment()) != $comment) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$expires = false;
|
||||||
|
if ($_POST["expires"] != "false") {
|
||||||
|
if($_POST["expdate"]) {
|
||||||
|
$tmp = explode('-', $_POST["expdate"]);
|
||||||
|
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
|
||||||
|
} else {
|
||||||
|
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($expires) {
|
||||||
|
if($document->setExpires($expires)) {
|
||||||
|
if($notifier) {
|
||||||
|
$notifyList = $document->getNotifyList();
|
||||||
|
$folder = $document->getFolder();
|
||||||
|
// Send notification to subscribers.
|
||||||
|
$subject = "expiry_changed_email_subject";
|
||||||
|
$message = "expiry_changed_email_body";
|
||||||
|
$params = array();
|
||||||
|
$params['name'] = $document->getName();
|
||||||
|
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||||
|
$params['username'] = $user->getFullName();
|
||||||
|
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||||
|
$params['sitename'] = $settings->_siteName;
|
||||||
|
$params['http_root'] = $settings->_httpRoot;
|
||||||
|
$notifier->toList($user, $notifyList["users"], $subject, $message, $params);
|
||||||
|
foreach ($notifyList["groups"] as $grp) {
|
||||||
|
$notifier->toGroup($user, $grp, $subject, $message, $params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (($oldkeywords = $document->getKeywords()) != $keywords) {
|
if (($oldkeywords = $document->getKeywords()) != $keywords) {
|
||||||
if($document->setKeywords($keywords)) {
|
if($document->setKeywords($keywords)) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,18 +46,26 @@ if ($document->getAccessMode($user) < M_READ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($_GET['version'])) {
|
||||||
$version = $_GET["version"];
|
$version = $_GET["version"];
|
||||||
if (!isset($version) || !is_numeric($version) || intval($version)<1) {
|
if (!is_numeric($version) || intval($version)<1)
|
||||||
|
exit;
|
||||||
|
$object = $document->getContentByVersion($version);
|
||||||
|
} elseif(isset($_GET['file'])) {
|
||||||
|
$file = $_GET['file'];
|
||||||
|
if (!is_numeric($file) || intval($file)<1)
|
||||||
|
exit;
|
||||||
|
$object = $document->getDocumentFile($file);
|
||||||
|
} else {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $document->getContentByVersion($version);
|
if (!is_object($object)) {
|
||||||
if (!is_object($content)) {
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
|
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
|
||||||
header('Content-Type: image/png');
|
header('Content-Type: image/png');
|
||||||
$previewer->getPreview($content);
|
$previewer->getPreview($object);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -218,9 +218,9 @@ if ($_FILES['userfile']['error'] == 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$expires = false;
|
$expires = false;
|
||||||
if ($_POST["expires"] != "false") {
|
if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
|
||||||
if($_POST["expdate"]) {
|
if($_POST["expdate"]) {
|
||||||
$tmp = explode('/', $_POST["expdate"]);
|
$tmp = explode('-', $_POST["expdate"]);
|
||||||
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
|
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
|
||||||
} else {
|
} else {
|
||||||
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
|
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
|
||||||
|
|
|
@ -2,6 +2,14 @@ body { /* Add top padding for full-width layout */
|
||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
}
|
}
|
||||||
img.mimeicon {
|
img.mimeicon {
|
||||||
|
-moz-border-bottom-colors: none;
|
||||||
|
-moz-border-image: none;
|
||||||
|
-moz-border-left-colors: none;
|
||||||
|
-moz-border-right-colors: none;
|
||||||
|
-moz-border-top-colors: none;
|
||||||
|
border-color: #CCCCCC #AAAAAA #999999 #CCCCCC;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px 2px 2px 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-action a {
|
.list-action a {
|
||||||
|
@ -16,6 +24,17 @@ img.mimeicon {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.actions li a:hover > i {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
ul.actions li a > i {
|
||||||
|
color: #000;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
ul.actions li a.btn > i {
|
||||||
|
font-size: 200%;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.nav-tabs > li {
|
.nav-tabs > li {
|
||||||
float:none;
|
float:none;
|
||||||
|
|
|
@ -71,6 +71,11 @@ function checkForm()
|
||||||
<?php
|
<?php
|
||||||
$this->contentHeading(getMLText("edit_document_props"));
|
$this->contentHeading(getMLText("edit_document_props"));
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
|
if($document->expires())
|
||||||
|
$expdate = date('d-m-Y', $document->getExpires());
|
||||||
|
else
|
||||||
|
$expdate = '';
|
||||||
?>
|
?>
|
||||||
<form action="../op/op.EditDocument.php" name="form1" onsubmit="return checkForm();" method="post">
|
<form action="../op/op.EditDocument.php" name="form1" onsubmit="return checkForm();" method="post">
|
||||||
<input type="hidden" name="documentid" value="<?php echo $document->getID() ?>">
|
<input type="hidden" name="documentid" value="<?php echo $document->getID() ?>">
|
||||||
|
@ -94,7 +99,7 @@ function checkForm()
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php printMLText("categories")?>:</td>
|
<td><?php printMLText("categories")?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_reviewers'); ?>">
|
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>">
|
||||||
<?php
|
<?php
|
||||||
$categories = $dms->getDocumentCategories();
|
$categories = $dms->getDocumentCategories();
|
||||||
foreach($categories as $category) {
|
foreach($categories as $category) {
|
||||||
|
@ -107,6 +112,18 @@ function checkForm()
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php printMLText("expires");?>:</td>
|
||||||
|
<td>
|
||||||
|
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||||
|
<input class="span3" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>">
|
||||||
|
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||||
|
</span>
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="expires" value="false"<?php if (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if ($folder->getAccessMode($user) > M_READ) {
|
if ($folder->getAccessMode($user) > M_READ) {
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
|
|
|
@ -122,6 +122,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
if($needwkflaction) {
|
if($needwkflaction) {
|
||||||
$this->infoMsg(getMLText('needs_workflow_action'));
|
$this->infoMsg(getMLText('needs_workflow_action'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$status = $latestContent->getStatus();
|
||||||
|
$reviewStatus = $latestContent->getReviewStatus();
|
||||||
|
$approvalStatus = $latestContent->getApprovalStatus();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<ul class="nav nav-tabs" id="docinfotab">
|
<ul class="nav nav-tabs" id="docinfotab">
|
||||||
<li class="active"><a data-target="#docinfo" data-toggle="tab"><?php printMLText('document_infos'); ?> / <?php printMLText('current_version'); ?></a></li>
|
<li class="active"><a data-target="#docinfo" data-toggle="tab"><?php printMLText('document_infos'); ?> / <?php printMLText('current_version'); ?></a></li>
|
||||||
|
@ -130,9 +135,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if($workflowmode == 'traditional') {
|
if($workflowmode == 'traditional') {
|
||||||
|
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||||
|
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||||
?>
|
?>
|
||||||
<li><a data-target="#revapp" data-toggle="tab"><?php echo getMLText('reviewers')."/".getMLText('approvers'); ?></a></li>
|
<li><a data-target="#revapp" data-toggle="tab"><?php echo getMLText('reviewers')."/".getMLText('approvers'); ?></a></li>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if($workflow) {
|
if($workflow) {
|
||||||
?>
|
?>
|
||||||
|
@ -214,6 +222,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
<td><?php print getLongReadableDate($document->getDate()); ?></td>
|
<td><?php print getLongReadableDate($document->getDate()); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
if($document->expires()) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php printMLText("expires");?>:</td>
|
||||||
|
<td><?php print getReadableDate($document->getExpires()); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
if($document->getKeywords()) {
|
if($document->getKeywords()) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -267,10 +283,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$status = $latestContent->getStatus();
|
|
||||||
$reviewStatus = $latestContent->getReviewStatus();
|
|
||||||
$approvalStatus = $latestContent->getApprovalStatus();
|
|
||||||
|
|
||||||
// verify if file exists
|
// verify if file exists
|
||||||
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
||||||
|
|
||||||
|
@ -279,35 +291,44 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<table class=\"table\">";
|
print "<table class=\"table\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
print "<th width='10%'></th>\n";
|
print "<th width='10%'></th>\n";
|
||||||
print "<th width='10%'>".getMLText("version")."</th>\n";
|
print "<th width='30%'>".getMLText("file")."</th>\n";
|
||||||
print "<th width='20%'>".getMLText("file")."</th>\n";
|
|
||||||
print "<th width='25%'>".getMLText("comment")."</th>\n";
|
print "<th width='25%'>".getMLText("comment")."</th>\n";
|
||||||
print "<th width='15%'>".getMLText("status")."</th>\n";
|
print "<th width='15%'>".getMLText("status")."</th>\n";
|
||||||
print "<th width='20%'></th>\n";
|
print "<th width='20%'></th>\n";
|
||||||
print "</tr></thead><tbody>\n";
|
print "</tr></thead><tbody>\n";
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
print "<td><ul class=\"unstyled\">";
|
print "<td>";
|
||||||
|
/*
|
||||||
|
print "<ul class=\"actions unstyled\">";
|
||||||
|
|
||||||
if ($file_exists){
|
if ($file_exists){
|
||||||
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-download\"></i> ".getMLText("download")."</a></li>";
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\" class=\"btn btn-medium\"><i class=\"icon-download\"></i><br />".getMLText("download")."</a></li>";
|
||||||
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
||||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\"><i class=\"icon-star\"></i> " . getMLText("view_online") . "</a></li>";
|
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\" class=\"btn btn-medium\"><i class=\"icon-star\"></i><br />" . getMLText("view_online") . "</a></li>";
|
||||||
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></li>";
|
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></li>";
|
||||||
|
|
||||||
print "</ul>";
|
print "</ul>";
|
||||||
|
*/
|
||||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 100);
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, 100);
|
||||||
$previewer->createPreview($latestContent);
|
$previewer->createPreview($latestContent);
|
||||||
|
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
||||||
|
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\">";
|
||||||
|
else
|
||||||
|
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\">";
|
||||||
if($previewer->hasPreview($latestContent)) {
|
if($previewer->hasPreview($latestContent)) {
|
||||||
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=100\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=100\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||||
}
|
}
|
||||||
|
print "</a>";
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "<td>".$latestContent->getVersion()."</td>\n";
|
|
||||||
|
|
||||||
print "<td><ul class=\"unstyled\">\n";
|
print "<td><ul class=\"actions unstyled\">\n";
|
||||||
print "<li>".$latestContent->getOriginalFileName() ."</li>\n";
|
print "<li>".$latestContent->getOriginalFileName() ."</li>\n";
|
||||||
|
print "<li>".getMLText('version').": ".$latestContent->getVersion()."</li>\n";
|
||||||
|
|
||||||
if ($file_exists)
|
if ($file_exists)
|
||||||
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) ." ".htmlspecialchars($latestContent->getMimeType())."</li>";
|
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."</li>";
|
||||||
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||||
|
|
||||||
$updatingUser = $latestContent->getUser();
|
$updatingUser = $latestContent->getUser();
|
||||||
|
@ -315,7 +336,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<li>".getLongReadableDate($latestContent->getDate())."</li>";
|
print "<li>".getLongReadableDate($latestContent->getDate())."</li>";
|
||||||
|
|
||||||
print "</ul>\n";
|
print "</ul>\n";
|
||||||
print "<ul class=\"unstyled\">\n";
|
print "<ul class=\"actions unstyled\">\n";
|
||||||
$attributes = $latestContent->getAttributes();
|
$attributes = $latestContent->getAttributes();
|
||||||
if($attributes) {
|
if($attributes) {
|
||||||
foreach($attributes as $attribute) {
|
foreach($attributes as $attribute) {
|
||||||
|
@ -336,7 +357,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
print "<td>";
|
print "<td>";
|
||||||
|
|
||||||
print "<ul class=\"unstyled\">";
|
print "<ul class=\"unstyled actions\">";
|
||||||
|
if ($file_exists){
|
||||||
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-download\"></i>".getMLText("download")."</a></li>";
|
||||||
|
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
||||||
|
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=". $latestContent->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a></li>";
|
||||||
|
}
|
||||||
|
print "</ul>";
|
||||||
|
print "<ul class=\"unstyled actions\">";
|
||||||
/* Only admin has the right to remove version in any case or a regular
|
/* Only admin has the right to remove version in any case or a regular
|
||||||
* user if enableVersionDeletion is on
|
* user if enableVersionDeletion is on
|
||||||
*/
|
*/
|
||||||
|
@ -349,7 +377,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
if($workflowmode == 'traditional') {
|
if($workflowmode == 'traditional') {
|
||||||
// Allow changing reviewers/approvals only if not reviewed
|
// Allow changing reviewers/approvals only if not reviewed
|
||||||
if($accessop->maySetReviewersApprovers()) {
|
if($accessop->maySetReviewersApprovers()) {
|
||||||
print "<li><a href='../out/out.SetReviewersApprovers.php?documentid=".$documentid."&version=".$latestContent->getVersion()."'>".getMLText("change_assignments")."</a></li>";
|
print "<li><a href='../out/out.SetReviewersApprovers.php?documentid=".$documentid."&version=".$latestContent->getVersion()."'><i class=\"icon-edit\"></i>".getMLText("change_assignments")."</a></li>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($accessop->maySetWorkflow()) {
|
if($accessop->maySetWorkflow()) {
|
||||||
|
@ -358,9 +386,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if($accessop->maySetExpires()) {
|
if($accessop->maySetExpires()) {
|
||||||
print "<li><a href='../out/out.SetExpires.php?documentid=".$documentid."'><i class=\"icon-time\"></i>".getMLText("set_expiry")."</a></li>";
|
print "<li><a href='../out/out.SetExpires.php?documentid=".$documentid."'><i class=\"icon-time\"></i>".getMLText("set_expiry")."</a></li>";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if($accessop->mayEditComment()) {
|
if($accessop->mayEditComment()) {
|
||||||
print "<li><a href=\"out.EditComment.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-comment\"></i>".getMLText("edit_comment")."</a></li>";
|
print "<li><a href=\"out.EditComment.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-comment\"></i>".getMLText("edit_comment")."</a></li>";
|
||||||
}
|
}
|
||||||
|
@ -368,7 +398,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<li><a href=\"out.EditAttributes.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-edit\"></i>".getMLText("edit_attributes")."</a></li>";
|
print "<li><a href=\"out.EditAttributes.php?documentid=".$documentid."&version=".$latestContent->getVersion()."\"><i class=\"icon-edit\"></i>".getMLText("edit_attributes")."</a></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&vfile=1\"><i class=\"icon-download\"></i> ".getMLText("versioning_info")."</a></li>";
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&vfile=1\"><i class=\"icon-info-sign\"></i>".getMLText("versioning_info")."</a></li>";
|
||||||
|
|
||||||
print "</ul>";
|
print "</ul>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
@ -418,6 +448,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if($workflowmode == 'traditional') {
|
if($workflowmode == 'traditional') {
|
||||||
|
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||||
|
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||||
?>
|
?>
|
||||||
<div class="tab-pane" id="revapp">
|
<div class="tab-pane" id="revapp">
|
||||||
<?php
|
<?php
|
||||||
|
@ -448,7 +480,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$reqName = getMLText("unknown_user")." '".$r["required"]."'";
|
$reqName = getMLText("unknown_user")." '".$r["required"]."'";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$reqName = htmlspecialchars($required->getFullName());
|
$reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")");
|
||||||
}
|
}
|
||||||
if($r["required"] == $user->getId())
|
if($r["required"] == $user->getId())
|
||||||
$is_reviewer = true;
|
$is_reviewer = true;
|
||||||
|
@ -470,7 +502,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<td><ul class=\"unstyled\"><li>".$r["date"]."</li>";
|
print "<td><ul class=\"unstyled\"><li>".$r["date"]."</li>";
|
||||||
/* $updateUser is the user who has done the review */
|
/* $updateUser is the user who has done the review */
|
||||||
$updateUser = $dms->getUser($r["userID"]);
|
$updateUser = $dms->getUser($r["userID"]);
|
||||||
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$r["userID"]."'")."</li></ul></td>";
|
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."</li></ul></td>";
|
||||||
print "<td>".htmlspecialchars($r["comment"])."</td>\n";
|
print "<td>".htmlspecialchars($r["comment"])."</td>\n";
|
||||||
print "<td>".getReviewStatusText($r["status"])."</td>\n";
|
print "<td>".getReviewStatusText($r["status"])."</td>\n";
|
||||||
print "<td><ul class=\"unstyled\">";
|
print "<td><ul class=\"unstyled\">";
|
||||||
|
@ -512,7 +544,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$reqName = getMLText("unknown_user")." '".$a["required"]."'";
|
$reqName = getMLText("unknown_user")." '".$a["required"]."'";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$reqName = htmlspecialchars($required->getFullName());
|
$reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")");
|
||||||
}
|
}
|
||||||
if($a["required"] == $user->getId())
|
if($a["required"] == $user->getId())
|
||||||
$is_approver = true;
|
$is_approver = true;
|
||||||
|
@ -534,7 +566,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<td><ul class=\"unstyled\"><li>".$a["date"]."</li>";
|
print "<td><ul class=\"unstyled\"><li>".$a["date"]."</li>";
|
||||||
/* $updateUser is the user who has done the approval */
|
/* $updateUser is the user who has done the approval */
|
||||||
$updateUser = $dms->getUser($a["userID"]);
|
$updateUser = $dms->getUser($a["userID"]);
|
||||||
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."</li></ul></td>";
|
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$a["userID"]."'")."</li></ul></td>";
|
||||||
print "<td>".htmlspecialchars($a["comment"])."</td>\n";
|
print "<td>".htmlspecialchars($a["comment"])."</td>\n";
|
||||||
print "<td>".getApprovalStatusText($a["status"])."</td>\n";
|
print "<td>".getApprovalStatusText($a["status"])."</td>\n";
|
||||||
print "<td><ul class=\"unstyled\">";
|
print "<td><ul class=\"unstyled\">";
|
||||||
|
@ -558,6 +590,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if($workflow) {
|
if($workflow) {
|
||||||
?>
|
?>
|
||||||
|
@ -747,8 +780,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<table class=\"table\">";
|
print "<table class=\"table\">";
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
print "<th width='10%'></th>\n";
|
print "<th width='10%'></th>\n";
|
||||||
print "<th width='10%'>".getMLText("version")."</th>\n";
|
print "<th width='30%'>".getMLText("file")."</th>\n";
|
||||||
print "<th width='20%'>".getMLText("file")."</th>\n";
|
|
||||||
print "<th width='25%'>".getMLText("comment")."</th>\n";
|
print "<th width='25%'>".getMLText("comment")."</th>\n";
|
||||||
print "<th width='15%'>".getMLText("status")."</th>\n";
|
print "<th width='15%'>".getMLText("status")."</th>\n";
|
||||||
print "<th width='20%'></th>\n";
|
print "<th width='20%'></th>\n";
|
||||||
|
@ -764,23 +796,33 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$file_exists=file_exists($dms->contentDir . $version->getPath());
|
$file_exists=file_exists($dms->contentDir . $version->getPath());
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
print "<td nowrap><ul class=\"unstyled\">";
|
print "<td nowrap>";
|
||||||
|
/*
|
||||||
|
print "<ul class=\"actions unstyled\">";
|
||||||
if ($file_exists){
|
if ($file_exists){
|
||||||
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-download\"></i>".getMLText("download")."</a>";
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-download\"></i>".getMLText("download")."</a>";
|
||||||
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
|
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
|
||||||
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
|
|
||||||
print "</ul>";
|
print "</ul>";
|
||||||
|
*/
|
||||||
|
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||||
|
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\">";
|
||||||
|
else
|
||||||
|
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\">";
|
||||||
$previewer->createPreview($version);
|
$previewer->createPreview($version);
|
||||||
if($previewer->hasPreview($version)) {
|
if($previewer->hasPreview($version)) {
|
||||||
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=100\" title=\"".htmlspecialchars($version->getMimeType())."\">");
|
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=100\" title=\"".htmlspecialchars($version->getMimeType())."\">");
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||||
}
|
}
|
||||||
|
print "</a>\n";
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "<td>".$version->getVersion()."</td>\n";
|
|
||||||
print "<td><ul class=\"unstyled\">\n";
|
print "<td><ul class=\"unstyled\">\n";
|
||||||
print "<li>".$version->getOriginalFileName()."</li>\n";
|
print "<li>".$version->getOriginalFileName()."</li>\n";
|
||||||
if ($file_exists) print "<li>". SeedDMS_Core_File::format_filesize($version->getFileSize()) ." ".htmlspecialchars($version->getMimeType())."</li>";
|
print "<li>".getMLText('version').": ".$version->getVersion()."</li>\n";
|
||||||
|
if ($file_exists) print "<li>". SeedDMS_Core_File::format_filesize($version->getFileSize()) .", ".htmlspecialchars($version->getMimeType())."</li>";
|
||||||
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||||
$updatingUser = $version->getUser();
|
$updatingUser = $version->getUser();
|
||||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
|
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
|
||||||
|
@ -798,7 +840,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<td>".htmlspecialchars($version->getComment())."</td>";
|
print "<td>".htmlspecialchars($version->getComment())."</td>";
|
||||||
print "<td>".getOverallStatusText($vstat["status"])."</td>";
|
print "<td>".getOverallStatusText($vstat["status"])."</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print "<ul class=\"unstyled\">";
|
print "<ul class=\"actions unstyled\">";
|
||||||
|
if ($file_exists){
|
||||||
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-download\"></i>".getMLText("download")."</a>";
|
||||||
|
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||||
|
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
|
||||||
|
}
|
||||||
|
print "</ul>";
|
||||||
|
print "<ul class=\"actions unstyled\">";
|
||||||
/* Only admin has the right to remove version in any case or a regular
|
/* Only admin has the right to remove version in any case or a regular
|
||||||
* user if enableVersionDeletion is on
|
* user if enableVersionDeletion is on
|
||||||
*/
|
*/
|
||||||
|
@ -806,7 +855,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<li><a href=\"out.RemoveVersion.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-remove\"></i>".getMLText("rm_version")."</a></li>";
|
print "<li><a href=\"out.RemoveVersion.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-remove\"></i>".getMLText("rm_version")."</a></li>";
|
||||||
}
|
}
|
||||||
if($accessop->mayEditComment()) {
|
if($accessop->mayEditComment()) {
|
||||||
print "<li><a href=\"out.EditComment.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><i class=\"icon-edit\"></i> ".getMLText("edit_comment")."</a></li>";
|
print "<li><a href=\"out.EditComment.php?documentid=".$document->getID()."&version=".$version->getVersion()."\"><i class=\"icon-comment\"></i>".getMLText("edit_comment")."</a></li>";
|
||||||
}
|
}
|
||||||
if($accessop->mayEditAttributes()) {
|
if($accessop->mayEditAttributes()) {
|
||||||
print "<li><a href=\"out.EditAttributes.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."\"><i class=\"icon-edit\"></i>".getMLText("edit_attributes")."</a></li>";
|
print "<li><a href=\"out.EditAttributes.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."\"><i class=\"icon-edit\"></i>".getMLText("edit_attributes")."</a></li>";
|
||||||
|
@ -844,18 +893,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$responsibleUser = $file->getUser();
|
$responsibleUser = $file->getUser();
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td><ul class=\"unstyled\">";
|
print "<td>";
|
||||||
if ($file_exists) {
|
$previewer->createPreview($file);
|
||||||
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><i class=\"icon-download\"></i> ".htmlspecialchars($file->getName())."</a>";
|
if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes))
|
||||||
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
|
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\">";
|
||||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><i class=\"icon-star\"></i> " . getMLText("view_online") . "</a></li>";
|
else
|
||||||
} else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
|
print "<a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\">";
|
||||||
print "</ul></td>";
|
if($previewer->hasPreview($file)) {
|
||||||
|
print("<img class=\"mimeicon\" width=\"100\" src=\"../op/op.Preview.php?documentid=".$document->getID()."&file=".$file->getID()."&width=100\" title=\"".htmlspecialchars($file->getMimeType())."\">");
|
||||||
|
} else {
|
||||||
|
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
|
||||||
|
}
|
||||||
|
print "</a>";
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
print "<td><ul class=\"unstyled\">\n";
|
print "<td><ul class=\"unstyled\">\n";
|
||||||
print "<li>".$file->getOriginalFileName() ."</li>\n";
|
print "<li>".htmlspecialchars($file->getName())."</li>\n";
|
||||||
|
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
||||||
if ($file_exists)
|
if ($file_exists)
|
||||||
print "<li>". filesize($dms->contentDir . $file->getPath()) ." bytes ".htmlspecialchars($file->getMimeType())."</li>";
|
print "<li>".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."</li>";
|
||||||
else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
else print "<li>".htmlspecialchars($file->getMimeType())." - <span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||||
|
|
||||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$responsibleUser->getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."</a></li>";
|
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$responsibleUser->getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."</a></li>";
|
||||||
|
@ -863,10 +919,16 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
print "<td>".htmlspecialchars($file->getComment())."</td>";
|
print "<td>".htmlspecialchars($file->getComment())."</td>";
|
||||||
|
|
||||||
print "<td><span class=\"actions\">";
|
print "<td><ul class=\"unstyled actions\">";
|
||||||
|
if ($file_exists) {
|
||||||
|
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><i class=\"icon-download\"></i>".getMLText('download')."</a>";
|
||||||
|
if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes))
|
||||||
|
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a></li>";
|
||||||
|
} else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
|
||||||
|
echo "</ul><ul class=\"unstyled actions\">";
|
||||||
if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID()))
|
if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID()))
|
||||||
print "<form action=\"../out/out.RemoveDocumentFile.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"fileid\" value=\"".$file->getID()."\" /><button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button></form>";
|
print "<li><a href=\"out.RemoveDocumentFile.php?documentid=".$documentid."&fileid=".$file->getID()."\"><i class=\"icon-remove\"></i>".getMLText("delete")."</a></li>";
|
||||||
print "</span></td>";
|
print "</ul></td>";
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
@ -891,7 +953,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "<th>".getMLText("comment")."</th>\n";
|
print "<th>".getMLText("comment")."</th>\n";
|
||||||
print "<th>".getMLText("document_link_by")."</th>\n";
|
print "<th></th>\n";
|
||||||
print "<th></th>\n";
|
print "<th></th>\n";
|
||||||
print "</tr>\n</thead>\n<tbody>\n";
|
print "</tr>\n</thead>\n<tbody>\n";
|
||||||
|
|
||||||
|
@ -900,6 +962,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$targetDoc = $link->getTarget();
|
$targetDoc = $link->getTarget();
|
||||||
$targetlc = $targetDoc->getLatestContent();
|
$targetlc = $targetDoc->getLatestContent();
|
||||||
|
|
||||||
|
$previewer->createPreview($targetlc);
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td><a href=\"../op/op.Download.php?documentid=".$targetDoc->getID()."&version=".$targetlc->getVersion()."\">";
|
print "<td><a href=\"../op/op.Download.php?documentid=".$targetDoc->getID()."&version=".$targetlc->getVersion()."\">";
|
||||||
if($previewer->hasPreview($targetlc)) {
|
if($previewer->hasPreview($targetlc)) {
|
||||||
|
@ -910,9 +973,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$targetDoc->getID()."\" class=\"linklist\">".htmlspecialchars($targetDoc->getName())."</a></td>";
|
print "<td><a href=\"out.ViewDocument.php?documentid=".$targetDoc->getID()."\" class=\"linklist\">".htmlspecialchars($targetDoc->getName())."</a></td>";
|
||||||
print "<td>".htmlspecialchars($targetDoc->getComment())."</td>";
|
print "<td>".htmlspecialchars($targetDoc->getComment())."</td>";
|
||||||
print "<td>".htmlspecialchars($responsibleUser->getFullName());
|
print "<td>".getMLText("document_link_by")." ".htmlspecialchars($responsibleUser->getFullName());
|
||||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||||
print ", ".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
|
print "<br />".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "<td><span class=\"actions\">";
|
print "<td><span class=\"actions\">";
|
||||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user