diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..732a19b99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.tar.gz +SeedDMS_*/*.tgz diff --git a/CHANGELOG b/CHANGELOG index a14d270a2..026d1f06a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +-------------------------------------------------------------------------------- + Changes in version 5.0.9 +-------------------------------------------------------------------------------- +- merged changes from 4.3.32 +- add hooks for previewing documents + -------------------------------------------------------------------------------- Changes in version 5.0.8 -------------------------------------------------------------------------------- @@ -57,6 +63,29 @@ - add .xml to online file types by default - add home folder for users +-------------------------------------------------------------------------------- + Changes in version 4.3.32 +-------------------------------------------------------------------------------- +- fix saving new mimetype for fulltext search, available languages (Closes #308) +- put access rights of folder into popup box if more than 3 exists +- do not execute code which uses apache_request_headers() if it does not exists, + makes webdav work in fast cgi mode or on webservers other than apache (Closes #300) +- clean up of distribution created by makefile +- order groups in select boxes by name +- javascript added by addToFooterJS() will be written to a temp. file + which can then be read without violating the CSP +- clearing cache can just remove temp. js files or preview images +- new mimetype of preview command may contain a '.' now +- fix incorrect calls of $app->response()->header() in restapi.php +- set filetype propperly after uploadind a new document with the restapi +- add new method getDocumentPreview() to restapi +- replace lots of tables in forms by bootstraps control-group +- add remove button to folder selector +- editing of an exiting review/approval can be turned off +- add searching for id of folder/document (Closes #302) +- admin may set owner of document when uploading it +- default access rights for documents can be set in configuration + -------------------------------------------------------------------------------- Changes in version 4.3.31 -------------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index 3cab650f6..39ac4c2b3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -VERSION=5.0.8 -SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install restapi pdfviewer +VERSION=5.0.9 +SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer # webapp +NODISTFILES=utils/importmail.php utils/seedddms-importmail utils/remote-email-upload utils/remote-upload .svn .gitignore styles/blue styles/hc styles/clean views/blue views/hc views/clean + EXTENSIONS := \ dynamic_content.tar.gz\ login_action.tar.gz\ @@ -12,7 +14,8 @@ PHPDOC=~/Downloads/phpDocumentor-2.8.1/bin/phpdoc dist: mkdir -p tmp/seeddms-$(VERSION) cp -a $(SRC) tmp/seeddms-$(VERSION) - (cd tmp; tar --exclude=.svn --exclude=views/blue --exclude=views/hc --exclude=views/clean --exclude=styles/blue --exclude=styles/hc --exclude=styles/clean -czvf ../seeddms-$(VERSION).tar.gz seeddms-$(VERSION)) + (cd tmp/seeddms-$(VERSION); rm -rf $(NODISTFILES)) + (cd tmp; tar --exclude=.svn --exclude=.gitignore --exclude=views/blue --exclude=views/hc --exclude=views/clean --exclude=styles/blue --exclude=styles/hc --exclude=styles/clean -czvf ../seeddms-$(VERSION).tar.gz seeddms-$(VERSION)) rm -rf tmp pear: diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 97e4c42a3..2f632e959 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -289,13 +289,29 @@ class SeedDMS_Core_DMS { * * @param array $links list of objects of type SeedDMS_Core_DocumentLink * @param object $user user for which access is being checked + * @param string $access set if source or target of link shall be checked + * for sufficient access rights. Set to 'source' if the source document + * of a link is to be checked, set to 'target' for the target document. + * If not set, then access right aren't checked at all. * @return array filtered list of links */ - static function filterDocumentLinks($user, $links) { /* {{{ */ + static function filterDocumentLinks($user, $links, $access='') { /* {{{ */ $tmp = array(); - foreach ($links as $link) - if ($link->isPublic() || ($link->getUser()->getID() == $user->getID()) || $user->isAdmin()) - array_push($tmp, $link); + foreach ($links as $link) { + if ($link->isPublic() || ($link->getUser()->getID() == $user->getID()) || $user->isAdmin()){ + if($access == 'source') { + $obj = $link->getDocument(); + if ($obj->getAccessMode($user) >= M_READ) + array_push($tmp, $link); + } elseif($access == 'target') { + $obj = $link->getTarget(); + if ($obj->getAccessMode($user) >= M_READ) + array_push($tmp, $link); + } else { + array_push($tmp, $link); + } + } + } return $tmp; } /* }}} */ @@ -328,7 +344,7 @@ class SeedDMS_Core_DMS { $this->callbacks = array(); $this->version = '@package_version@'; if($this->version[0] == '@') - $this->version = '5.0.8'; + $this->version = '5.0.9'; } /* }}} */ /** @@ -675,7 +691,7 @@ class SeedDMS_Core_DMS { // if none is checkd search all if (count($searchin)==0) - $searchin=array(1, 2, 3, 4); + $searchin=array(1, 2, 3, 4, 5); /*--------- Do it all over again for folders -------------*/ $totalFolders = 0; @@ -837,6 +853,9 @@ class SeedDMS_Core_DMS { $searchFields[] = "`tblDocumentAttributes`.`value`"; $searchFields[] = "`tblDocumentContentAttributes`.`value`"; } + if (in_array(5, $searchin)) { + $searchFields[] = "`tblDocuments`.`id`"; + } if (count($searchFields)>0) { @@ -2033,7 +2052,7 @@ class SeedDMS_Core_DMS { function getUnlinkedDocumentContent() { /* {{{ */ $queryStr = "SELECT * FROM tblDocumentContent WHERE document NOT IN (SELECT id FROM tblDocuments)"; $resArr = $this->db->getResultArray($queryStr); - if (!$resArr) + if ($resArr === false) return false; $versions = array(); @@ -2057,7 +2076,7 @@ class SeedDMS_Core_DMS { function getNoFileSizeDocumentContent() { /* {{{ */ $queryStr = "SELECT * FROM tblDocumentContent WHERE fileSize = 0 OR fileSize is null"; $resArr = $this->db->getResultArray($queryStr); - if (!$resArr) + if ($resArr === false) return false; $versions = array(); @@ -2081,7 +2100,7 @@ class SeedDMS_Core_DMS { function getNoChecksumDocumentContent() { /* {{{ */ $queryStr = "SELECT * FROM tblDocumentContent WHERE checksum = '' OR checksum is null"; $resArr = $this->db->getResultArray($queryStr); - if (!$resArr) + if ($resArr === false) return false; $versions = array(); diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 4f61aa10a..f15b506e6 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2032,16 +2032,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if ($defAccess < M_READ) { if (strlen($groupIDs)>0) { $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". - "WHERE `tblGroups`.`id` IN (". $groupIDs .")"; + "WHERE `tblGroups`.`id` IN (". $groupIDs .") ORDER BY `name`"; } } else { if (strlen($groupIDs)>0) { $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". - "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")"; + "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .") ORDER BY `name`"; } else { - $queryStr = "SELECT `tblGroups`.* FROM `tblGroups`"; + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ORDER BY `name`"; } } if (strlen($queryStr)>0) { diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 51d25784b..b04d5c516 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -106,6 +106,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { if (in_array(4, $searchin)) { $searchFields[] = "`tblFolderAttributes`.`value`"; } + if (in_array(5, $searchin)) { + $searchFields[] = "`tblFolders`.`id`"; + } return $searchFields; } /* }}} */ @@ -1590,16 +1593,16 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { if ($defAccess < M_READ) { if (strlen($groupIDs)>0) { $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". - "WHERE `tblGroups`.`id` IN (". $groupIDs .")"; + "WHERE `tblGroups`.`id` IN (". $groupIDs .") ORDER BY `name`"; } } else { if (strlen($groupIDs)>0) { $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". - "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")"; + "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .") ORDER BY `name`"; } else { - $queryStr = "SELECT `tblGroups`.* FROM `tblGroups`"; + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ORDER BY `name`"; } } if (strlen($queryStr)>0) { diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index ebb8b8409..6bc09f684 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -15,8 +15,8 @@ 2016-11-02 - 5.0.8 - 5.0.8 + 5.0.9 + 5.0.9 stable @@ -24,7 +24,7 @@ GPL License -- all changes from 4.3.31 merged +- all changes from 4.3.32 merged @@ -1129,6 +1129,24 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - add check for cycles in workflow SeedDMS_Core_Workflow::checkForCycles() + + 2017-01-12 + + + 4.3.32 + 4.3.32 + + + stable + stable + + GPL License + +- order groups by name returned by getReadAccessList() +- add optional parameter to SeedDMS_Core_DMS::filterDocumentLinks() +- SeedDMS_Core_DMS::search() can search for document/folder id + + 2016-01-22 @@ -1243,5 +1261,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - better attribute value checking + + 2016-11-02 + + + 5.0.8 + 5.0.8 + + + stable + stable + + GPL License + +- all changes from 4.3.31 merged + + diff --git a/controllers/class.ViewOnline.php b/controllers/class.ViewOnline.php index 264a6eee0..65d5a8d44 100644 --- a/controllers/class.ViewOnline.php +++ b/controllers/class.ViewOnline.php @@ -33,8 +33,11 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common { case "version": if(null === $this->callHook('version')) { header("Content-Type: " . $content->getMimeType()); + $efilename = rawurlencode($content->getOriginalFileName()); if (!isset($settings->_viewOnlineFileTypes) || !is_array($settings->_viewOnlineFileTypes) || !in_array(strtolower($content->getFileType()), $settings->_viewOnlineFileTypes)) { - header("Content-Disposition: filename=\"" . $document->getName().$content->getFileType()) . "\""; + header("Content-Disposition: attachment; filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename); + } else { + header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename); } header("Content-Length: " . filesize($dms->contentDir . $content->getPath())); header("Expires: 0"); diff --git a/doc/preview.png b/doc/preview.png deleted file mode 100644 index 47676ee22..000000000 Binary files a/doc/preview.png and /dev/null differ diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 673bd4a43..1a7afeb65 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -235,6 +235,21 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if a review maybe edited + * + * A review may only be updated by the user who originaly addedd the + * review and if it is allowed in the settings + */ + function mayUpdateReview($updateUser) { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + if($this->settings->_enableUpdateRevApp && ($updateUser == $this->user) && !$this->obj->hasExpired()) { + return true; + } + } + return false; + } /* }}} */ + /** * Check if document content may be approved * @@ -253,5 +268,20 @@ class SeedDMS_AccessOperation { } return false; } /* }}} */ + + /** + * Check if a approval maybe edited + * + * An approval may only be updated by the user who originaly addedd the + * approval and if it is allowed in the settings + */ + function mayUpdateApproval($updateUser) { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + if($this->settings->_enableUpdateRevApp && ($updateUser == $this->user) && !$this->obj->hasExpired()) { + return true; + } + } + return false; + } /* }}} */ } ?> diff --git a/inc/inc.ClassController.php b/inc/inc.ClassController.php index 22ea5428d..a149e91c0 100644 --- a/inc/inc.ClassController.php +++ b/inc/inc.ClassController.php @@ -38,7 +38,7 @@ class Controller { $classname = "SeedDMS_Controller_".$class; $filename = ''; foreach($EXT_CONF as $extname=>$extconf) { - $filename = '../ext/'.$extname.'/controllers/class.'.$class.".php"; + $filename = $settings->_rootDir.'ext/'.$extname.'/controllers/class.'.$class.".php"; if(file_exists($filename)) { break; } diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 6816ee6eb..9c6293d53 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -66,6 +66,8 @@ class Settings { /* {{{ */ var $_encryptionKey = ''; // lifetime of cookie in seconds or 0 for end of session var $_cookieLifetime = ''; + // default access mode for documents + var $_defaultAccessDocs = ''; // Strict form checking var $_strictFormCheck = false; // Path to where SeedDMS is located @@ -131,6 +133,8 @@ class Settings { /* {{{ */ var $_enableOwnerRevApp = false; // enable/disable listing logged in user as reviewer/approver var $_enableSelfRevApp = false; + // enable/disable update of a review/approval by the reviewer/approver + var $_enableUpdateRevApp = false; // enable/disable default notification for owner var $_enableOwnerNotification = false; // enable/disable deleting of versions for regular users @@ -460,6 +464,7 @@ class Settings { /* {{{ */ $this->_undelUserIds = strval($tab["undelUserIds"]); $this->_encryptionKey = strval($tab["encryptionKey"]); $this->_cookieLifetime = intval($tab["cookieLifetime"]); + $this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]); $this->_restricted = Settings::boolVal($tab["restricted"]); $this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]); $this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]); @@ -561,6 +566,7 @@ class Settings { /* {{{ */ $this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]); $this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]); $this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]); + $this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]); $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); $this->_versioningFileName = strval($tab["versioningFileName"]); $this->_workflowMode = strval($tab["workflowMode"]); @@ -762,6 +768,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "undelUserIds", $this->_undelUserIds); $this->setXMLAttributValue($node, "encryptionKey", $this->_encryptionKey); $this->setXMLAttributValue($node, "cookieLifetime", $this->_cookieLifetime); + $this->setXMLAttributValue($node, "defaultAccessDocs", $this->_defaultAccessDocs); $this->setXMLAttributValue($node, "restricted", $this->_restricted); $this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage); $this->setXMLAttributValue($node, "disableSelfEdit", $this->_disableSelfEdit); @@ -850,6 +857,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableAdminRevApp", $this->_enableAdminRevApp); $this->setXMLAttributValue($node, "enableOwnerRevApp", $this->_enableOwnerRevApp); $this->setXMLAttributValue($node, "enableSelfRevApp", $this->_enableSelfRevApp); + $this->setXMLAttributValue($node, "enableUpdateRevApp", $this->_enableUpdateRevApp); $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); $this->setXMLAttributValue($node, "versioningFileName", $this->_versioningFileName); $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 8cd1f5eb0..557c1fd5b 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -104,6 +104,7 @@ class UI extends UI_Default { $view->setParam('partitionsize', $settings->_partitionSize); $view->setParam('showmissingtranslations', $settings->_showMissingTranslations); $view->setParam('defaultsearchmethod', $settings->_defaultSearchMethod); + $view->setParam('cachedir', $settings->_cacheDir); return $view; } return null; diff --git a/inc/inc.ClassUI_Default.php b/inc/inc.ClassUI_Default.php index 2a8bb5f18..581655425 100644 --- a/inc/inc.ClassUI_Default.php +++ b/inc/inc.ClassUI_Default.php @@ -79,7 +79,7 @@ class UI_Default { function footNote() { /* {{{ */ global $settings; - + echo "
\n"; echo '
'."\n"; echo '
'."\n"; @@ -95,7 +95,7 @@ class UI_Default { echo "
\n"; echo "
\n"; echo "
\n"; - + return; } /* }}} */ @@ -124,7 +124,7 @@ class UI_Default { } /* }}} */ function __globalNavigation($folder=null) { /* {{{ */ - + global $settings, $user; echo "
\n"; @@ -203,7 +203,7 @@ class UI_Default { } /* }}} */ function __folderNavigationBar($folder) { /* {{{ */ - + global $user, $settings, $theme; if (!is_object($folder) || strcasecmp(get_class($folder), "SeedDMS_Core_Folder")) { @@ -237,7 +237,7 @@ class UI_Default { } /* }}} */ function __documentNavigationBar() { /* {{{ */ - + global $user, $settings, $document; $accessMode = $document->getAccessMode($user); @@ -274,13 +274,13 @@ class UI_Default { } /* }}} */ function __accountNavigationBar() { /* {{{ */ - + global $settings,$user; - + echo "\n"; return; } /* }}} */ @@ -305,7 +305,7 @@ class UI_Default { } /* }}} */ function __adminToolsNavigationBar() { /* {{{ */ - + global $settings; echo "
    \n"; @@ -318,13 +318,13 @@ class UI_Default { echo "
\n"; return; } /* }}} */ - + function __calendarNavigationBar($d){ /* {{{ */ global $settings,$user; $ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2]; - + echo "\n"; return; - + } /* }}} */ function __pageList($pageNumber, $totalPages, $baseURI, $params) { /* {{{ */ @@ -359,7 +359,7 @@ class UI_Default { } } else { - $resultsURI .= ($first ? "?" : "&").$key."=".$value; + $resultsURI .= ($first ? "?" : "&").$key."=".$value; } $first = false; } @@ -496,7 +496,7 @@ class UI_Default { } /* }}} */ function __printDateChooser($defDate = -1, $varName) { /* {{{ */ - + if ($defDate == -1) $defDate = mktime(); $day = date("d", $defDate); @@ -521,7 +521,7 @@ class UI_Default { print ">" . $i . "\n"; } print " \n"; - print "\n"; for ($i = $year-5 ; $i <= $year+5 ; $i++) { print "
\n"; ?> @@ -1220,11 +1242,10 @@ function folderSelected(name) { modalDropfolderChooser.modal('hide'); } -function clearFilename() { - $('#dropfolderfile').val(''); -} -$('#clearfilename').click(function(ev) { - $('#dropfolderfile').val(''); +$(document).ready(function() { + $('#clearfilename').click(function(ev) { + $('#dropfolderfile').val(''); + }); }); echo ""; $this->printTimelineHtml($height); } /* }}} */ + + protected function printPopupBox($title, $content, $ret=false) { /* {{{ */ + $id = md5(uniqid()); + /* + $this->addFooterJS(' +$("body").on("click", "span.openpopupbox", function(e) { + $(""+$(e.target).data("href")).toggle(); +// $("div.popupbox").toggle(); +}); +'); + */ + $html = ' + '.$title.' + '; + if($ret) + return $html; + else + echo $html; + } /* }}} */ + + protected function printAccordion($title, $content) { /* {{{ */ + $id = substr(md5(uniqid()), 0, 4); +?> +
+
+
+ + + +
+
+
+ +
+
+
+
+ diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 23adba842..201d4e8c3 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -58,48 +58,54 @@ $(document).ready( function() { function showCategoryForm($category) { /* {{{ */ ?> - - - - - - - - - -
+
+ + +
isUsed()) { + if($category->isUsed()) { ?>

- - + +
-
: -
- - - - - - - - + + + + + + + + + + + + + +
+ +
  - - -
+ + +
+
+ +
+
+ + pageNavigation(getMLText("change_password")); $this->contentContainerStart(); ?> -
+ "; @@ -59,32 +59,32 @@ document.form1.newpassword.focus(); echo ""; } ?> - - - - - + +
+ +
+
0) { ?> - - - - + + - - - - - - - - -
:
: +
+ +
-
:
">
+
+ +
+
+
+ +
">
+
+
contentContainerEnd(); ?>

diff --git a/views/bootstrap/class.ClearCache.php b/views/bootstrap/class.ClearCache.php index b00043c62..1d562d507 100644 --- a/views/bootstrap/class.ClearCache.php +++ b/views/bootstrap/class.ClearCache.php @@ -49,6 +49,11 @@ class SeedDMS_View_ClearCache extends SeedDMS_Bootstrap_Style {

$cachedir));?>

+

+ +

+

+

getOwner(); if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return; ?> - - - - - - - - - - - - - - - - - + + -
+ +
+ +
-
: + + + +
+ +
@@ -162,11 +163,12 @@ $(document).ready( function() {
-
: + + + +
+ +
getKeywordLists(); if (count($lists) == 0) @@ -192,23 +194,22 @@ $(document).ready( function() {
-
+ + + +
+ +
- - "> + ">
-

-
+ - - - - - - - - - - - - - -
: + +
+ +
-
: + + + + +
+ + +
-
">
+ + + +
+ "> +
+
contentHeading(getMLText("edit_attributes")); $this->contentContainerStart(); ?> -
+ - - - + + + - - - - +
+ +
+ printAttributeEditField($attrdef, $version->getAttribute($attrdef)) ?> +
+
- - - -
getName()); ?>printAttributeEditField($attrdef, $version->getAttribute($attrdef)) ?>
+
+ +
contentContainerEnd(); diff --git a/views/bootstrap/class.EditComment.php b/views/bootstrap/class.EditComment.php index fae7bdb72..2c12e3ada 100644 --- a/views/bootstrap/class.EditComment.php +++ b/views/bootstrap/class.EditComment.php @@ -84,20 +84,19 @@ $(document).ready(function() { $this->contentHeading(getMLText("edit_comment")); $this->contentContainerStart(); ?> -
+ - - - - - - - - - -
:
+
+ +
+ +
+
+
+ +
contentContainerEnd(); diff --git a/views/bootstrap/class.EditEvent.php b/views/bootstrap/class.EditEvent.php index c6e14f0c5..229526cbc 100644 --- a/views/bootstrap/class.EditEvent.php +++ b/views/bootstrap/class.EditEvent.php @@ -84,43 +84,46 @@ $(document).ready(function() { $this->contentContainerStart(); ?> -
+ - "> + "> - - - - - - - - - - - - - - - - - - - - - -
:printDateChooser($event["start"], "from");?> - " data-date-format="yyyy-mm-dd"> - "> - - -
:printDateChooser($event["stop"], "to");?> - " data-date-format="yyyy-mm-dd"> - "> - - -
:" size="60">
:
+
+ +
+ printDateChooser($event["start"], "from");?> + " data-date-format="yyyy-mm-dd"> + "> + + +
+
+
+ +
+ printDateChooser($event["stop"], "to");?> + " data-date-format="yyyy-mm-dd"> + "> + + +
+
+
+ +
+ " size="60"> +
+
+
+ +
+ +
+
+
+ +
contentContainerEnd(); diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php index edb215f21..8c156c19d 100644 --- a/views/bootstrap/class.EditFolder.php +++ b/views/bootstrap/class.EditFolder.php @@ -104,27 +104,30 @@ $(document).ready(function() { $this->contentHeading(getMLText("edit_folder_props")); $this->contentContainerStart(); ?> -
- - - - - - - - - - - + + + +
+ +
+ +
+
+
+ +
+ +
+
getID() == $rootfolderid) ? false : $folder->getParent(); if ($parent && $parent->getAccessMode($user) > M_READ) { - print ""; - print ""; - print "\n"; + print "\n"; } if($attrdefs) { @@ -132,26 +135,26 @@ $(document).ready(function() { $arr = $this->callHook('folderEditAttribute', $folder, $attrdef); if(is_array($arr)) { echo $txt; - echo ""; - echo ""; - echo ""; - echo ""; + echo "
"; + echo ""; + echo "
".$arr[1]."
"; + echo "
"; } else { ?> - - - - +
+ +
+ printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?> +
+
- - - - -
:
:
" . getMLText("sequence") . ":"; + print "
"; + print ""; + print "
"; $this->printSequenceChooser($parent->getSubFolders('s'), $folder->getID()); if($orderby != 's') echo "
".getMLText('order_by_sequence_off'); - print "
".$arr[0]."".$arr[1]."
getName()); ?>printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?>
+
+ +
contentContainerEnd(); diff --git a/views/bootstrap/class.EditUserData.php b/views/bootstrap/class.EditUserData.php index 632d4ec58..af6ccd32a 100644 --- a/views/bootstrap/class.EditUserData.php +++ b/views/bootstrap/class.EditUserData.php @@ -118,73 +118,84 @@ $(document).ready( function() { $this->contentHeading(getMLText("edit_user_details")); $this->contentContainerStart(); ?> -
- - - - - - - - - + +
+ +
+ +
+
+
+ +
+ +
+
- - - - + + - - - - - - - - - - - - - - - - +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
- - - - - - - - + + - - - - + + - - - - + + - - - - -
:
:
: +
+ +
-
:
:
:
:
: +
+ +
hasImage()) print ""; else printMLText("no_user_image"); ?> -
: + + +
+ +
printFileChooser('userfile', false, "image/jpeg"); ?> -
: +
+ +
-
: +
+ +
-
+
+ +
- - + + printAccessModeSelection($folder->getDefaultAccess()); ?>
@@ -179,9 +179,9 @@ $(document).ready(function() { print "". htmlspecialchars($userObj->getFullName()) . "\n"; print "
\n"; echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; print "\n"; $this->printAccessModeSelection($userAccess->getMode()); print "\n"; @@ -191,9 +191,9 @@ $(document).ready(function() { print "
\n"; print "
\n"; echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; print "\n"; print ""; print "\n"; @@ -209,9 +209,9 @@ $(document).ready(function() { print "". htmlspecialchars($groupObj->getName()) . ""; print ""; echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">"; - print ""; - print "getID()."\">"; + print "getID()."\">"; + print ""; + print "getID()."\">"; print ""; $this->printAccessModeSelection($groupAccess->getMode()); print "\n"; @@ -221,9 +221,9 @@ $(document).ready(function() { print "
"; print "
\n"; echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; + print "getID()."\">\n"; + print "\n"; + print "getID()."\">\n"; print ""; print ""; print "\n"; @@ -236,8 +236,8 @@ $(document).ready(function() { ?> - - + + diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 51cd13585..6b039eb55 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -153,7 +153,7 @@ $(document).ready( function() { $allUsers = $this->params['allusers']; $groups = $this->params['allgroups']; ?> - + -
:
+ - - - - +
+
+ +
+
- - - - - - - - - - - - -
:
:
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
- +
- +
diff --git a/views/bootstrap/class.MoveDocument.php b/views/bootstrap/class.MoveDocument.php index c332ea1d9..49fc5ca42 100644 --- a/views/bootstrap/class.MoveDocument.php +++ b/views/bootstrap/class.MoveDocument.php @@ -51,17 +51,17 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("move_document")); $this->contentContainerStart('warning'); ?> -
+ - - - - - - - - -
:printFolderChooserHtml("form1", M_READWRITE, -1, $target);?>
">
+
+ +
+ printFolderChooserHtml("form1", M_READWRITE, -1, $target);?> +
+
+
+ "> +
contentContainerEnd(); diff --git a/views/bootstrap/class.MoveFolder.php b/views/bootstrap/class.MoveFolder.php index a3265f098..4387ac42e 100644 --- a/views/bootstrap/class.MoveFolder.php +++ b/views/bootstrap/class.MoveFolder.php @@ -51,20 +51,19 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Bootstrap_Style { $this->contentContainerStart(); ?> -
+ - - - - - - - - - -
:printFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target);?>
">
-
+
+ +
+ printFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target);?> +
+
+
+ "> +
+ -
- - - - -
: -
: + + +
+ +
+ -
- - - -
+ ?> + + +
+ + + +
contentContainerEnd(); diff --git a/views/bootstrap/class.PasswordForgotten.php b/views/bootstrap/class.PasswordForgotten.php index d33c085f7..dcf88d2b2 100644 --- a/views/bootstrap/class.PasswordForgotten.php +++ b/views/bootstrap/class.PasswordForgotten.php @@ -73,27 +73,31 @@ document.form1.email.focus(); ?> contentContainerStart(); ?> -
+ "; } ?>

- - - - - - - - - - - - - -
:
:
">
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ "> +
+
contentContainerEnd(); ?>

diff --git a/views/bootstrap/class.RemoveWorkflow.php b/views/bootstrap/class.RemoveWorkflow.php index e64442005..474ea3939 100644 --- a/views/bootstrap/class.RemoveWorkflow.php +++ b/views/bootstrap/class.RemoveWorkflow.php @@ -49,11 +49,8 @@ class SeedDMS_View_RemoveWorkflow extends SeedDMS_Bootstrap_Style {

- -
-
diff --git a/views/bootstrap/class.RemoveWorkflowFromDocument.php b/views/bootstrap/class.RemoveWorkflowFromDocument.php index 50b8474fb..1793f27f0 100644 --- a/views/bootstrap/class.RemoveWorkflowFromDocument.php +++ b/views/bootstrap/class.RemoveWorkflowFromDocument.php @@ -71,12 +71,9 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Bootstrap_Style {

- -
-
diff --git a/views/bootstrap/class.RewindWorkflow.php b/views/bootstrap/class.RewindWorkflow.php index d06c77a60..93bfe0432 100644 --- a/views/bootstrap/class.RewindWorkflow.php +++ b/views/bootstrap/class.RewindWorkflow.php @@ -71,12 +71,9 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Bootstrap_Style {

- -
-
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 20f050d48..7971fd387 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -144,6 +144,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { + diff --git a/views/bootstrap/class.SetExpires.php b/views/bootstrap/class.SetExpires.php index 2166d42de..bc7c4ac49 100644 --- a/views/bootstrap/class.SetExpires.php +++ b/views/bootstrap/class.SetExpires.php @@ -50,13 +50,11 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style { $expdate = ''; ?> -
+ - - - - - - - - - - -
: +
+ +
@@ -64,13 +62,11 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style { -
+
+ +
+ +
contentContainerEnd(); diff --git a/views/bootstrap/class.SetWorkflow.php b/views/bootstrap/class.SetWorkflow.php index 3569f80ba..2c213facd 100644 --- a/views/bootstrap/class.SetWorkflow.php +++ b/views/bootstrap/class.SetWorkflow.php @@ -76,17 +76,17 @@ $(document).ready( function() { $workflows = $dms->getAllWorkflows(); if($workflows) { ?> -
+ - - - - - - - - - -
-
:
-
+ +
+ +
"; $mandatoryworkflow = $user->getMandatoryWorkflow(); @@ -99,14 +99,13 @@ $(document).ready( function() { } echo ""; ?> -
- ">
+ + + +
+ "> +
+
_configFilePath)) { : showTextField("cookieLifetime", $settings->_cookieLifetime); ?> + "> + : + + + + @@ -612,6 +623,10 @@ if(!is_writeable($settings->_configFilePath)) { : _enableSelfRevApp) echo "checked" ?> /> + "> + : + _enableUpdateRevApp) echo "checked" ?> /> + "> : _enableVersionDeletion) echo "checked" ?> /> diff --git a/views/bootstrap/class.Statistic.php b/views/bootstrap/class.Statistic.php index 7655c45ef..a234b91c5 100644 --- a/views/bootstrap/class.Statistic.php +++ b/views/bootstrap/class.Statistic.php @@ -181,15 +181,10 @@ class SeedDMS_View_Statistic extends SeedDMS_Bootstrap_Style { echo "
\n"; echo "
\n"; - print ""; - - print "
\n"; - print "
    \n"; $this->printFolder($rootfolder); print "
\n"; - print "
\n"; echo "
\n"; echo "
\n"; diff --git a/views/bootstrap/class.TriggerWorkflow.php b/views/bootstrap/class.TriggerWorkflow.php index 6b1becbc0..b7880b997 100644 --- a/views/bootstrap/class.TriggerWorkflow.php +++ b/views/bootstrap/class.TriggerWorkflow.php @@ -106,18 +106,20 @@ $(document).ready(function() { ?>
-
+ - - - -
: -
+
+ +
+ +
+
- -
+
+ +
diff --git a/views/bootstrap/class.UserDefaultKeywords.php b/views/bootstrap/class.UserDefaultKeywords.php index 13aeef5e1..9c3083aab 100644 --- a/views/bootstrap/class.UserDefaultKeywords.php +++ b/views/bootstrap/class.UserDefaultKeywords.php @@ -76,12 +76,15 @@ $(document).ready(function() { $this->contentHeading(getMLText("edit_default_keywords")); ?>
-
-
-: - +
-
+ +
+
+ +
+ -
-
+
+
- - + getOwner(); if ($owner->getID() != $user->getID()) continue; - print " + -
getID()."\" style=\"display : none;\">"; + print "
getID()."\" style=\"display : none;\">"; ?> - - - - - - - - - - - - - - - - - + -
-
- - - - -
-
: -
getID()?>"> +
+ + + + + + +
+ +
getID()?>"> +
+ +
- -
: + + + +
+ +
getKeywordLists(); if (count($lists) == 0) @@ -175,11 +178,9 @@ $(document).ready(function() {
-
+ + +
"> @@ -187,13 +188,10 @@ $(document).ready(function() { ">
-
-
diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index be25c1de6..808cb48cf 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -58,21 +58,28 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) return; + $content = ''; for ($i = 0; $i < count($accessList["groups"]); $i++) { $group = $accessList["groups"][$i]->getGroup(); $accesstext = $this->getAccessModeText($accessList["groups"][$i]->getMode()); - print $accesstext.": ".htmlspecialchars($group->getName()); + $content .= $accesstext.": ".htmlspecialchars($group->getName()); if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) - print "
"; + $content .= "
"; } for ($i = 0; $i < count($accessList["users"]); $i++) { $user = $accessList["users"][$i]->getUser(); $accesstext = $this->getAccessModeText($accessList["users"][$i]->getMode()); - print $accesstext.": ".htmlspecialchars($user->getFullName()); + $content .= $accesstext.": ".htmlspecialchars($user->getFullName()); if ($i+1 < count($accessList["users"])) - print "
"; + $content .= "
"; + } + + if(count($accessList["groups"]) + count($accessList["users"]) > 3) { + $this->printPopupBox(getMLText('list_access_rights'), $content); + } else { + echo $content; } } /* }}} */ @@ -165,132 +172,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $this->printDocumentChooserJs("form1"); } /* }}} */ - function preview() { /* {{{ */ - $document = $this->params['document']; - $timeout = $this->params['timeout']; - $showfullpreview = $this->params['showFullPreview']; - $converttopdf = $this->params['convertToPdf']; - $cachedir = $this->params['cachedir']; - if(!$showfullpreview) - return; - - $latestContent = $document->getLatestContent(); - switch($latestContent->getMimeType()) { - case 'audio/mpeg': - case 'audio/mp3': - case 'audio/ogg': - case 'audio/wav': - $this->contentHeading(getMLText("preview")); -?> - -contentHeading(getMLText("preview")); -?> - -contentHeading(getMLText("preview")); -?> - -hasConverter($latestContent->getMimeType())) { - $this->contentHeading(getMLText("preview")); -?> - -params['dms']; $user = $this->params['user']; - $folder = $this->params['folder']; $document = $this->params['document']; - $accessop = $this->params['accessobject']; - $viewonlinefiletypes = $this->params['viewonlinefiletypes']; - $enableownerrevapp = $this->params['enableownerrevapp']; - $workflowmode = $this->params['workflowmode']; - $cachedir = $this->params['cachedir']; - $previewwidthlist = $this->params['previewWidthList']; - $previewwidthdetail = $this->params['previewWidthDetail']; - $documentid = $document->getId(); - $currenttab = $this->params['currenttab']; - $timeout = $this->params['timeout']; - $versions = $document->getContent(); - - $this->htmlAddHeader(''."\n", 'css'); - $this->htmlAddHeader(''."\n", 'js'); - $this->htmlAddHeader(''."\n", 'js'); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - - if ($document->isLocked()) { - $lockingUser = $document->getLockingUser(); - $txt = $this->callHook('documentIsLocked', $document, $lockingUser); - if(is_string($txt)) - echo $txt; - else { -?> -
- $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?> -
-getDocumentFiles(); - - /* Retrieve linked documents */ - $links = $document->getDocumentLinks(); - $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links); - - /* Retrieve reverse linked documents */ - $reverselinks = $document->getReverseDocumentLinks(); - $reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks); - - /* Retrieve latest content */ - $latestContent = $document->getLatestContent(); - $needwkflaction = false; - if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { - } else { - $workflow = $latestContent->getWorkflow(); - if($workflow) { - $workflowstate = $latestContent->getWorkflowState(); - $transitions = $workflow->getNextTransitions($workflowstate); - $needwkflaction = $latestContent->needsWorkflowAction($user); - } - } - - if($needwkflaction) { - $this->infoMsg(getMLText('needs_workflow_action')); - } - - $status = $latestContent->getStatus(); - $reviewStatus = $latestContent->getReviewStatus(); - $approvalStatus = $latestContent->getApprovalStatus(); -?> - -
-
-contentHeading(getMLText("document_infos")); $this->contentContainerStart(); $txt = $this->callHook('preDocumentInfos', $document); @@ -418,6 +304,148 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if(is_string($txt)) echo $txt; $this->contentContainerEnd(); + } /* }}} */ + + function preview() { /* {{{ */ + $dms = $this->params['dms']; + $document = $this->params['document']; + $timeout = $this->params['timeout']; + $showfullpreview = $this->params['showFullPreview']; + $converttopdf = $this->params['convertToPdf']; + $cachedir = $this->params['cachedir']; + if(!$showfullpreview) + return; + + $latestContent = $document->getLatestContent(); + $txt = $this->callHook('preDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + else { + switch($latestContent->getMimeType()) { + case 'audio/mpeg': + case 'audio/mp3': + case 'audio/ogg': + case 'audio/wav': + $this->contentHeading(getMLText("preview")); + ?> + + contentHeading(getMLText("preview")); + ?> + + contentHeading(getMLText("preview")); + ?> + + callHook('additionalDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + break; + } + } + $txt = $this->callHook('postDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + + if($converttopdf) { + $pdfpreviewer = new SeedDMS_Preview_PdfPreviewer($cachedir, $timeout); + if($pdfpreviewer->hasConverter($latestContent->getMimeType())) { + $this->contentHeading(getMLText("preview")); +?> + +params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $accessop = $this->params['accessobject']; + $viewonlinefiletypes = $this->params['viewonlinefiletypes']; + $enableownerrevapp = $this->params['enableownerrevapp']; + $workflowmode = $this->params['workflowmode']; + $cachedir = $this->params['cachedir']; + $previewwidthlist = $this->params['previewWidthList']; + $previewwidthdetail = $this->params['previewWidthDetail']; + $documentid = $document->getId(); + $currenttab = $this->params['currenttab']; + $timeout = $this->params['timeout']; + + $versions = $document->getContent(); + + $this->htmlAddHeader(''."\n", 'css'); + $this->htmlAddHeader(''."\n", 'js'); + $this->htmlAddHeader(''."\n", 'js'); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + + if ($document->isLocked()) { + $lockingUser = $document->getLockingUser(); + $txt = $this->callHook('documentIsLocked', $document, $lockingUser); + if(is_string($txt)) + echo $txt; + else { +?> +
+ $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?> +
+getDocumentFiles(); + + /* Retrieve linked documents */ + $links = $document->getDocumentLinks(); + $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links, 'target'); + + /* Retrieve reverse linked documents */ + $reverselinks = $document->getReverseDocumentLinks(); + $reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks, 'source'); + + /* Retrieve latest content */ + $latestContent = $document->getLatestContent(); + $needwkflaction = false; + if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { + } else { + $workflow = $latestContent->getWorkflow(); + if($workflow) { + $workflowstate = $latestContent->getWorkflowState(); + $transitions = $workflow->getNextTransitions($workflowstate); + $needwkflaction = $latestContent->needsWorkflowAction($user); + } + } + + if($needwkflaction) { + $this->infoMsg(getMLText('needs_workflow_action')); + } + + $status = $latestContent->getStatus(); + $reviewStatus = $latestContent->getReviewStatus(); + $approvalStatus = $latestContent->getApprovalStatus(); +?> + +
+
+documentInfos(); $this->preview(); ?>
@@ -549,8 +577,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print ""; print "
    "; - if($accessop->mayEditVersion()) { - print "
  • getVersion()."\">".getMLText("edit_version")."
  • "; + if ($file_exists){ + if($accessop->mayEditVersion()) { + print "
  • getVersion()."\">".getMLText("edit_version")."
  • "; + } } /* Only admin has the right to remove version in any case or a regular * user if enableVersionDeletion is on @@ -702,10 +732,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
      "; if($accessop->mayReview()) { - if ($is_reviewer && $r["status"]==0) { - print "
    • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("add_review")."
    • "; - }else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){ - print "
    • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."
    • "; + if ($is_reviewer) { + if ($r["status"]==0) { + print "
    • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("add_review")."
    • "; + } elseif ($accessop->mayUpdateReview($updateUser) && (($r["status"]==1)||($r["status"]==-1))) { + print "
    • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."
    • "; + } } } @@ -771,10 +803,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
        "; if($accessop->mayApprove()) { - if ($is_approver && $a['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) { - print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
      • "; - }else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){ - print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
      • "; + if ($is_approver) { + if ($a['status'] == 0) { + print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
      • "; + } elseif ($accessop->mayUpdateApproval($updateUser) && (($a["status"]==1)||($a["status"]==-1))) { + print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
      • "; + } } } diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 23b8d67ca..4300119c8 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -58,21 +58,28 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) return; + $content = ''; for ($i = 0; $i < count($accessList["groups"]); $i++) { $group = $accessList["groups"][$i]->getGroup(); $accesstext = $this->getAccessModeText($accessList["groups"][$i]->getMode()); - print $accesstext.": ".htmlspecialchars($group->getName()); + $content .= $accesstext.": ".htmlspecialchars($group->getName()); if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) - print "
        "; + $content .= "
        "; } for ($i = 0; $i < count($accessList["users"]); $i++) { $user = $accessList["users"][$i]->getUser(); $accesstext = $this->getAccessModeText($accessList["users"][$i]->getMode()); - print $accesstext.": ".htmlspecialchars($user->getFullName()); + $content .= $accesstext.": ".htmlspecialchars($user->getFullName()); if ($i+1 < count($accessList["users"])) - print "
        "; + $content .= "
        "; + } + + if(count($accessList["groups"]) + count($accessList["users"]) > 3) { + $this->printPopupBox(getMLText('list_access_rights'), $content); + } else { + echo $content; } } /* }}} */ diff --git a/views/bootstrap/class.WorkflowMgr.php b/views/bootstrap/class.WorkflowMgr.php index fe02ab698..6844cd1ce 100644 --- a/views/bootstrap/class.WorkflowMgr.php +++ b/views/bootstrap/class.WorkflowMgr.php @@ -135,13 +135,13 @@ $(document).ready(function() { } ?>
        -
        + - - + + - + isUsed()) { ?> - +
        + +
        - - - - - - - - + + + + +
        + +
        - - - - -
        :">
        :"> + + +
        + +
        +
        $value) { - if (stristr($key, "litmus")) { - error_log("Litmus test $value"); - header("X-Litmus-reply: ".$value); + if( function_exists('apache_request_headers') ) { + foreach (apache_request_headers() as $key => $value) { + if (stristr($key, "litmus")) { + error_log("Litmus test $value"); + header("X-Litmus-reply: ".$value); + } } }