mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-12-17 09:33:13 +00:00
Merge branch 'seeddms-6.0.x' into seeddms-6.1.x
This commit is contained in:
commit
d4ec1c5444
|
|
@ -12,6 +12,7 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- cancel checkout needs confirmation
|
||||
- add input field to filter list of recipients if more then 10
|
||||
- add task for creating missing preview images
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 6.0.15
|
||||
|
|
@ -213,6 +214,13 @@
|
|||
- output path of parent folder in many document/folder lists
|
||||
- list affected documents when transfering processes to another user
|
||||
- check for quota and duplicate content in restapi
|
||||
- remove preview images before removing document
|
||||
- fixed error due to multiple declared function when controller method
|
||||
RemoveFolder::run was called more than once
|
||||
- fix php error setting mandatory workflow when uploading documents via webdav
|
||||
- typeahead search for folders can search in subfolders
|
||||
- new theme based on bootstrap 4, including many improvements on small displays
|
||||
- propperly check for translation of html email body (Closes: #510)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.22
|
||||
|
|
|
|||
|
|
@ -4207,7 +4207,13 @@ class SeedDMS_Core_DMS {
|
|||
/** @var SeedDMS_Core_Document[] $timeline */
|
||||
$timeline = array();
|
||||
|
||||
$queryStr = "SELECT DISTINCT document FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." OR `revisiondate` > '".date('Y-m-d H:i:s', $startts)."' AND `revisiondate` < '".date('Y-m-d H:i:s', $endts)."' UNION SELECT DISTINCT document FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
|
||||
if(0) {
|
||||
$queryStr = "SELECT DISTINCT `document` FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." OR `revisiondate` > '".date('Y-m-d H:i:s', $startts)."' AND `revisiondate` < '".date('Y-m-d H:i:s', $endts)."' UNION SELECT DISTINCT `document` FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
|
||||
} else {
|
||||
$startdate = date('Y-m-d H:i:s', $startts);
|
||||
$enddate = date('Y-m-d H:i:s', $endts);
|
||||
$queryStr = "SELECT DISTINCT `documentID` AS `document` FROM `tblDocumentStatus` LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatus`.`statusId`=`tblDocumentStatusLog`.`statusID` WHERE `date` > ".$this->db->qstr($startdate)." AND `date` < ".$this->db->qstr($enddate)." UNION SELECT DISTINCT document FROM `tblDocumentFiles` WHERE `date` > ".$this->db->qstr($startdate)." AND `date` < ".$this->db->qstr($enddate)." UNION SELECT DISTINCT `document` FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts;
|
||||
}
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if ($resArr === false)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2021-04-07</date>
|
||||
<time>09:43:12</time>
|
||||
<date>2021-05-07</date>
|
||||
<time>13:44:55</time>
|
||||
<version>
|
||||
<release>6.1.0</release>
|
||||
<api>6.1.0</api>
|
||||
|
|
@ -1886,6 +1886,22 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
|||
problem when removing a document
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2021-05-07</date>
|
||||
<time>13:44:55</time>
|
||||
<version>
|
||||
<release>5.1.23</release>
|
||||
<api>5.1.23</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- SeedDMS_Core_DMS::getTimeline() uses status log instead of document content
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2017-02-28</date>
|
||||
<time>06:34:50</time>
|
||||
|
|
|
|||
|
|
@ -40,9 +40,11 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
|||
protected $cmd;
|
||||
|
||||
/**
|
||||
* Run a shell command
|
||||
*
|
||||
* @param $cmd
|
||||
* @param int $timeout
|
||||
* @return string
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
||||
|
|
@ -54,7 +56,11 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
|||
$pipes = array();
|
||||
|
||||
$timeout += time();
|
||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
||||
// Putting an 'exec' before the command will not fork the command
|
||||
// and therefore not create any child process. proc_terminate will
|
||||
// then reliably terminate the cmd and not just shell. See notes of
|
||||
// https://www.php.net/manual/de/function.proc-terminate.php
|
||||
$process = proc_open('exec '.$cmd, $descriptorspec, $pipes);
|
||||
if (!is_resource($process)) {
|
||||
throw new Exception("proc_open failed on: " . $cmd);
|
||||
}
|
||||
|
|
@ -79,11 +85,15 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
|||
$timeleft = $timeout - time();
|
||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
if ($timeleft <= 0) {
|
||||
proc_terminate($process);
|
||||
throw new Exception("command timeout on: " . $cmd);
|
||||
} else {
|
||||
return array('stdout'=>$output, 'stderr'=>$error);
|
||||
$return_value = proc_close($process);
|
||||
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2020-12-12</date>
|
||||
<date>2021-05-10</date>
|
||||
<time>08:55:43</time>
|
||||
<version>
|
||||
<release>1.1.16</release>
|
||||
<api>1.1.16</api>
|
||||
<release>1.1.17</release>
|
||||
<api>1.1.17</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- add indexing of folders
|
||||
- close pipes in execWithTimeout(), also return exit code of command
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
|
@ -352,5 +352,21 @@ Index users with at least read access on the document
|
|||
and SeedDMS_Lucene_Indexer::open()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2020-12-12</date>
|
||||
<time>08:55:43</time>
|
||||
<version>
|
||||
<release>1.1.16</release>
|
||||
<api>1.1.16</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- add indexing of folders
|
||||
</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,14 @@ class SeedDMS_Preview_Base {
|
|||
$this->xsendfile = $xsendfile;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Run a shell command
|
||||
*
|
||||
* @param $cmd
|
||||
* @param int $timeout
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
static function execWithTimeout($cmd, $timeout=5) { /* {{{ */
|
||||
$descriptorspec = array(
|
||||
0 => array("pipe", "r"),
|
||||
|
|
@ -109,11 +117,15 @@ class SeedDMS_Preview_Base {
|
|||
$timeleft = $timeout - time();
|
||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
if ($timeleft <= 0) {
|
||||
proc_terminate($process);
|
||||
throw new Exception("command timeout on: " . $cmd);
|
||||
} else {
|
||||
return array('stdout'=>$output, 'stderr'=>$error);
|
||||
$return_value = proc_close($process);
|
||||
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
|||
* @param string $target optional name of preview image (without extension)
|
||||
* @return boolean true on success, false on failure
|
||||
*/
|
||||
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='') { /* {{{ */
|
||||
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='', &$new=false) { /* {{{ */
|
||||
if($width == 0)
|
||||
$width = $this->width;
|
||||
else
|
||||
|
|
@ -120,6 +120,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
|||
if($cmd) {
|
||||
try {
|
||||
self::execWithTimeout($cmd, $this->timeout);
|
||||
$new = true;
|
||||
} catch(Exception $e) {
|
||||
$this->lastpreviewfile = '';
|
||||
return false;
|
||||
|
|
@ -127,6 +128,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
$new = false;
|
||||
return true;
|
||||
|
||||
} /* }}} */
|
||||
|
|
@ -144,7 +146,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
|||
* @param integer $width desired width of preview image
|
||||
* @return boolean true on success, false on failure
|
||||
*/
|
||||
public function createPreview($object, $width=0) { /* {{{ */
|
||||
public function createPreview($object, $width=0, &$new=false) { /* {{{ */
|
||||
if(!$object)
|
||||
return false;
|
||||
|
||||
|
|
@ -155,7 +157,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
|||
$document = $object->getDocument();
|
||||
$file = $document->_dms->contentDir.$object->getPath();
|
||||
$target = $this->getFileName($object, $width);
|
||||
return $this->createRawPreview($file, $document->getDir(), $object->getMimeType(), $width, $target);
|
||||
return $this->createRawPreview($file, $document->getDir(), $object->getMimeType(), $width, $target, $new);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
<date>2020-12-23</date>
|
||||
<time>09:49:39</time>
|
||||
<version>
|
||||
<release>1.3.2</release>
|
||||
<api>1.3.1</api>
|
||||
<release>1.3.3</release>
|
||||
<api>1.3.3</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
|
|
@ -23,8 +23,9 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
set header Content-Length
|
||||
update package description
|
||||
- close pipes in execWithTimeout(), also return exit code of command
|
||||
- createPreview() has optional parameter by referenz to return true if a
|
||||
preview image was actually created
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
|
@ -453,5 +454,22 @@ add new methode getPreviewFile()
|
|||
add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2020-12-23</date>
|
||||
<time>09:49:39</time>
|
||||
<version>
|
||||
<release>1.3.2</release>
|
||||
<api>1.3.1</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
set header Content-Length
|
||||
update package description
|
||||
</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,14 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
*/
|
||||
protected $cmd;
|
||||
|
||||
/**
|
||||
* Run a shell command
|
||||
*
|
||||
* @param $cmd
|
||||
* @param int $timeout
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
static function execWithTimeout($cmd, $timeout=2) { /* {{{ */
|
||||
$descriptorspec = array(
|
||||
0 => array("pipe", "r"),
|
||||
|
|
@ -53,7 +61,11 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
$pipes = array();
|
||||
|
||||
$timeout += time();
|
||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
||||
// Putting an 'exec' before the command will not fork the command
|
||||
// and therefore not create any child process. proc_terminate will
|
||||
// then reliably terminate the cmd and not just shell. See notes of
|
||||
// https://www.php.net/manual/de/function.proc-terminate.php
|
||||
$process = proc_open('exec '.$cmd, $descriptorspec, $pipes);
|
||||
if (!is_resource($process)) {
|
||||
throw new Exception("proc_open failed on: " . $cmd);
|
||||
}
|
||||
|
|
@ -78,11 +90,15 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
$timeleft = $timeout - time();
|
||||
} while (!feof($pipes[1]) && $timeleft > 0);
|
||||
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
if ($timeleft <= 0) {
|
||||
proc_terminate($process);
|
||||
throw new Exception("command timeout on: " . $cmd);
|
||||
} else {
|
||||
return array('stdout'=>$output, 'stderr'=>$error);
|
||||
$return_value = proc_close($process);
|
||||
return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
|
|
@ -175,6 +175,8 @@ class SeedDMS_SQLiteFTS_Indexer {
|
|||
if($query)
|
||||
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
|
||||
$res = $this->_conn->query($sql);
|
||||
if(!$res)
|
||||
return false;
|
||||
$row = $res->fetch();
|
||||
|
||||
$sql = "SELECT ".$this->_rawid.", documentid FROM docs";
|
||||
|
|
|
|||
|
|
@ -79,11 +79,11 @@ class SeedDMS_SQliteFTS_Search {
|
|||
if(!empty($fields['owner'])) {
|
||||
if(is_string($fields['owner'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= 'owner:'.$fields['owner'];
|
||||
} elseif(is_array($fields['owner'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(owner:';
|
||||
$querystr .= implode(' OR owner:', $fields['owner']);
|
||||
$querystr .= ')';
|
||||
|
|
@ -91,14 +91,14 @@ class SeedDMS_SQliteFTS_Search {
|
|||
}
|
||||
if(!empty($fields['category'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(category:';
|
||||
$querystr .= implode(' OR category:', $fields['category']);
|
||||
$querystr .= ')';
|
||||
}
|
||||
if(!empty($fields['status'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$status = array_map(function($v){return $v+10;}, $fields['status']);
|
||||
$querystr .= '(status:';
|
||||
$querystr .= implode(' OR status:', $status);
|
||||
|
|
@ -106,21 +106,21 @@ class SeedDMS_SQliteFTS_Search {
|
|||
}
|
||||
if(!empty($fields['user'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(users:';
|
||||
$querystr .= implode(' OR users:', $fields['user']);
|
||||
$querystr .= ')';
|
||||
}
|
||||
if(!empty($fields['rootFolder']) && $fields['rootFolder']->getFolderList()) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(path:';
|
||||
$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');
|
||||
$querystr .= ')';
|
||||
}
|
||||
if(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {
|
||||
if($querystr)
|
||||
$querystr .= ' ';
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(path:';
|
||||
$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');
|
||||
$querystr .= ')';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2021-04-19</date>
|
||||
<date>2021-05-10</date>
|
||||
<time>08:57:44</time>
|
||||
<version>
|
||||
<release>1.0.16</release>
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- close pipes in execWithTimeout(), also return exit code of command
|
||||
- add support for fts5 (make it the default)
|
||||
</notes>
|
||||
<contents>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ class SeedDMS_Controller_RemoveDocument extends SeedDMS_Controller_Common {
|
|||
|
||||
$result = $this->callHook('removeDocument', $document);
|
||||
if($result === null) {
|
||||
require_once("SeedDMS/Preview.php");
|
||||
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
|
||||
$previewer->deleteDocumentPreviews($document);
|
||||
if (!$document->remove()) {
|
||||
if($dms->lasterror)
|
||||
$this->errormsg = $dms->lasterror;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,33 @@
|
|||
*/
|
||||
class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
||||
|
||||
public function run() {
|
||||
/* Register a callback which removes each document from the fulltext index
|
||||
* The callback must return null otherwise the removal will be canceled.
|
||||
*/
|
||||
static function removeFromIndex($arr, $document) { /* {{{ */
|
||||
$fulltextservice = $arr[0];
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$hit = null;
|
||||
if($document->isType('document'))
|
||||
$hit = $lucenesearch->getDocument($document->getID());
|
||||
elseif($document->isType('folder'))
|
||||
$hit = $lucenesearch->getFolder($document->getID());
|
||||
if($hit) {
|
||||
$index = $fulltextservice->Indexer();
|
||||
$index->delete($hit->id);
|
||||
$index->commit();
|
||||
}
|
||||
return null;
|
||||
} /* }}} */
|
||||
|
||||
static function removePreviews($arr, $document) { /* {{{ */
|
||||
$previewer = $arr[0];
|
||||
|
||||
$previewer->deleteDocumentPreviews($document);
|
||||
return null;
|
||||
} /* }}} */
|
||||
|
||||
public function run() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$settings = $this->params['settings'];
|
||||
|
|
@ -41,38 +67,19 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
|||
|
||||
$result = $this->callHook('removeFolder', $folder);
|
||||
if($result === null) {
|
||||
/* Register a callback which removes each document from the fulltext index
|
||||
* The callback must return null other the removal will be canceled.
|
||||
*/
|
||||
function removeFromIndex($arr, $document) {
|
||||
$fulltextservice = $arr[0];
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$hit = null;
|
||||
if($document->isType('document'))
|
||||
$hit = $lucenesearch->getDocument($document->getID());
|
||||
elseif($document->isType('folder'))
|
||||
$hit = $lucenesearch->getFolder($document->getID());
|
||||
if($hit) {
|
||||
$index = $fulltextservice->Indexer();
|
||||
$index->delete($hit->id);
|
||||
$index->commit();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if($fulltextservice && ($index = $fulltextservice->Indexer())) {
|
||||
$dms->addCallback('onPreRemoveDocument', 'removeFromIndex', array($fulltextservice));
|
||||
$dms->addCallback('onPreRemoveFolder', 'removeFromIndex', array($fulltextservice));
|
||||
/* Register a callback which is called by SeedDMS_Core when a folder
|
||||
* or document is removed. The second parameter passed to this callback
|
||||
* is the document or folder to be removed.
|
||||
*/
|
||||
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removeFromIndex', array($fulltextservice));
|
||||
$dms->addCallback('onPreRemoveFolder', 'SeedDMS_Controller_RemoveFolder::removeFromIndex', array($fulltextservice));
|
||||
}
|
||||
|
||||
function removePreviews($arr, $document) {
|
||||
$previewer = $arr[0];
|
||||
|
||||
$previewer->deleteDocumentPreviews($document);
|
||||
return null;
|
||||
}
|
||||
/* Register another callback which removes the preview images of the document */
|
||||
require_once("SeedDMS/Preview.php");
|
||||
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
|
||||
$dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer));
|
||||
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_RemoveFolder::removePreviews', array($previewer));
|
||||
|
||||
if (!$folder->remove()) {
|
||||
$this->errormsg = 'error_occured';
|
||||
|
|
@ -88,5 +95,5 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} /* }}} */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
|||
}
|
||||
|
||||
$bodyhtml = '';
|
||||
if(isset($params['__body_html__']) || getMLText($messagekey.'_html')) {
|
||||
if(isset($params['__body_html__']) || getMLText($messagekey.'_html', $params, "", $lang)) {
|
||||
if(!isset($params['__skip_header__']) || !$params['__skip_header__']) {
|
||||
if(!isset($params['__header_html__']))
|
||||
$bodyhtml .= getMLText("email_header_html", $params, "", $lang)."\r\n\r\n";
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class UI extends UI_Default {
|
|||
|
||||
static function exitError($pagetitle, $error, $noexit=false, $plain=false) {
|
||||
global $theme, $dms, $user, $settings;
|
||||
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
$view = UI::factory($theme, 'ErrorDlg');
|
||||
$view->setParam('dms', $dms);
|
||||
$view->setParam('user', $user);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ if(isset($settings->_maxExecutionTime)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
|
||||
while (list($key, $val) = each($process)) {
|
||||
foreach ($val as $k => $v) {
|
||||
|
|
|
|||
|
|
@ -289,6 +289,100 @@ class SeedDMS_CheckSumTask extends SeedDMS_SchedulerTaskBase { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Class for processing a single folder
|
||||
*
|
||||
* SeedDMS_Task_Preview_Process_Folder::process() is used as a callable when
|
||||
* iterating over all folders recursively.
|
||||
*/
|
||||
class SeedDMS_Task_Preview_Process_Folder { /* {{{ */
|
||||
protected $logger;
|
||||
|
||||
protected $previewer;
|
||||
|
||||
protected $widths;
|
||||
|
||||
public function __construct($previewer, $widths, $logger) { /* {{{ */
|
||||
$this->logger = $logger;
|
||||
$this->previewer = $previewer;
|
||||
$this->widths = $widths;
|
||||
} /* }}} */
|
||||
|
||||
public function process($folder) { /* {{{ */
|
||||
$dms = $folder->getDMS();
|
||||
$documents = $folder->getDocuments();
|
||||
if($documents) {
|
||||
foreach($documents as $document) {
|
||||
$versions = $document->getContent();
|
||||
foreach($versions as $version) {
|
||||
foreach($this->widths as $previewtype=>$width) {
|
||||
if($previewtype == 'detail' || $document->isLatestContent($version->getVersion())) {
|
||||
$isnew = null;
|
||||
if($this->previewer->createPreview($version, $width, $isnew)) {
|
||||
if($isnew){
|
||||
$this->logger->log('Task \'preview\': created preview ('.$width.'px) for document '.$document->getId().':'.$version->getVersion(), PEAR_LOG_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$files = $document->getDocumentFiles();
|
||||
foreach($files as $file) {
|
||||
$this->previewer->createPreview($file, $width['detail'], $isnew);
|
||||
if($isnew){
|
||||
$this->logger->log('Task \'preview\': created preview ('.$width.'px) for attachment of document '.$document->getId().':'.$file->getId(), PEAR_LOG_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Class containing methods for running a scheduled task
|
||||
*
|
||||
* @author Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @package SeedDMS
|
||||
* @subpackage core
|
||||
*/
|
||||
class SeedDMS_PreviewTask extends SeedDMS_SchedulerTaskBase { /* {{{ */
|
||||
|
||||
/**
|
||||
* Run the task
|
||||
*
|
||||
* @param $task task to be executed
|
||||
* @param $dms dms
|
||||
* @return boolean true if task was executed succesfully, otherwise false
|
||||
*/
|
||||
public function execute($task) {
|
||||
$dms = $this->dms;
|
||||
$logger = $this->logger;
|
||||
$settings = $this->settings;
|
||||
$taskparams = $task->getParameter();
|
||||
$folder = $dms->getRootFolder();
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
|
||||
$previewer->setConverters(isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
|
||||
$logger->log('Cachedir is '.$settings->_cacheDir, PEAR_LOG_INFO);
|
||||
|
||||
$folderprocess = new SeedDMS_Task_Preview_Process_Folder($previewer, array('list'=>$settings->_previewWidthList, 'detail'=>$settings->_previewWidthDetail), $logger);
|
||||
$tree = new SeedDMS_FolderTree($folder, array($folderprocess, 'process'));
|
||||
call_user_func(array($folderprocess, 'process'), $folder);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return 'Check all documents for a missing preview image';
|
||||
}
|
||||
|
||||
public function getAdditionalParams() {
|
||||
return array(
|
||||
);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
$GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['expireddocs'] = 'SeedDMS_ExpiredDocumentsTask';
|
||||
$GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['indexingdocs'] = 'SeedDMS_IndexingDocumentsTask';
|
||||
$GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['checksum'] = 'SeedDMS_CheckSumTask';
|
||||
$GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['preview'] = 'SeedDMS_PreviewTask';
|
||||
|
|
|
|||
|
|
@ -981,6 +981,67 @@ class SeedDMS_CSRF { /* {{{ */
|
|||
} /* }}} */
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Class to represent a jwt token
|
||||
*
|
||||
*
|
||||
* @category DMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @copyright 2016 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_JwtToken { /* {{{ */
|
||||
protected $jwtsecret;
|
||||
|
||||
public function __construct($jwtsecret = '') { /* {{{ */
|
||||
$this->jwtsecret = $jwtsecret;
|
||||
} /* }}} */
|
||||
|
||||
public function jwtEncode($payload) { /* {{{ */
|
||||
$header = [
|
||||
"alg" => "HS256",
|
||||
"typ" => "JWT"
|
||||
];
|
||||
$encHeader = self::base64UrlEncode(json_encode($header));
|
||||
$encPayload = self::base64UrlEncode(json_encode($payload));
|
||||
$hash = self::base64UrlEncode(self::calculateHash($encHeader, $encPayload));
|
||||
|
||||
return "$encHeader.$encPayload.$hash";
|
||||
} /* }}} */
|
||||
|
||||
public function jwtDecode($token) { /* {{{ */
|
||||
if (!$this->jwtsecret) return "";
|
||||
|
||||
$split = explode(".", $token);
|
||||
if (count($split) != 3) return "";
|
||||
|
||||
$hash = self::base64UrlEncode(self::calculateHash($split[0], $split[1]));
|
||||
|
||||
if (strcmp($hash, $split[2]) != 0) return "";
|
||||
return self::base64UrlDecode($split[1]);
|
||||
} /* }}} */
|
||||
|
||||
protected function calculateHash($encHeader, $encPayload) { /* {{{ */
|
||||
return hash_hmac("sha256", "$encHeader.$encPayload", $this->jwtsecret, true);
|
||||
} /* }}} */
|
||||
|
||||
protected function base64UrlEncode($str) { /* {{{ */
|
||||
return str_replace("/", "_", str_replace("+", "-", trim(base64_encode($str), "=")));
|
||||
} /* }}} */
|
||||
|
||||
protected function base64UrlDecode($payload) { /* {{{ */
|
||||
$b64 = str_replace("_", "/", str_replace("-", "+", $payload));
|
||||
switch (strlen($b64) % 4) {
|
||||
case 2:
|
||||
$b64 = $b64 . "=="; break;
|
||||
case 3:
|
||||
$b64 = $b64 . "="; break;
|
||||
}
|
||||
return base64_decode($b64);
|
||||
} /* }}} */
|
||||
} /* }}} */
|
||||
|
||||
class SeedDMS_FolderTree { /* {{{ */
|
||||
|
||||
public function __construct($folder, $callback) { /* {{{ */
|
||||
|
|
|
|||
|
|
@ -694,6 +694,7 @@ URL: [url]',
|
|||
'individuals' => 'افراد',
|
||||
'individuals_in_groups' => 'أفراد في المجموعات',
|
||||
'info_recipients_tab_not_released' => 'رابط معلومات المستلمين لم يصدر بعد',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'موروث',
|
||||
'inherits_access_copy_msg' => 'نسخ قائمة صلاحيات موروثة.',
|
||||
'inherits_access_empty_msg' => 'ابدأ بقائمة صلاحيات فارغة',
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ $text = array(
|
|||
'individuals' => 'Личности',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'наследен',
|
||||
'inherits_access_copy_msg' => 'Изкопирай наследения список',
|
||||
'inherits_access_empty_msg' => 'Започни с празен списък за достъп',
|
||||
|
|
|
|||
|
|
@ -628,6 +628,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuals',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'Heredat',
|
||||
'inherits_access_copy_msg' => 'Copiar llista d\'accés heretat',
|
||||
'inherits_access_empty_msg' => 'Començar amb una llista d\'accés buida',
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Jednotlivci',
|
||||
'individuals_in_groups' => 'Členové skupiny',
|
||||
'info_recipients_tab_not_released' => 'Potvrzení o příjmu této verze dokumentu není možné, protože verze není uvolněna.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'Zděděno',
|
||||
'inherits_access_copy_msg' => 'Zkopírovat zděděný seznam řízení přístupu',
|
||||
'inherits_access_empty_msg' => 'Založit nový seznam řízení přístupu',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// Translators: Admin (2881), dgrutsch (22)
|
||||
// Translators: Admin (2886), dgrutsch (22)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '2-Faktor Authentifizierung',
|
||||
|
|
@ -485,8 +485,8 @@ URL: [url]',
|
|||
'do_object_setfiletype' => 'Setze Dateityp',
|
||||
'do_object_unlink' => 'Lösche Dokumentenversion',
|
||||
'draft' => 'Entwurf',
|
||||
'draft_pending_approval' => 'Entwurf - bevorstehende Freigabe',
|
||||
'draft_pending_review' => 'Entwurf - bevorstehende Prüfung',
|
||||
'draft_pending_approval' => 'Freigabe erforderlich',
|
||||
'draft_pending_review' => 'Prüfung erforderlich',
|
||||
'drag_icon_here' => 'Icon eines Ordners oder Dokuments hier hin ziehen!',
|
||||
'dropfolderdir_missing' => 'Ihr persönlicher Ablageordner auf dem Server existiert nicht! Kontaktieren Sie den Administrator, um in anlegen zu lassen.',
|
||||
'dropfolder_file' => 'Datei aus Ablageordner',
|
||||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Einzelpersonen',
|
||||
'individuals_in_groups' => 'Mitglieder einer Gruppe',
|
||||
'info_recipients_tab_not_released' => 'Die Bestätigung des Empfangs für diese Dokumentenversion ist nicht möglich, weil die Version nicht freigegeben ist.',
|
||||
'info_rm_user_from_processes_user' => 'Nur die noch offenen Aufgaben können auf einen anderen Benutzer übertragen werden. Bei Aufgaben, die bereits bearbeitet wurden, wird der Benutzer aus der Bearbeitungshistorie gelöscht, als würde der Benutzer selbst gelöscht.',
|
||||
'inherited' => 'geerbt',
|
||||
'inherits_access_copy_msg' => 'Berechtigungen kopieren',
|
||||
'inherits_access_empty_msg' => 'Leere Zugriffsliste',
|
||||
|
|
@ -1812,7 +1813,7 @@ Name: [username]
|
|||
'state_and_next_state' => 'Status/Nächster Status',
|
||||
'statistic' => 'Statistik',
|
||||
'status' => 'Status',
|
||||
'status_approval_rejected' => 'Entwurf abgelehnt',
|
||||
'status_approval_rejected' => 'abgelehnt',
|
||||
'status_approved' => 'freigegeben',
|
||||
'status_approver_removed' => 'Freigebender wurde vom Prozess ausgeschlossen',
|
||||
'status_change' => 'Statusänderung',
|
||||
|
|
@ -1825,7 +1826,7 @@ Name: [username]
|
|||
'status_receipt_rejected' => 'Abgelehnt',
|
||||
'status_recipient_removed' => 'Empfänger aus Liste entfernt',
|
||||
'status_reviewed' => 'geprüft',
|
||||
'status_reviewer_rejected' => 'Entwurf abgelehnt',
|
||||
'status_reviewer_rejected' => 'abgelehnt',
|
||||
'status_reviewer_removed' => 'Prüfer wurde vom Prozess ausgeschlossen',
|
||||
'status_revised' => 'überprüft',
|
||||
'status_revision_rejected' => 'Abgelehnt',
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ $text = array(
|
|||
'individuals' => 'Άτομα',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'Κληρονομημένο',
|
||||
'inherits_access_copy_msg' => 'Αντιγραφή δικαιωμάτων πρόσβασης',
|
||||
'inherits_access_empty_msg' => 'Έναρξη με κενή λίστα δικαιωμάτων πρόσβασης',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// Translators: Admin (1990), archonwang (3), dgrutsch (9), netixw (14)
|
||||
// Translators: Admin (1996), archonwang (3), dgrutsch (9), netixw (14)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '2-factor authentication',
|
||||
|
|
@ -485,8 +485,8 @@ URL: [url]',
|
|||
'do_object_setfiletype' => 'Set file type',
|
||||
'do_object_unlink' => 'Delete document version',
|
||||
'draft' => 'Draft',
|
||||
'draft_pending_approval' => 'Draft - pending approval',
|
||||
'draft_pending_review' => 'Draft - pending review',
|
||||
'draft_pending_approval' => 'pending approval',
|
||||
'draft_pending_review' => 'pending review',
|
||||
'drag_icon_here' => 'Drag icon of folder or document here!',
|
||||
'dropfolderdir_missing' => 'Your personal drop folder does not exist on the server! Please ask your administrator to create it.',
|
||||
'dropfolder_file' => 'File from drop folder',
|
||||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuals',
|
||||
'individuals_in_groups' => 'Members of a group',
|
||||
'info_recipients_tab_not_released' => 'Acknowledgement of reception for this document version is not possible, because the version is not released.',
|
||||
'info_rm_user_from_processes_user' => 'Only tasks not being touched can be transfered to another user. Task which has been taken care of, will just add an item in the history, as if the user was deleted.',
|
||||
'inherited' => 'inherited',
|
||||
'inherits_access_copy_msg' => 'Copy inherited access list',
|
||||
'inherits_access_empty_msg' => 'Start with empty access list',
|
||||
|
|
@ -1806,7 +1807,7 @@ Name: [username]
|
|||
'state_and_next_state' => 'State/Next state',
|
||||
'statistic' => 'Statistic',
|
||||
'status' => 'Status',
|
||||
'status_approval_rejected' => 'Draft rejected',
|
||||
'status_approval_rejected' => 'rejected',
|
||||
'status_approved' => 'Approved',
|
||||
'status_approver_removed' => 'Approver removed from process',
|
||||
'status_change' => 'Status change',
|
||||
|
|
@ -1819,7 +1820,7 @@ Name: [username]
|
|||
'status_receipt_rejected' => 'Rejected',
|
||||
'status_recipient_removed' => 'Recipient removed from list',
|
||||
'status_reviewed' => 'Reviewed',
|
||||
'status_reviewer_rejected' => 'Draft rejected',
|
||||
'status_reviewer_rejected' => 'rejected',
|
||||
'status_reviewer_removed' => 'Reviewer removed from process',
|
||||
'status_revised' => 'revised',
|
||||
'status_revision_rejected' => 'Rejected',
|
||||
|
|
|
|||
|
|
@ -701,6 +701,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuales',
|
||||
'individuals_in_groups' => 'Miembros del grupo',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'heredado',
|
||||
'inherits_access_copy_msg' => 'Copiar lista de acceso heredado',
|
||||
'inherits_access_empty_msg' => 'Empezar con una lista de acceso vacía',
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuels',
|
||||
'individuals_in_groups' => 'Membres d’un groupe',
|
||||
'info_recipients_tab_not_released' => 'L’accusé de réception pour cette version du document n’est pas possible car la version n’est pas en état « publié ».',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'hérité',
|
||||
'inherits_access_copy_msg' => 'Recopier la liste des accès hérités',
|
||||
'inherits_access_empty_msg' => 'Commencer avec une liste d\'accès vide',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// Translators: Admin (1243), marbanas (16)
|
||||
// Translators: Admin (1246), marbanas (16)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '',
|
||||
|
|
@ -75,7 +75,7 @@ Internet poveznica: [url]',
|
|||
'add_receipt' => 'Potvrdi prijem',
|
||||
'add_review' => 'Dodaj osvrt',
|
||||
'add_revision' => 'Dodaj reviziju',
|
||||
'add_role' => '',
|
||||
'add_role' => 'Dodaj novu rolu',
|
||||
'add_subfolder' => 'Dodaj podmapu',
|
||||
'add_task' => '',
|
||||
'add_to_clipboard' => 'Dodaj u međuspremnik',
|
||||
|
|
@ -166,7 +166,7 @@ Internet poveznica: [url]',
|
|||
'attrdef_minvalues_help' => '',
|
||||
'attrdef_min_greater_max' => 'Minimalni broj vrijednosti je veći od maksimalnog broja vrijednosti',
|
||||
'attrdef_multiple' => 'Dozvoli više vrijednosti',
|
||||
'attrdef_multiple_needs_valueset' => '',
|
||||
'attrdef_multiple_needs_valueset' => 'Atribut s višestrukim vrijednostima mora imati set vrijednosti',
|
||||
'attrdef_must_be_multiple' => 'Atribut mora imati više od jedne vrijednosti, ali nije postavljeno više vrijednosti',
|
||||
'attrdef_name' => 'Naziv',
|
||||
'attrdef_noname' => 'Nedostaje naziv za definiciju atributa',
|
||||
|
|
@ -275,7 +275,7 @@ Internet poveznica: [url]',
|
|||
'choose_attrdefgroup' => '',
|
||||
'choose_category' => 'Molim odaberite',
|
||||
'choose_group' => 'Odaberite grupu',
|
||||
'choose_role' => '',
|
||||
'choose_role' => 'Izaberi rolu',
|
||||
'choose_target_category' => 'Odaberite kategoriju',
|
||||
'choose_target_document' => 'Odaberite dokument',
|
||||
'choose_target_file' => 'Odaberite datoteku',
|
||||
|
|
@ -706,6 +706,7 @@ Internet poveznica: [url]',
|
|||
'individuals' => 'Pojedinci',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'naslijeđeno',
|
||||
'inherits_access_copy_msg' => 'Kopiraj listu naslijeđenih prava pristupa',
|
||||
'inherits_access_empty_msg' => 'Započnite s praznim popisom pristupa',
|
||||
|
|
|
|||
|
|
@ -701,6 +701,7 @@ URL: [url]',
|
|||
'individuals' => 'Egyedek',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'örökölt',
|
||||
'inherits_access_copy_msg' => 'Örökített hozzáférési lista másolása',
|
||||
'inherits_access_empty_msg' => 'Indulás üres hozzáférési listával',
|
||||
|
|
|
|||
|
|
@ -711,6 +711,7 @@ URL: [url]',
|
|||
'individuals' => 'Singoli',
|
||||
'individuals_in_groups' => 'I membri de la gruppo',
|
||||
'info_recipients_tab_not_released' => 'Non è possibile confermare la ricezione di questa versione del documento, poiché la versione non è stata rilasciata.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'ereditato',
|
||||
'inherits_access_copy_msg' => 'Copia la lista degli accessi ereditati',
|
||||
'inherits_access_empty_msg' => 'Reimposta una lista di permessi vuota',
|
||||
|
|
|
|||
|
|
@ -707,6 +707,7 @@ URL: [url]',
|
|||
'individuals' => '개인',
|
||||
'individuals_in_groups' => '개별 그룹',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => '상속',
|
||||
'inherits_access_copy_msg' => '상속 액세스 목록 복사',
|
||||
'inherits_access_empty_msg' => '빈 액세스 목록으로 시작',
|
||||
|
|
|
|||
|
|
@ -704,6 +704,7 @@ URL: [url]',
|
|||
'individuals' => 'ບຸກຄົນ',
|
||||
'individuals_in_groups' => 'ສະມາຊິກຂອງກຸ່ມ',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'ຮັບການຖ່າຍທອດ',
|
||||
'inherits_access_copy_msg' => 'ຄັດລັອກລາຍການເຂົາເຖິງທີສືບທອດ',
|
||||
'inherits_access_empty_msg' => 'ເລີ້ມຕົ້ນດ້ວຍລາຍການທີ່ວ່າງເປົ່າ',
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Personer',
|
||||
'individuals_in_groups' => 'Medlemmer i en gruppe',
|
||||
'info_recipients_tab_not_released' => 'Bekreftelse av mottak for denne dokumentversjonen er ikke mulig fordi versjonen ikke er utgitt.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'arvet',
|
||||
'inherits_access_copy_msg' => 'Kopier arvet adgangsliste',
|
||||
'inherits_access_empty_msg' => 'Start med tom adgangsliste',
|
||||
|
|
|
|||
|
|
@ -718,6 +718,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuen',
|
||||
'individuals_in_groups' => 'Individuen in groepen',
|
||||
'info_recipients_tab_not_released' => 'Ontvangstbevestiging van deze versie van het document is niet mogelijk omdat de versie nog niet is vrijgegeven.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'overgeërfd',
|
||||
'inherits_access_copy_msg' => 'Lijst van overgeërfde toegang',
|
||||
'inherits_access_empty_msg' => 'Begin met een lege toegangslijst',
|
||||
|
|
|
|||
|
|
@ -694,6 +694,7 @@ URL: [url]',
|
|||
'individuals' => 'Indywidualni',
|
||||
'individuals_in_groups' => 'Członkowie grupy',
|
||||
'info_recipients_tab_not_released' => 'Potwierdzenie odbioru dla tej wersji dokumentu nie jest możliwe, ponieważ wersja nie została wydana.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'dziedziczony',
|
||||
'inherits_access_copy_msg' => 'Kopiuj odziedziczoną listę dostępu',
|
||||
'inherits_access_empty_msg' => 'Rozpocznij z pustą listą dostępu',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// Translators: Admin (1847), flaviove (627), lfcristofoli (352)
|
||||
// Translators: Admin (1850), flaviove (627), lfcristofoli (352)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => 'Autenticação de dois fatores',
|
||||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Indivíduos',
|
||||
'individuals_in_groups' => 'Members of a group',
|
||||
'info_recipients_tab_not_released' => 'Confirmação de recebimento para esta versão do documento não é possível, porque a versão não é liberada.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'herdado',
|
||||
'inherits_access_copy_msg' => 'Copiar lista de acesso herdada',
|
||||
'inherits_access_empty_msg' => 'Inicie com a lista de acesso vazia',
|
||||
|
|
@ -1161,7 +1162,7 @@ URL: [url]',
|
|||
'review_update_failed' => 'Erro ao atualizar o status da revisão. Atualização falhou.',
|
||||
'revise_document' => 'Revisar documento',
|
||||
'revise_document_on' => 'Próxima revisão da versão do documento em [date]',
|
||||
'revision' => '',
|
||||
'revision' => 'Revisão',
|
||||
'revisions_accepted' => '[no_revisions] revisões já aceitas',
|
||||
'revisions_accepted_latest' => 'revisões aceitas mais recentes',
|
||||
'revisions_not_touched' => '[no_revisions] revisões não sendo tocadas',
|
||||
|
|
@ -1807,7 +1808,7 @@ Nome: [username]
|
|||
'status_approval_rejected' => 'Rascunho rejeitado',
|
||||
'status_approved' => 'Aprovado',
|
||||
'status_approver_removed' => 'Aprovador removido do processo',
|
||||
'status_change' => '',
|
||||
'status_change' => 'Mudança de status',
|
||||
'status_needs_correction' => 'Precisa de correção',
|
||||
'status_not_approved' => 'Não aprovado',
|
||||
'status_not_receipted' => 'Ainda não recebido',
|
||||
|
|
@ -2004,7 +2005,7 @@ URL: [url]',
|
|||
'version_info' => 'Informações da versão',
|
||||
'view' => 'Visualizar',
|
||||
'view_document' => 'Ver detalhes do documento',
|
||||
'view_folder' => '',
|
||||
'view_folder' => 'Ver detalhes da pasta',
|
||||
'view_online' => 'Ver online',
|
||||
'warning' => 'Aviso',
|
||||
'webauthn_auth' => '',
|
||||
|
|
|
|||
|
|
@ -706,6 +706,7 @@ URL: [url]',
|
|||
'individuals' => 'Individuals',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'moștenit',
|
||||
'inherits_access_copy_msg' => 'Copie lista de acces moștenită',
|
||||
'inherits_access_empty_msg' => 'Începeți cu lista de acces goală',
|
||||
|
|
|
|||
|
|
@ -706,6 +706,7 @@ URL: [url]',
|
|||
'individuals' => 'Пользователи',
|
||||
'individuals_in_groups' => 'Пользователи группы',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'унаследованный',
|
||||
'inherits_access_copy_msg' => 'Скопировать наследованный список',
|
||||
'inherits_access_empty_msg' => 'Начать с пустого списка доступа',
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => 'Jednotlivci',
|
||||
'individuals_in_groups' => 'Členovia skupiny',
|
||||
'info_recipients_tab_not_released' => 'Acknowledgement of reception for this document version is not possible, because the version is not released.',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'zdedené',
|
||||
'inherits_access_copy_msg' => 'Skopírovať zdedený zoznam riadenia prístupu',
|
||||
'inherits_access_empty_msg' => 'Založiť nový zoznam riadenia prístupu',
|
||||
|
|
|
|||
|
|
@ -712,6 +712,7 @@ URL: [url]',
|
|||
'individuals' => 'Personer',
|
||||
'individuals_in_groups' => 'Medlemmar i en grupp',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'ärvd',
|
||||
'inherits_access_copy_msg' => 'Kopiera lista för behörighetsarv',
|
||||
'inherits_access_empty_msg' => 'Börja med tom behörighetslista',
|
||||
|
|
|
|||
|
|
@ -700,6 +700,7 @@ URL: [url]',
|
|||
'individuals' => 'Bireysel',
|
||||
'individuals_in_groups' => '',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'devralındı',
|
||||
'inherits_access_copy_msg' => 'Devralınan erişim listesini kopyala',
|
||||
'inherits_access_empty_msg' => 'Boş erişim listesiyle başla',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// Translators: Admin (1340)
|
||||
// Translators: Admin (1342)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '',
|
||||
|
|
@ -337,7 +337,7 @@ URL: [url]',
|
|||
'daily' => 'Щоденно',
|
||||
'databasesearch' => 'Пошук по БД',
|
||||
'database_schema_version' => '',
|
||||
'data_loading' => '',
|
||||
'data_loading' => 'Зачекайте, дані завантажуються...',
|
||||
'date' => 'Дата',
|
||||
'days' => 'дні',
|
||||
'debug' => '',
|
||||
|
|
@ -706,6 +706,7 @@ URL: [url]',
|
|||
'individuals' => 'Користувачі',
|
||||
'individuals_in_groups' => 'Користувачі групи',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => 'успадкований',
|
||||
'inherits_access_copy_msg' => 'Скопіювати успадкований список',
|
||||
'inherits_access_empty_msg' => 'Почати з порожнього списку доступу',
|
||||
|
|
@ -1863,7 +1864,7 @@ URL: [url]',
|
|||
'total' => '',
|
||||
'to_before_from' => 'Кінцева дата не може бути меншою початкової дати',
|
||||
'transfer_content' => '',
|
||||
'transfer_document' => '',
|
||||
'transfer_document' => 'Передача документа',
|
||||
'transfer_no_read_access' => '',
|
||||
'transfer_no_users' => '',
|
||||
'transfer_no_write_access' => '',
|
||||
|
|
|
|||
|
|
@ -696,6 +696,7 @@ URL: [url]',
|
|||
'individuals' => '个人',
|
||||
'individuals_in_groups' => '组成员',
|
||||
'info_recipients_tab_not_released' => '',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => '继承',
|
||||
'inherits_access_copy_msg' => '复制继承访问权限列表',
|
||||
'inherits_access_empty_msg' => '从访问权限空列表开始',
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ URL: [url]',
|
|||
'individuals' => '個人',
|
||||
'individuals_in_groups' => '小組成員',
|
||||
'info_recipients_tab_not_released' => '由於未發布該文檔版本,因此無法確認接收。',
|
||||
'info_rm_user_from_processes_user' => '',
|
||||
'inherited' => '繼承',
|
||||
'inherits_access_copy_msg' => '複製繼承存取權限列表',
|
||||
'inherits_access_empty_msg' => '從存取權限空列表開始',
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'tra
|
|||
$approvers['i'] = array_merge($approvers['i'], $mapprovers['i']);
|
||||
|
||||
if($settings->_workflowMode == 'traditional' && !$settings->_allowReviewerOnly) {
|
||||
/* Check if reviewers are send but no approvers */
|
||||
/* Check if reviewers are set but no approvers */
|
||||
if(($reviewers["i"] || $reviewers["g"]) && !$approvers["i"] && !$approvers["g"]) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_uploading_reviewer_only"));
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@ if($settings->_libraryFolder) {
|
|||
if($clonedoc = $dms->getDocument($_POST["librarydoc"])) {
|
||||
if($content = $clonedoc->getLatestContent()) {
|
||||
$docsource = 'library';
|
||||
$fullfile = tempnam('/tmp', '');
|
||||
$fullfile = tempnam(sys_get_temp_dir(), '');
|
||||
if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) {
|
||||
/* Check if a local file is uploaded as well */
|
||||
if(isset($_FILES["userfile"]['error'][0])) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ if (!is_object($transmittal)) {
|
|||
}
|
||||
|
||||
if ($transmittal->getUser()->getID() != $user->getID()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_transmittal"));
|
||||
}
|
||||
|
||||
if($transmittal->addContent($version)) {
|
||||
|
|
|
|||
|
|
@ -157,6 +157,37 @@ switch($command) {
|
|||
if($user) {
|
||||
$query = $_GET['query'];
|
||||
|
||||
if(false !== ($pos = strpos($query, '/'))) {
|
||||
$subquery = substr($query, 0, $pos);
|
||||
$hits = $dms->search($subquery, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$dms->getRootFolder(), $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array());
|
||||
if($hits) {
|
||||
if(count($hits['folders']) == 1) {
|
||||
$hit = $hits['folders'][0];
|
||||
$basefolder = $dms->getFolder($hit->getID());
|
||||
if($subquery = substr($query, $pos+1)) {
|
||||
$hits = $dms->search($subquery, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$basefolder, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array());
|
||||
if($hits) {
|
||||
$result = array();
|
||||
foreach($hits['folders'] as $hit) {
|
||||
$result[] = $hit->getID().'#'.$basefolder->getName().'/'.$hit->getName();
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$subfolders = $basefolder->getSubFolders();
|
||||
$result = array();
|
||||
foreach($subfolders as $subfolder) {
|
||||
$result[] = $subfolder->getID().'#'.$basefolder->getName().'/'.$subfolder->getName();
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$hits = $dms->search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=$dms->getRootFolder(), $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x2, $expirationstartdate=array(), $expirationenddate=array());
|
||||
if($hits) {
|
||||
$result = array();
|
||||
|
|
|
|||
|
|
@ -56,10 +56,11 @@ if (!is_object($content)) {
|
|||
}
|
||||
|
||||
if (isset($_POST["startdate"])) {
|
||||
$startdate = $_POST["startdate"];
|
||||
$ts = makeTsFromDate($_POST["startdate"]);
|
||||
} else {
|
||||
$startdate = date('Y-m-d');
|
||||
$ts = time();
|
||||
}
|
||||
$startdate = date('Y-m-d', $ts);
|
||||
|
||||
if(!$content->setRevisionDate($startdate)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
|
|
|
|||
82
op/op.TimelineFeedPreview.php
Normal file
82
op/op.TimelineFeedPreview.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010 Matteo Lucarelli
|
||||
// Copyright (C) 2010-2016 Uwe Steinmann
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.Utils.php");
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.Init.php");
|
||||
include("../inc/inc.Extension.php");
|
||||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.ClassController.php");
|
||||
//include("../inc/inc.BasicAuthentication.php");
|
||||
|
||||
/**
|
||||
* Include class to preview documents
|
||||
*/
|
||||
require_once("SeedDMS/Preview.php");
|
||||
|
||||
if(empty($_GET['hash']))
|
||||
exit;
|
||||
|
||||
$token = new SeedDMS_JwtToken($settings->_encryptionKey);
|
||||
if(!($tokenstr = $token->jwtDecode($_GET['hash'])))
|
||||
exit;
|
||||
|
||||
$tokendata = json_decode($tokenstr, true);
|
||||
|
||||
if (!isset($tokendata['d']) || !is_numeric($tokendata['d'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$document = $dms->getDocument($tokendata['d']);
|
||||
if (!is_object($document)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($tokendata['u']) || !is_numeric($tokendata['u'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$user = $dms->getUser($tokendata['u']);
|
||||
if (!is_object($user)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($document->getAccessMode($user) < M_READ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($tokendata['v']) || !is_numeric($tokendata['v'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$controller = Controller::factory('Preview', array('dms'=>$dms, 'user'=>$user));
|
||||
$controller->setParam('width', !empty($tokendata["w"]) ? $tokendata["w"] : null);
|
||||
$controller->setParam('document', $document);
|
||||
$controller->setParam('version', $tokendata['v']);
|
||||
$controller->setParam('type', 'version');
|
||||
if(!$controller->run()) {
|
||||
header('Content-Type: image/svg+xml');
|
||||
readfile('../views/'.$theme.'/images/empty.svg');
|
||||
exit;
|
||||
}
|
||||
|
|
@ -25,6 +25,7 @@ require_once("inc/inc.Init.php");
|
|||
require_once("inc/inc.Extension.php");
|
||||
require_once("inc/inc.DBInit.php");
|
||||
require_once("inc/inc.ClassUI.php");
|
||||
require_once("inc/inc.ClassAccessOperation.php");
|
||||
require_once("inc/inc.Authentication.php");
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
|
|
@ -38,6 +39,8 @@ if ($user->isGuest()) {
|
|||
UI::exitError(getMLText("edit_event"),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||
|
||||
if($view) {
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ if (!$accessop->check_view_access($view, $_GET)) {
|
|||
}
|
||||
|
||||
if(isset($_GET['categoryid']))
|
||||
$selcategoryid = $_GET['categoryid'];
|
||||
$selcategory = $dms->getKeywordCategory($_GET['categoryid']);
|
||||
else
|
||||
$selcategoryid = 0;
|
||||
$selcategory = null;
|
||||
|
||||
$categories = $dms->getAllUserKeywordCategories($user->getID());
|
||||
|
||||
if($view) {
|
||||
$view->setParam('categories', $categories);
|
||||
$view->setParam('selcategoryid', $selcategoryid);
|
||||
$view->setParam('selcategory', $selcategory);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ require_once("inc/inc.Authentication.php");
|
|||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1]);
|
||||
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
|
||||
|
||||
if(isset($_GET['context']))
|
||||
$context = $_GET['context'];
|
||||
|
|
@ -38,6 +39,7 @@ if($view) {
|
|||
$view->setParam('dms', $dms);
|
||||
$view->setParam('user', $user);
|
||||
$view->setParam('context', $context);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,6 +240,8 @@ if($view) {
|
|||
$view->setParam('repairobjects', $repairobjects);
|
||||
$view->setParam('cachedir', $settings->_cacheDir);
|
||||
$view->setParam('timeout', $settings->_cmdTimeout);
|
||||
$view->setParam('enableRecursiveCount', $settings->_enableRecursiveCount);
|
||||
$view->setParam('maxRecursiveCount', $settings->_maxRecursiveCount);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
||||
$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
|
||||
|
|
|
|||
|
|
@ -64,15 +64,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
$categories = array();
|
||||
$categorynames = array();
|
||||
if(isset($_GET['category']) && $_GET['category']) {
|
||||
foreach($_GET['category'] as $catname) {
|
||||
if($catname) {
|
||||
$cat = $dms->getDocumentCategoryByName($catname);
|
||||
$categories[] = $cat;
|
||||
$categorynames[] = $cat->getName();
|
||||
}
|
||||
}
|
||||
} elseif(isset($_GET['categoryids']) && $_GET['categoryids']) {
|
||||
foreach($_GET['categoryids'] as $catid) {
|
||||
foreach($_GET['category'] as $catid) {
|
||||
if($catid) {
|
||||
$cat = $dms->getDocumentCategory($catid);
|
||||
$categories[] = $cat;
|
||||
|
|
@ -104,16 +96,18 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
// Check to see if the search has been restricted to a particular
|
||||
// document owner.
|
||||
$owner = [];
|
||||
$ownernames = [];
|
||||
if (isset($_GET["owner"])) {
|
||||
$owner = $_GET['owner'];
|
||||
if (!is_array($_GET['owner'])) {
|
||||
if(!empty($_GET['owner']) && $o = $dms->getUserByLogin($_GET['owner']))
|
||||
$owner[] = $o->getLogin();
|
||||
if(!empty($_GET['owner']) && $o = $dms->getUser($_GET['owner']))
|
||||
$ownernames[] = $o->getLogin();
|
||||
else
|
||||
UI::exitError(getMLText("search"),getMLText("unknown_owner"));
|
||||
} else {
|
||||
foreach($_GET["owner"] as $l) {
|
||||
if($l && $o = $dms->getUserByLogin($l))
|
||||
$owner[] = $o->getLogin();
|
||||
if($l && $o = $dms->getUser($l))
|
||||
$ownernames[] = $o->getLogin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -134,34 +128,16 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
}
|
||||
|
||||
// status
|
||||
$status = array();
|
||||
if (isset($_GET["pendingReview"])){
|
||||
$status[] = S_DRAFT_REV;
|
||||
}
|
||||
if (isset($_GET["pendingApproval"])){
|
||||
$status[] = S_DRAFT_APP;
|
||||
}
|
||||
if (isset($_GET["inWorkflow"])){
|
||||
$status[] = S_IN_WORKFLOW;
|
||||
}
|
||||
if (isset($_GET["released"])){
|
||||
$status[] = S_RELEASED;
|
||||
}
|
||||
if (isset($_GET["rejected"])){
|
||||
$status[] = S_REJECTED;
|
||||
}
|
||||
if (isset($_GET["obsolete"])){
|
||||
$status[] = S_OBSOLETE;
|
||||
}
|
||||
if (isset($_GET["expired"])){
|
||||
$status[] = S_EXPIRED;
|
||||
}
|
||||
if(isset($_GET['status']))
|
||||
$status = $_GET['status'];
|
||||
else
|
||||
$status = array();
|
||||
|
||||
// Check to see if the search has been restricted to a particular sub-tree in
|
||||
// the folder hierarchy.
|
||||
$startFolder = null;
|
||||
if (isset($_GET["targetid"]) && is_numeric($_GET["targetid"]) && $_GET["targetid"]>0) {
|
||||
$targetid = $_GET["targetid"];
|
||||
if (isset($_GET["folderfullsearchid"]) && is_numeric($_GET["folderfullsearchid"]) && $_GET["folderfullsearchid"]>0) {
|
||||
$targetid = $_GET["folderfullsearchid"];
|
||||
$startFolder = $dms->getFolder($targetid);
|
||||
if (!is_object($startFolder)) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_folder_id"));
|
||||
|
|
@ -188,7 +164,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
$index = $fulltextservice->Indexer();
|
||||
if($index) {
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$searchresult = $lucenesearch->search($query, array('owner'=>$owner, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
|
||||
$searchresult = $lucenesearch->search($query, array('owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
|
||||
if($searchresult === false) {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm')));
|
||||
$dcount = 0;
|
||||
|
|
@ -314,132 +290,100 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
$owner = array();
|
||||
$ownerobjs = array();
|
||||
if (isset($_GET["owner"])) {
|
||||
$owner = $_GET['owner'];
|
||||
if (!is_array($_GET['owner'])) {
|
||||
if(!empty($_GET['owner']) && $o = $dms->getUserByLogin($_GET['owner'])) {
|
||||
if(!empty($_GET['owner']) && $o = $dms->getUser($_GET['owner'])) {
|
||||
$ownerobjs[] = $o;
|
||||
$owner = $o->getLogin();
|
||||
} else
|
||||
UI::exitError(getMLText("search"),getMLText("unknown_owner"));
|
||||
} else {
|
||||
foreach($_GET["owner"] as $l) {
|
||||
if($o = $dms->getUserByLogin($l)) {
|
||||
if($o = $dms->getUser($l)) {
|
||||
$ownerobjs[] = $o;
|
||||
$owner[] = $o->getLogin();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the search restricted to documents created between two specific dates?
|
||||
$startdate = array();
|
||||
$stopdate = array();
|
||||
if (isset($_GET["creationdate"]) && $_GET["creationdate"]!=null) {
|
||||
$creationdate = true;
|
||||
} else {
|
||||
$creationdate = false;
|
||||
/* Creation date {{{ */
|
||||
$createstartdate = array();
|
||||
$createenddate = array();
|
||||
if(!empty($_GET["createstart"])) {
|
||||
$createstartts = makeTsFromDate($_GET["createstart"]);
|
||||
$createstartdate = array('year'=>(int)date('Y', $createstartts), 'month'=>(int)date('m', $createstartts), 'day'=>(int)date('d', $createstartts), 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
}
|
||||
|
||||
if(isset($_GET["createstart"])) {
|
||||
$tmp = explode("-", $_GET["createstart"]);
|
||||
$startdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
} else {
|
||||
if(isset($_GET["createstartyear"]))
|
||||
$startdate = array('year'=>$_GET["createstartyear"], 'month'=>$_GET["createstartmonth"], 'day'=>$_GET["createstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
}
|
||||
if ($startdate && !checkdate($startdate['month'], $startdate['day'], $startdate['year'])) {
|
||||
if ($createstartdate && !checkdate($createstartdate['month'], $createstartdate['day'], $createstartdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_create_date_end"));
|
||||
}
|
||||
if(isset($_GET["createend"])) {
|
||||
$tmp = explode("-", $_GET["createend"]);
|
||||
$stopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
} else {
|
||||
if(isset($_GET["createendyear"]))
|
||||
$stopdate = array('year'=>$_GET["createendyear"], 'month'=>$_GET["createendmonth"], 'day'=>$_GET["createendday"], 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
if(!empty($_GET["createend"])) {
|
||||
$createendts = makeTsFromDate($_GET["createend"]);
|
||||
$createenddate = array('year'=>(int)date('Y', $createendts), 'month'=>(int)date('m', $createendts), 'day'=>(int)date('d', $createendts), 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
}
|
||||
if ($stopdate && !checkdate($stopdate['month'], $stopdate['day'], $stopdate['year'])) {
|
||||
if ($createenddate && !checkdate($createenddate['month'], $createenddate['day'], $createenddate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_create_date_end"));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Revision date {{{ */
|
||||
$revisionstartdate = array();
|
||||
$revisionstopdate = array();
|
||||
if (isset($_GET["revisiondate"]) && $_GET["revisiondate"]!=null) {
|
||||
$revisiondate = true;
|
||||
} else {
|
||||
$revisiondate = false;
|
||||
}
|
||||
|
||||
if(isset($_GET["revisionstart"]) && $_GET["revisionstart"]) {
|
||||
$tmp = explode("-", $_GET["revisionstart"]);
|
||||
$revisionstartdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
$revisionenddate = array();
|
||||
if(!empty($_GET["revisiondatestart"])) {
|
||||
$revisionstartts = makeTsFromDate($_GET["revisiondatestart"]);
|
||||
$revisionstartdate = array('year'=>(int)date('Y', $revisionstartts), 'month'=>(int)date('m', $revisionstartts), 'day'=>(int)date('d', $revisionstartts), 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
if (!checkdate($revisionstartdate['month'], $revisionstartdate['day'], $revisionstartdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_revision_date_start"));
|
||||
}
|
||||
} else {
|
||||
$revisionstartdate = array();
|
||||
}
|
||||
if(isset($_GET["revisionend"]) && $_GET["revisionend"]) {
|
||||
$tmp = explode("-", $_GET["revisionend"]);
|
||||
$revisionstopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
if (!checkdate($revisionstopdate['month'], $revisionstopdate['day'], $revisionstopdate['year'])) {
|
||||
if(!empty($_GET["revisiondateend"])) {
|
||||
$revisionendts = makeTsFromDate($_GET["revisiondateend"]);
|
||||
$revisionenddate = array('year'=>(int)date('Y', $revisionendts), 'month'=>(int)date('m', $revisionendts), 'day'=>(int)date('d', $revisionendts), 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
if (!checkdate($revisionenddate['month'], $revisionenddate['day'], $revisionenddate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_revision_date_end"));
|
||||
}
|
||||
} else {
|
||||
$revisionstopdate = array();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Status date {{{ */
|
||||
$statusstartdate = array();
|
||||
$statusstopdate = array();
|
||||
if (isset($_GET["statusdate"]) && $_GET["statusdate"]!=null) {
|
||||
$statusdate = true;
|
||||
} else {
|
||||
$statusdate = false;
|
||||
$statusenddate = array();
|
||||
if(!empty($_GET["statusdatestart"])) {
|
||||
$statusstartts = makeTsFromDate($_GET["statusdatestart"]);
|
||||
$statusstartdate = array('year'=>(int)date('Y', $statusstartts), 'month'=>(int)date('m', $statusstartts), 'day'=>(int)date('d', $statusstartts), 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
}
|
||||
|
||||
if(isset($_GET["statusstart"])) {
|
||||
$tmp = explode("-", $_GET["statusstart"]);
|
||||
$statusstartdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
if ($statusstartdate && !checkdate($statusstartdate['month'], $statusstartdate['day'], $statusstartdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_status_date_start"));
|
||||
}
|
||||
if ($statusstartdate && !checkdate($statusstartdate['month'], $startdate['day'], $startdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_status_date_end"));
|
||||
}
|
||||
if(isset($_GET["statusend"])) {
|
||||
$tmp = explode("-", $_GET["statusend"]);
|
||||
$statusstopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
}
|
||||
if ($statusstopdate && !checkdate($statusstopdate['month'], $stopdate['day'], $stopdate['year'])) {
|
||||
if(!empty($_GET["statusdateend"])) {
|
||||
$statusendts = makeTsFromDate($_GET["statusdateend"]);
|
||||
$statusenddate = array('year'=>(int)date('Y', $statusendts), 'month'=>(int)date('m', $statusendts), 'day'=>(int)date('d', $statusendts), 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
}
|
||||
if ($statusenddate && !checkdate($statusenddate['month'], $statusenddate['day'], $statusenddate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_status_date_end"));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Expiration date {{{ */
|
||||
$expstartdate = array();
|
||||
$expstopdate = array();
|
||||
if (isset($_GET["expirationdate"]) && $_GET["expirationdate"]!=null) {
|
||||
$expirationdate = true;
|
||||
} else {
|
||||
$expirationdate = false;
|
||||
}
|
||||
|
||||
if(isset($_GET["expirationstart"]) && $_GET["expirationstart"]) {
|
||||
$tmp = explode("-", $_GET["expirationstart"]);
|
||||
$expstartdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
$expenddate = array();
|
||||
if(!empty($_GET["expirationstart"])) {
|
||||
$expstartts = makeTsFromDate($_GET["expirationstart"]);
|
||||
$expstartdate = array('year'=>(int)date('Y', $expstartts), 'month'=>(int)date('m', $expstartts), 'day'=>(int)date('d', $expstartts), 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
if (!checkdate($expstartdate['month'], $expstartdate['day'], $expstartdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_expiration_date_start"));
|
||||
}
|
||||
} else {
|
||||
// $expstartdate = array('year'=>$_GET["expirationstartyear"], 'month'=>$_GET["expirationstartmonth"], 'day'=>$_GET["expirationstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
$expstartdate = array();
|
||||
}
|
||||
if(isset($_GET["expirationend"]) && $_GET["expirationend"]) {
|
||||
$tmp = explode("-", $_GET["expirationend"]);
|
||||
$expstopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
if (!checkdate($expstopdate['month'], $expstopdate['day'], $expstopdate['year'])) {
|
||||
if(!empty($_GET["expirationend"])) {
|
||||
$expendts = makeTsFromDate($_GET["expirationend"]);
|
||||
$expenddate = array('year'=>(int)date('Y', $expendts), 'month'=>(int)date('m', $expendts), 'day'=>(int)date('d', $expendts), 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
if (!checkdate($expenddate['month'], $expenddate['day'], $expenddate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_expiration_date_end"));
|
||||
}
|
||||
} else {
|
||||
//$expstopdate = array('year'=>$_GET["expirationendyear"], 'month'=>$_GET["expirationendmonth"], 'day'=>$_GET["expirationendday"], 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
$expstopdate = array();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
// status
|
||||
$status = isset($_GET['status']) ? $_GET['status'] : array();
|
||||
/*
|
||||
$status = array();
|
||||
if (isset($_GET["draft"])){
|
||||
$status[] = S_DRAFT;
|
||||
|
|
@ -471,6 +415,7 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
if (isset($_GET["needs_correction"])){
|
||||
$status[] = S_NEEDS_CORRECTION;
|
||||
}
|
||||
*/
|
||||
|
||||
$reception = array();
|
||||
if (isset($_GET["reception"])){
|
||||
|
|
@ -488,13 +433,10 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
|
||||
// category
|
||||
$categories = array();
|
||||
$categorynames = array();
|
||||
if(isset($_GET['category']) && $_GET['category']) {
|
||||
foreach($_GET['category'] as $catname) {
|
||||
if($catname) {
|
||||
$cat = $dms->getDocumentCategoryByName($catname);
|
||||
foreach($_GET['category'] as $catid) {
|
||||
if($cat = $dms->getDocumentCategory($catid)) {
|
||||
$categories[] = $cat;
|
||||
$categorynames[] = $cat->getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -555,20 +497,20 @@ if(((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext
|
|||
'startFolder'=>$startFolder,
|
||||
'owner'=>$ownerobjs,
|
||||
'status'=>$status,
|
||||
'creationstartdate'=>$creationdate ? $startdate : array(),
|
||||
'creationenddate'=>$creationdate ? $stopdate : array(),
|
||||
'creationstartdate'=>$createstartdate ? $createstartdate : array(),
|
||||
'creationenddate'=>$createenddate ? $createenddate : array(),
|
||||
'modificationstartdate'=>array(),
|
||||
'modificationenddate'=>array(),
|
||||
'categories'=>$categories,
|
||||
'attributes'=>$attributes,
|
||||
'mode'=>$resultmode,
|
||||
'expirationstartdate'=>$expirationdate ? $expstartdate : array(),
|
||||
'expirationenddate'=>$expirationdate ? $expstopdate : array(),
|
||||
'revisionstartdate'=>$revisiondate ? $revisionstartdate : array(),
|
||||
'revisionenddate'=>$revisiondate ? $revisionstopdate : array(),
|
||||
'expirationstartdate'=>$expstartdate ? $expstartdate : array(),
|
||||
'expirationenddate'=>$expenddate ? $expenddate : array(),
|
||||
'revisionstartdate'=>$revisionstartdate ? $revisionstartdate : array(),
|
||||
'revisionenddate'=>$revisionenddate ? $revisionenddate : array(),
|
||||
'reception'=>$reception,
|
||||
'statusstartdate'=>$statusdate ? $statusstartdate : array(),
|
||||
'statusenddate'=>$statusdate ? $statusstopdate : array(),
|
||||
'statusstartdate'=>$statusstartdate ? $statusstartdate : array(),
|
||||
'statusenddate'=>$statusenddate ? $statusenddate : array(),
|
||||
'orderby'=>$orderby
|
||||
));
|
||||
$total = $resArr['totalDocs'] + $resArr['totalFolders'];
|
||||
|
|
@ -652,21 +594,20 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
|
|||
$view->setParam('searchin', isset($searchin) ? $searchin : array());
|
||||
$view->setParam('startfolder', isset($startFolder) ? $startFolder : null);
|
||||
$view->setParam('owner', $owner);
|
||||
$view->setParam('startdate', isset($startdate) ? $startdate : array());
|
||||
$view->setParam('stopdate', isset($stopdate) ? $stopdate : array());
|
||||
$view->setParam('revisionstartdate', isset($revisionstartdate) ? $revisionstartdate : array());
|
||||
$view->setParam('revisionstopdate', isset($revisionstopdate) ? $revisionstopdate : array());
|
||||
$view->setParam('expstartdate', isset($expstartdate) ? $expstartdate : array());
|
||||
$view->setParam('expstopdate', isset($expstopdate) ? $expstopdate : array());
|
||||
$view->setParam('statusstartdate', isset($statusstartdate) ? $statusstartdate : array());
|
||||
$view->setParam('statusstopdate', isset($statusstopdate) ? $statusstopdate : array());
|
||||
$view->setParam('createstartdate', !empty($createstartdate) ? getReadableDate($createstartts) : '');
|
||||
$view->setParam('createenddate', !empty($createenddate) ? getReadableDate($createendts) : '');
|
||||
$view->setParam('revisionstartdate', !empty($revisionstartdate) ? getReadableDate($revisionstartts) : '');
|
||||
$view->setParam('revisionenddate', !empty($revisionenddate) ? getReadableDate($revisionendts) : '');
|
||||
$view->setParam('expstartdate', !empty($expstartdate) ? getReadableDate($expstartts) : '');
|
||||
$view->setParam('expenddate', !empty($expenddate) ? getReadableDate($expendts) : '');
|
||||
$view->setParam('statusstartdate', !empty($statusstartdate) ? getReadableDate($statusstartts) : '');
|
||||
$view->setParam('statusenddate', !empty($statusenddate) ? getReadableDate($statusendts) : '');
|
||||
$view->setParam('creationdate', isset($creationdate) ? $creationdate : '');
|
||||
$view->setParam('expirationdate', isset($expirationdate) ? $expirationdate: '');
|
||||
$view->setParam('revisiondate', isset($revisiondate) ? $revisiondate: '');
|
||||
$view->setParam('statusdate', isset($statusdate) ? $statusdate: '');
|
||||
$view->setParam('status', isset($status) ? $status : array());
|
||||
$view->setParam('categories', isset($categories) ? $categories : '');
|
||||
$view->setParam('category', isset($categorynames) ? $categorynames : '');
|
||||
$view->setParam('mimetype', isset($mimetype) ? $mimetype : '');
|
||||
$view->setParam('attributes', isset($attributes) ? $attributes : '');
|
||||
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all));
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ $(document).ready(function() {
|
|||
'element'=>'input',
|
||||
'type'=>'hidden',
|
||||
'name'=>'sequence',
|
||||
'value'=>$seq,
|
||||
'value'=>(string) $seq,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ $(document).ready(function() {
|
|||
$this->pageNavigation("", "calendar");
|
||||
|
||||
$this->contentHeading(getMLText("add_event"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
$expdate = getReadableDate();
|
||||
?>
|
||||
|
|
@ -87,6 +86,7 @@ $(document).ready(function() {
|
|||
<?php echo createHiddenFieldWithKey('addevent'); ?>
|
||||
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("from"),
|
||||
$this->getDateChooser($expdate, "from", $this->params['session']->getLanguage())
|
||||
|
|
@ -114,13 +114,13 @@ $(document).ready(function() {
|
|||
'cols'=>80
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit(getMLText('add_event'));
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
//require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for AddToTransmittal view
|
||||
|
|
@ -29,7 +29,7 @@ require_once("class.Bootstrap.php");
|
|||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style {
|
||||
class SeedDMS_View_AddToTransmittal extends SeedDMS_Theme_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
|
|
@ -42,31 +42,34 @@ class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("my_documents"), "my_documents");
|
||||
$this->contentHeading(getMLText("add_to_transmittal"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
?>
|
||||
<form action="../op/op.AddToTransmittal.php" name="form1" method="post">
|
||||
<form class="form-horizontal" action="../op/op.AddToTransmittal.php" name="form1" method="post">
|
||||
<input type="hidden" name="documentid" value="<?php print $content->getDocument()->getID();?>">
|
||||
<input type="hidden" name="version" value="<?php print $content->getVersion();?>">
|
||||
<input type="hidden" name="action" value="addtotransmittal">
|
||||
<?php echo createHiddenFieldWithKey('addtotransmittal'); ?>
|
||||
|
||||
<p>
|
||||
<?php printMLText("transmittal"); ?>:
|
||||
<select name="assignTo">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
foreach ($transmittals as $transmittal) {
|
||||
print "<option value=\"".$transmittal->getID()."\">" . htmlspecialchars($transmittal->getName()) . "</option>";
|
||||
$options[] = array($transmittal->getID(), htmlspecialchars($transmittal->getName()));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("transmittal"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'assignTo',
|
||||
'name'=>'assignTo',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options,
|
||||
'placeholder'=>getMLText('choose_transmittal'),
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit('<i class="fa fa-plus"></i> '.getMLText('add'));
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<p><button type="submit" class="btn"><i class="fa fa-plus"></i> <?php printMLText("add");?></button></p>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="action" value="addattrdef">
|
||||
<?php
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("attrdef_name"),
|
||||
array(
|
||||
|
|
@ -302,6 +303,7 @@ $(document).ready( function() {
|
|||
),
|
||||
['help'=>getMLText('attrdef_regex_help')]
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit('<i class="fa fa-save"></i> '.getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
|
|
@ -321,8 +323,6 @@ $(document).ready( function() {
|
|||
$selattrdef = $this->params['selattrdef'];
|
||||
$accessop = $this->params['accessobject'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
|
@ -332,7 +332,7 @@ $(document).ready( function() {
|
|||
$this->columnStart(6);
|
||||
?>
|
||||
<form class="form-horizontal">
|
||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
||||
<select class="form-control chzn-select" id="selector" class="input-xlarge">
|
||||
<option value="-1"><?php echo getMLText("choose_attrdef")?></option>
|
||||
<option value="0"><?php echo getMLText("new_attrdef")?></option>
|
||||
<?php
|
||||
|
|
@ -404,12 +404,10 @@ $(document).ready( function() {
|
|||
$this->columnEnd();
|
||||
$this->columnStart(6);
|
||||
?>
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
<?php if($accessop->check_view_access($this, array('action'=>'form'))) { ?>
|
||||
<div class="ajax" data-view="AttributeMgr" data-action="form" <?php echo ($selattrdef ? "data-query=\"attrdefid=".$selattrdef->getID()."\"" : "") ?>></div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
|
||||
|
|
|
|||
|
|
@ -372,10 +372,30 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo " <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-col1\">\n";
|
||||
echo " <span class=\"fa fa-bars\"></span>\n";
|
||||
echo " </a>\n";
|
||||
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
|
||||
echo " <a class=\"btn btn-navbar\" href=\"../op/op.Logout.php\">\n";
|
||||
echo " <span class=\"fa fa-sign-out\"></span>\n";
|
||||
echo " </a>\n";
|
||||
echo " <a href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><img src=\"../views/bootstrap/images/seeddms-logo.svg\"></a>";
|
||||
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
|
||||
|
||||
/* user profile menu {{{ */
|
||||
if(isset($this->params['session']) && isset($this->params['user']) && $this->params['user']) {
|
||||
/* search form {{{ */
|
||||
echo " <form action=\"../out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
|
||||
if ($folder!=null && is_object($folder) && $folder->isType('folder')) {
|
||||
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
|
||||
}
|
||||
echo " <input type=\"hidden\" name=\"navBar\" value=\"1\" />";
|
||||
echo " <input name=\"query\" class=\"search-query\" ".($this->params['defaultsearchmethod'] == 'fulltext_' ? "" : "id=\"searchfield\"")." data-provide=\"typeahead\" type=\"search\" style=\"width: 150px;\" placeholder=\"".getMLText("search")."\"/>";
|
||||
if($this->params['defaultsearchmethod'] == 'fulltext')
|
||||
echo " <input type=\"hidden\" name=\"fullsearch\" value=\"1\" />";
|
||||
// if($this->params['enablefullsearch']) {
|
||||
// echo " <label class=\"checkbox\" style=\"color: #999999;\"><input type=\"checkbox\" name=\"fullsearch\" value=\"1\" title=\"".getMLText('fullsearch_hint')."\"/> ".getMLText('fullsearch')."</label>";
|
||||
// }
|
||||
// echo " <input type=\"submit\" value=\"".getMLText("search")."\" id=\"searchButton\" class=\"btn\"/>";
|
||||
echo "</form>\n";
|
||||
/* }}} End of search form */
|
||||
|
||||
echo " <div class=\"nav-collapse nav-col1\">\n";
|
||||
echo " <ul id=\"main-menu-admin\" class=\"nav pull-right\">\n";
|
||||
echo " <li class=\"dropdown\">\n";
|
||||
|
|
@ -485,12 +505,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
echo " <ul class=\"nav\">\n";
|
||||
$menuitems = array();
|
||||
/* calendar {{{ */
|
||||
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
|
||||
if ($accessobject->check_view_access('AdminTools')) $menuitems['admintools'] = array('link'=>'../out/out.AdminTools.php', 'label'=>"admin_tools");
|
||||
if($this->params['enablehelp']) {
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$menuitems['help'] = array('link'=>'../out/out.Help.php?context='.$tmp[1], 'label'=>"help");
|
||||
}
|
||||
/* }}} End of calendar */
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
if($this->hasHook('globalNavigationBar'))
|
||||
$menuitems = $this->callHook('globalNavigationBar', $menuitems);
|
||||
|
|
@ -508,22 +531,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
}
|
||||
echo " </ul>\n";
|
||||
|
||||
/* search form {{{ */
|
||||
echo " <form action=\"../out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
|
||||
if ($folder!=null && is_object($folder) && $folder->isType('folder')) {
|
||||
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
|
||||
}
|
||||
echo " <input type=\"hidden\" name=\"navBar\" value=\"1\" />";
|
||||
echo " <input name=\"query\" class=\"search-query\" ".($this->params['defaultsearchmethod'] == 'fulltext_' ? "" : "id=\"searchfield\"")." data-provide=\"typeahead\" type=\"search\" style=\"width: 150px;\" placeholder=\"".getMLText("search")."\"/>";
|
||||
if($this->params['defaultsearchmethod'] == 'fulltext')
|
||||
echo " <input type=\"hidden\" name=\"fullsearch\" value=\"1\" />";
|
||||
// if($this->params['enablefullsearch']) {
|
||||
// echo " <label class=\"checkbox\" style=\"color: #999999;\"><input type=\"checkbox\" name=\"fullsearch\" value=\"1\" title=\"".getMLText('fullsearch_hint')."\"/> ".getMLText('fullsearch')."</label>";
|
||||
// }
|
||||
// echo " <input type=\"submit\" value=\"".getMLText("search")."\" id=\"searchButton\" class=\"btn\"/>";
|
||||
echo "</form>\n";
|
||||
/* }}} End of search form */
|
||||
echo " </div>\n";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
|
@ -662,7 +669,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$content = '';
|
||||
$content .= "<ul".(isset($options['id']) ? ' id="'.$options['id'].'"' : '')." class=\"nav nav-list sidenav bs-docs-sidenav\">\n";
|
||||
foreach($menuitems as $menuitem) {
|
||||
$content .= " <li class=\"\">\n";
|
||||
$content .= " <li class=\"".(!empty($menuitem['active']) ? ' active' : '')."\">\n";
|
||||
$content .= ' <a';
|
||||
$content .= !empty($menuitem['link']) ? 'href="'.$menuitem['link'].'"' : '';
|
||||
if(!empty($menuitem['attributes']))
|
||||
|
|
@ -670,7 +677,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
$content .= ' '.$attr[0].'="'.$attr[1].'"';
|
||||
$content .= '>';
|
||||
$content .= $menuitem['label'];
|
||||
$content .= '<span class="badge badge-right">'.$menuitem['badge']."</span>";
|
||||
$content .= '<span class="badge'.($menuitem['badge'] > 0 ? ' badge-info' : '').' badge-right">'.$menuitem['badge']."</span>";
|
||||
$content .= ' </a>'."\n";
|
||||
$content .= " </li>\n";
|
||||
}
|
||||
|
|
@ -707,6 +714,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo $content;
|
||||
} /* }}} */
|
||||
|
||||
protected function showPaneHeader($name, $title, $isactive) { /* {{{ */
|
||||
echo '<li class="nav-item '.($isactive ? 'active' : '').'"><a class="nav-link '.($isactive ? 'active' : '').'" data-target="#'.$name.'" data-toggle="tab" role="tab">'.$title.'</a></li>'."\n";
|
||||
} /* }}} */
|
||||
|
||||
protected function showStartPaneContent($name, $isactive) { /* {{{ */
|
||||
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'" role="tabpanel">';
|
||||
} /* }}} */
|
||||
|
||||
protected function showEndPaneContent($name, $currentab) { /* {{{ */
|
||||
echo '</div>';
|
||||
} /* }}} */
|
||||
|
||||
private function folderNavigationBar($folder) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
|
|
@ -1218,6 +1237,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
(!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : '').
|
||||
(!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '')."</textarea>";
|
||||
break;
|
||||
case 'plain':
|
||||
echo $value['value'];
|
||||
break;
|
||||
case 'input':
|
||||
default:
|
||||
switch($value['type']) {
|
||||
|
|
@ -1360,6 +1382,26 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get attributes for a button opening a modal box
|
||||
*
|
||||
* @param array $config contains elements
|
||||
* target: id of modal box
|
||||
* remote: URL of data to be loaded into box
|
||||
* @return string
|
||||
*/
|
||||
function getModalBoxLinkAttributes($config) { /* {{{ */
|
||||
$attrs = array();
|
||||
$attrs[] = array('data-target', '#'.$config['target']);
|
||||
if(isset($config['remote']))
|
||||
$attrs[] = array('href', $config['remote']);
|
||||
$attrs[] = array('data-toggle', 'modal');
|
||||
$attrs[] = array('role', 'button');
|
||||
if(isset($config['class']))
|
||||
$attrs[] = array('class', $config['class']);
|
||||
return $attrs;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get html for button opening a modal box
|
||||
*
|
||||
|
|
@ -1372,11 +1414,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
function getModalBoxLink($config) { /* {{{ */
|
||||
$content = '';
|
||||
$content .= "<a data-target=\"#".$config['target']."\"".(isset($config['remote']) ? " href=\"".$config['remote']."\"" : "")." role=\"button\" class=\"".(isset($config['class']) ? $config['class'] : "btn")."\" data-toggle=\"modal\"";
|
||||
$attrs = self::getModalBoxLinkAttributes($config);
|
||||
$content = '<a';
|
||||
if($attrs) {
|
||||
foreach($attrs as $attr)
|
||||
$content .= ' '.$attr[0].'="'.$attr[1].'"';
|
||||
}
|
||||
if(!empty($config['attributes'])) {
|
||||
foreach($config['attributes'] as $attrname=>$attrval)
|
||||
$content .= ' '.$attrname.'="'.$attrval.'"';
|
||||
}
|
||||
$content .= ">".$config['title']."…</a>\n";
|
||||
$content .= ">".$config['title']."</a>\n";
|
||||
return $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
@ -1391,7 +1439,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
*/
|
||||
function getModalBox($config) { /* {{{ */
|
||||
$content = '
|
||||
<div class="modal hide" id="'.$config['id'].'" tabindex="-1" role="dialog" aria-labelledby="'.$config['id'].'Label" aria-hidden="true">
|
||||
<div class="modal modal-wide hide" id="'.$config['id'].'" tabindex="-1" role="dialog" aria-labelledby="'.$config['id'].'Label" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="'.$config['id'].'Label">'.$config['title'].'</h3>
|
||||
|
|
@ -1566,7 +1614,7 @@ $(document).ready(function() {
|
|||
array(
|
||||
'target' => 'docChooser'.$formid,
|
||||
'remote' => "../out/out.DocumentChooser.php?form=".$formid."&folderid=".$folderid."&partialtree=".$partialtree,
|
||||
'title' => getMLText('document')
|
||||
'title' => getMLText('document').'…'
|
||||
));
|
||||
$content .= "</div>\n";
|
||||
if(!$skiptree)
|
||||
|
|
@ -1630,7 +1678,7 @@ function folderSelected<?php echo $formid ?>(id, name) {
|
|||
array(
|
||||
'target' => 'folderChooser'.$formid,
|
||||
'remote' => "../out/out.FolderChooser.php?form=".$formid."&mode=".$accessMode."&exclude=".$exclude,
|
||||
'title' => getMLText('folder')
|
||||
'title' => getMLText('folder').'…'
|
||||
));
|
||||
}
|
||||
$content .= "</div>\n";
|
||||
|
|
@ -1702,7 +1750,7 @@ $(document).ready(function() {
|
|||
array(
|
||||
'target' => 'keywordChooser',
|
||||
'remote' => "../out/out.KeywordChooser.php?target=".$formName,
|
||||
'title' => getMLText('keywords')
|
||||
'title' => getMLText('keywords').'…'
|
||||
));
|
||||
$content .= '
|
||||
</div>
|
||||
|
|
@ -1834,8 +1882,8 @@ $(document).ready(function() {
|
|||
case SeedDMS_Core_AttributeDefinition::type_date:
|
||||
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
|
||||
$dateformat = getConvertDateFormat($this->params['settings']->_dateformat);
|
||||
$content .= '<span class="input-append date datepicker" data-date="'.getReadableDate().'" data-date-format="'.$dateformat.'" data-date-language="'.str_replace('_', '-', $this->params['session']->getLanguage()).'">
|
||||
<input id="'.$fieldname.'_'.$attrdef->getId().($namepostfix ? '_'.$namepostfix : '').'" class="span8" size="16" name="'.$fieldname.'['.$attrdef->getId().']'.($namepostfix ? '['.$namepostfix.']' : '').'" type="text" value="'.($objvalue ? $objvalue : '').'">
|
||||
$content .= '<span class="input-append date span12 datepicker" data-date="'.getReadableDate().'" data-date-format="'.$dateformat.'" data-date-language="'.str_replace('_', '-', $this->params['session']->getLanguage()).'">
|
||||
<input id="'.$fieldname.'_'.$attrdef->getId().($namepostfix ? '_'.$namepostfix : '').'" class="span6" size="16" name="'.$fieldname.'['.$attrdef->getId().']'.($namepostfix ? '['.$namepostfix.']' : '').'" type="text" value="'.($objvalue ? $objvalue : '').'">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>';
|
||||
break;
|
||||
|
|
@ -1953,7 +2001,7 @@ $(document).ready(function() {
|
|||
array(
|
||||
'target' => 'dropfolderChooser',
|
||||
'remote' => "../out/out.DropFolderChooser.php?form=".$formName."&dropfolderfile=".urlencode($dropfolderfile)."&showfolders=".$showfolders,
|
||||
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file"))
|
||||
'title' => ($showfolders ? getMLText("choose_target_folder"): getMLText("choose_target_file")).'…'
|
||||
));
|
||||
$content .= "</div>\n";
|
||||
$content .= $this->getModalBox(
|
||||
|
|
@ -2980,7 +3028,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
$content .= "</td>";
|
||||
|
||||
$content .= "<td".($onepage ? ' style="cursor: pointer;"' : '').">";
|
||||
$content .= "<td class=\"wordbreak\"".($onepage ? ' style="cursor: pointer;"' : '').">";
|
||||
if($onepage)
|
||||
$content .= "<b".($onepage ? ' title="Id:'.$document->getId().'"' : '').">".htmlspecialchars($document->getName()) . "</b>";
|
||||
else
|
||||
|
|
@ -3021,6 +3069,12 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category)
|
||||
$content .= "<span class=\"badge bg-secondary\">".$category->getName()."</span> ";
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
$content .= "</td>\n";
|
||||
|
|
@ -3168,9 +3222,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= $this->folderListRowStart($subFolder);
|
||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
||||
if($onepage)
|
||||
$content .= "<td style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
|
||||
$content .= "<td class=\"wordbreak\" style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
|
||||
else
|
||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
||||
$content .= "<td class=\"wordbreak\"><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
||||
if(isset($extracontent['below_title']))
|
||||
$content .= $extracontent['below_title'];
|
||||
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
|
||||
|
|
|
|||
|
|
@ -65,13 +65,13 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
|||
if($event) {
|
||||
// print_r($event);
|
||||
$this->contentHeading(getMLText('edit_event'));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.EditEvent.php" id="form1" name="form1" method="post">
|
||||
<?php echo createHiddenFieldWithKey('editevent'); ?>
|
||||
<input type="hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("from"),
|
||||
$this->getDateChooser(getReadableDate($event["start"]), "from")
|
||||
|
|
@ -100,11 +100,11 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
|||
'required'=>$strictformcheck
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText('rm_event'));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ $(document).ready( function() {
|
|||
if($selcat) {
|
||||
$this->contentHeading(getMLText("category_info"));
|
||||
$c = $selcat->countDocumentsByCategory();
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<table class=\"table table-condensed table-sm\">\n";
|
||||
echo "<tr><td>".getMLText('document_count')."</td><td>".($c)."</td></tr>\n";
|
||||
echo "</table>";
|
||||
|
||||
|
|
@ -115,6 +115,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
|
||||
<?php } ?>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("name"),
|
||||
array(
|
||||
|
|
@ -124,6 +125,7 @@ $(document).ready( function() {
|
|||
'value'=>($category ? htmlspecialchars($category->getName()) : '')
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
|
|
@ -143,8 +145,6 @@ $(document).ready( function() {
|
|||
$categories = $this->params['categories'];
|
||||
$selcat = $this->params['selcategory'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
|
@ -155,26 +155,33 @@ $(document).ready( function() {
|
|||
$this->columnStart(6);
|
||||
?>
|
||||
<form class="form-horizontal">
|
||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
||||
<option value="0"><?php echo getMLText("new_document_category")?>
|
||||
<?php
|
||||
foreach ($categories as $category) {
|
||||
print "<option value=\"".$category->getID()."\" ".($selcat && $category->getID()==$selcat->getID() ? 'selected' : '').">" . htmlspecialchars($category->getName());
|
||||
}
|
||||
$options = array();
|
||||
$options[] = array("-1", getMLText("choose_category"));
|
||||
$options[] = array("0", getMLText("new_document_category"));
|
||||
foreach ($categories as $category) {
|
||||
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID());
|
||||
}
|
||||
$this->formField(
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options,
|
||||
'placeholder'=>getMLText('choose_category'),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="Categories" data-action="actionmenu" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="Categories" data-action="info" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
||||
<?php
|
||||
$this->columnEnd();
|
||||
$this->columnStart(6);
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<div class="ajax" data-view="Categories" data-action="form" <?php echo ($selcat ? "data-query=\"categoryid=".$selcat->getID()."\"" : "") ?>></div>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ $(document).ready( function() {
|
|||
<div id="chart" style="height: 400px;" class="chart"></div>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
echo "<table class=\"table table-condensed table-hover\">";
|
||||
echo "<table class=\"table table-condensed table-sm table-hover\">";
|
||||
echo "<tr>";
|
||||
echo "<th>".getMLText('chart_'.$type.'_title')."</th><th>".getMLText('total')."</th>";
|
||||
if(in_array($type, array('docspermonth', 'docsaccumulated')))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
//require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for Document view
|
||||
|
|
@ -25,7 +25,7 @@ require_once("class.Bootstrap.php");
|
|||
* @copyright Copyright (C) 2015 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_CheckInDocument extends SeedDMS_Bootstrap_Style {
|
||||
class SeedDMS_View_CheckInDocument extends SeedDMS_Theme_Style {
|
||||
|
||||
function js() { /* {{{ */
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
|
|
|
|||
|
|
@ -119,9 +119,12 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style {
|
|||
$content .= $this->folderListRowStart($folder);
|
||||
$content .= "<td><a draggable=\"false\" href=\"out.ViewFolder.php?folderid=".$folder->getID()."&showtree=".showtree()."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
||||
$content .= "<td><a draggable=\"false\" href=\"out.ViewFolder.php?folderid=".$folder->getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . "</a>";
|
||||
/*
|
||||
if($comment) {
|
||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
*/
|
||||
$content .= $this->getListRowPath($folder);
|
||||
$content .= "</td>\n";
|
||||
$content .= "<td>\n";
|
||||
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"F".$folder->getID()."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"fa fa-remove\"></i></a></div>";
|
||||
|
|
@ -165,9 +168,12 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style {
|
|||
$content .= "<td><img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\"></td>";
|
||||
|
||||
$content .= "<td><a draggable=\"false\" href=\"out.ViewDocument.php?documentid=".$document->getID()."&showtree=".showtree()."\">" . htmlspecialchars($document->getName()) . "</a>";
|
||||
/*
|
||||
if($comment) {
|
||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
*/
|
||||
$content .= $this->getListRowPath($document);
|
||||
$content .= "</td>\n";
|
||||
$content .= "<td>\n";
|
||||
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"D".$document->getID()."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" _href=\"../op/op.RemoveFromClipboard.php?folderid=".(isset($this->params['folder']) ? $this->params['folder']->getID() : '')."&id=".$document->getID()."&type=document\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"fa fa-remove\"></i></a></div>";
|
||||
|
|
@ -233,7 +239,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style {
|
|||
* actually available
|
||||
*/
|
||||
if($foldercount || $doccount) {
|
||||
$content = "<table class=\"table\">".$content;
|
||||
$content = "<table class=\"table table-condensed table-sm\">".$content;
|
||||
$content .= "</table>";
|
||||
} else {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,13 +120,13 @@ $(document).ready( function() {
|
|||
function actionmenu() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$selcategoryid = $this->params['selcategoryid'];
|
||||
$selcategory = $this->params['selcategory'];
|
||||
|
||||
if($selcategoryid && $selcategoryid > 0) {
|
||||
if($selcategory && $selcategory->getId() > 0) {
|
||||
?>
|
||||
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
|
||||
<?php echo createHiddenFieldWithKey('removecategory'); ?>
|
||||
<input type="hidden" name="categoryid" value="<?php echo $selcategoryid?>">
|
||||
<input type="hidden" name="categoryid" value="<?php echo $selcategory->getId(); ?>">
|
||||
<input type="hidden" name="action" value="removecategory">
|
||||
<button class="btn btn-danger" type="submit"><i class="fa fa-remove"></i> <?php echo getMLText("rm_default_keyword_category")?></button>
|
||||
</form>
|
||||
|
|
@ -137,20 +137,20 @@ $(document).ready( function() {
|
|||
function form() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$category = $dms->getKeywordCategory($this->params['selcategoryid']);
|
||||
$category = $this->params['selcategory'];
|
||||
|
||||
$this->showKeywordForm($category, $user);
|
||||
} /* }}} */
|
||||
|
||||
function showKeywordForm($category, $user) { /* {{{ */
|
||||
if(!$category) {
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.DefaultKeywords.php" method="post" id="form">
|
||||
<?php echo createHiddenFieldWithKey('addcategory'); ?>
|
||||
<input type="hidden" name="action" value="addcategory">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("name"),
|
||||
array(
|
||||
|
|
@ -160,20 +160,21 @@ $(document).ready( function() {
|
|||
'value'=>''
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('new_default_keyword_category'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
} else {
|
||||
$this->contentContainerStart();
|
||||
$owner = $category->getOwner();
|
||||
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return;
|
||||
?>
|
||||
<form class="form-horizontal form" action="../op/op.DefaultKeywords.php" method="post">
|
||||
<?php echo createHiddenFieldWithKey('editcategory'); ?>
|
||||
<input type="hidden" name="action" value="editcategory">
|
||||
<input type="hidden" name="categoryid" value="<?= $category->getId() ?>">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("name"),
|
||||
array(
|
||||
|
|
@ -183,13 +184,13 @@ $(document).ready( function() {
|
|||
'value'=>$category->getName()
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentHeading(getMLText("default_keywords"));
|
||||
$this->contentContainerStart();
|
||||
// $this->contentContainerStart();
|
||||
?>
|
||||
<?php
|
||||
$lists = $category->getKeywordLists();
|
||||
|
|
@ -198,13 +199,13 @@ $(document).ready( function() {
|
|||
else
|
||||
foreach ($lists as $list) {
|
||||
?>
|
||||
<form class="form-inline form" style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php">
|
||||
<form class="form-inline form mb-3" style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php">
|
||||
<?php echo createHiddenFieldWithKey('editkeywords'); ?>
|
||||
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
|
||||
<input type="Hidden" name="keywordsid" value="<?php echo $list["id"]?>">
|
||||
<input type="Hidden" name="action" value="editkeywords">
|
||||
<input name="keywords" class="keywords" type="text" value="<?php echo htmlspecialchars($list["keywords"]) ?>">
|
||||
<button class="btn btn-primary" title="<?php echo getMLText("save")?>"><i class="fa fa-save"></i> <?php echo getMLText("save")?></button>
|
||||
<input name="keywords" class="keywords form-control" type="text" value="<?php echo htmlspecialchars($list["keywords"]) ?>">
|
||||
<button class="btn btn-primary btn-mini btn-sm" title="<?php echo getMLText("save")?>"><i class="fa fa-save"></i> <?php echo getMLText("save")?></button>
|
||||
<!-- <input name="action" value="removekeywords" type="Image" src="images/del.gif" title="<?php echo getMLText("delete")?>" border="0"> -->
|
||||
</form>
|
||||
<form style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php" >
|
||||
|
|
@ -212,7 +213,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
|
||||
<input type="hidden" name="keywordsid" value="<?php echo $list["id"]?>">
|
||||
<input type="hidden" name="action" value="removekeywords">
|
||||
<button class="btn btn-danger" title="<?php echo getMLText("delete")?>"><i class="fa fa-remove"></i> <?php echo getMLText("delete")?></button>
|
||||
<button class="btn btn-danger btn-mini btn-sm" title="<?php echo getMLText("delete")?>"><i class="fa fa-remove"></i> <?php echo getMLText("delete")?></button>
|
||||
</form>
|
||||
<br>
|
||||
<?php } ?>
|
||||
|
|
@ -224,14 +225,14 @@ $(document).ready( function() {
|
|||
<?php echo createHiddenFieldWithKey('newkeywords'); ?>
|
||||
<input type="Hidden" name="action" value="newkeywords">
|
||||
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
|
||||
<input type="text" class="keywords" name="keywords">
|
||||
<input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>">
|
||||
<input type="text" class="keywords form-control" name="keywords">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> <?php printMLText("new_default_keywords");?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
// $this->contentContainerEnd();
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
|
@ -239,7 +240,7 @@ $(document).ready( function() {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$categories = $this->params['categories'];
|
||||
$selcategoryid = $this->params['selcategoryid'];
|
||||
$selcategory = $this->params['selcategory'];
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
|
|
@ -251,31 +252,33 @@ $(document).ready( function() {
|
|||
$this->columnStart(4);
|
||||
?>
|
||||
<form class="form-horizontal">
|
||||
<select class="chzn-select" id="selector" class="input-xlarge">
|
||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
||||
<option value="0"><?php echo getMLText("new_default_keyword_category")?>
|
||||
<?php
|
||||
|
||||
$selected=0;
|
||||
$count=2;
|
||||
$options = array();
|
||||
$options[] = array("-1", getMLText("choose_category"));
|
||||
$options[] = array("0", getMLText("new_default_keyword_category"));
|
||||
foreach ($categories as $category) {
|
||||
|
||||
$owner = $category->getOwner();
|
||||
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue;
|
||||
|
||||
if ($selcategoryid && $category->getID()==$selcategoryid) $selected=$count;
|
||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
||||
$count++;
|
||||
if ($user->isAdmin() || ($owner->getID() == $user->getID()))
|
||||
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID());
|
||||
}
|
||||
$this->formField(
|
||||
null, //getMLText("selection"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'selector',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options,
|
||||
'placeholder'=>getMLText('choose_category'),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
|
||||
<div class="ajax" style="margin-bottom: 15px;" data-view="DefaultKeywords" data-action="actionmenu" <?php echo ($selcategory ? "data-query=\"categoryid=".$selcategory->getId()."\"" : "") ?>></div>
|
||||
<?php
|
||||
$this->columnEnd();
|
||||
$this->columnStart(8);
|
||||
?>
|
||||
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategory ? "data-query=\"categoryid=".$selcategory->getId()."\"" : "") ?>></div>
|
||||
</div>
|
||||
<?php
|
||||
$this->columnEnd();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Theme_Style {
|
|||
} /* }}} */
|
||||
|
||||
function getAccessModeSelection($defMode) { /* {{{ */
|
||||
$content = "<select name=\"mode\">\n";
|
||||
$content = "<select name=\"mode\" class=\"form-control\">\n";
|
||||
$content .= "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "</option>\n";
|
||||
$content .= "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "</option>\n";
|
||||
$content .= "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "</option>\n";
|
||||
|
|
@ -160,7 +160,7 @@ $(document).ready( function() {
|
|||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||
<input type="hidden" name="documentid" value="<?php print $document->getId();?>">
|
||||
<input type="hidden" name="action" value="inherit">
|
||||
<input type="submit" class="btn" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
||||
<input type="submit" class="btn btn-primary" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ $(document).ready( function() {
|
|||
|
||||
$this->rowStart();
|
||||
$this->columnStart(6);
|
||||
$this->contentContainerStart();
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -111,6 +110,7 @@ $(document).ready( function() {
|
|||
} elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) {
|
||||
$options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName()));
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("user"),
|
||||
array(
|
||||
|
|
@ -139,18 +139,17 @@ $(document).ready( function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit(getMLText('add'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->columnStart(6);
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) {
|
||||
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
|
||||
}
|
||||
else {
|
||||
$this->infoMsg(getMLText("empty_notify_list"));
|
||||
} else {
|
||||
print "<table class=\"table table-condensed table-sm mt-4\">\n";
|
||||
foreach ($notifyList["users"] as $userNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"fa fa-user\"></i></td>";
|
||||
|
|
@ -162,7 +161,7 @@ $(document).ready( function() {
|
|||
print "<input type=\"hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"hidden\" name=\"userid\" value=\"".$userNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
|
|
@ -179,14 +178,14 @@ $(document).ready( function() {
|
|||
print "<input type=\"hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
|
|
|
|||
|
|
@ -82,13 +82,13 @@ $(document).ready(function() {
|
|||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
|
||||
$this->contentHeading(getMLText("edit_comment"));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.EditComment.php" id="form1" name="form1" method="post">
|
||||
<?php echo createHiddenFieldWithKey('editcomment'); ?>
|
||||
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
|
||||
<input type="Hidden" name="version" value="<?php print $version->getVersion();?>">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("comment"),
|
||||
array(
|
||||
|
|
@ -99,11 +99,11 @@ $(document).ready(function() {
|
|||
'value'=>htmlspecialchars($version->getComment())
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
//require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for EditEvent view
|
||||
|
|
@ -29,7 +29,7 @@ require_once("class.Bootstrap.php");
|
|||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_EditEvent extends SeedDMS_Bootstrap_Style {
|
||||
class SeedDMS_View_EditEvent extends SeedDMS_Theme_Style {
|
||||
|
||||
function js() { /* {{{ */
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
|
|
|
|||
|
|
@ -96,18 +96,18 @@ $(document).ready(function() {
|
|||
$document = $this->params['document'];
|
||||
$version = $this->params['version'];
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="preview-tab">
|
||||
<li class="active"><a data-target="#preview_markdown" data-toggle="tab"><?php printMLText('preview_markdown'); ?></a></li>
|
||||
<li><a data-target="#preview_plain" data-toggle="tab"><?php printMLText('preview_plain'); ?></a></li>
|
||||
<ul class="nav nav-pills" id="preview-tab" role="tablist">
|
||||
<li class="active"><a data-target="#preview_markdown" data-toggle="tab" role="tab"><?php printMLText('preview_markdown'); ?></a></li>
|
||||
<li><a data-target="#preview_plain" data-toggle="tab" role="tab"><?php printMLText('preview_plain'); ?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="preview_markdown">
|
||||
<div class="tab-pane active" id="preview_markdown" role="tabpanel">
|
||||
<?php
|
||||
$Parsedown = new Parsedown();
|
||||
echo $Parsedown->text(file_get_contents($dms->contentDir . $version->getPath()));
|
||||
?>
|
||||
</div>
|
||||
<div class="tab-pane" id="preview_plain">
|
||||
<div class="tab-pane" id="preview_plain" role="tabpanel">
|
||||
<?php
|
||||
echo "<pre>".htmlspecialchars(file_get_contents($dms->contentDir . $version->getPath()), ENT_SUBSTITUTE)."</pre>";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ $(document).ready( function() {
|
|||
$this->pageNavigation(getMLText("my_account"), "my_account");
|
||||
|
||||
$this->contentHeading(getMLText("edit_user_details"));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form">
|
||||
<?php echo createHiddenFieldWithKey('edituserdata'); ?>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("current_password"),
|
||||
array(
|
||||
|
|
@ -118,12 +118,12 @@ $(document).ready( function() {
|
|||
);
|
||||
$this->formField(
|
||||
getMLText("new_password"),
|
||||
'<input class="pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">'
|
||||
'<input class="form-control pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">'
|
||||
);
|
||||
if($passwordstrength) {
|
||||
$this->formField(
|
||||
getMLText("password_strength"),
|
||||
'<div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>'
|
||||
'<div id="strengthbar" class="progress" style="_width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>'
|
||||
);
|
||||
}
|
||||
$this->formField(
|
||||
|
|
@ -206,12 +206,12 @@ $(document).ready( function() {
|
|||
)
|
||||
);
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -101,12 +101,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$extname = $this->params['extname'];
|
||||
$extconf = $extmgr->getExtensionConfiguration();
|
||||
|
||||
echo "<table class=\"table _table-condensed\">\n";
|
||||
echo "<table class=\"table\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText('name')."</th>\n";
|
||||
print "<th>".getMLText('version')."</th>\n";
|
||||
print "<th>".getMLText('author')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
$list = $extmgr->getExtensionListByName($extname);
|
||||
|
|
@ -117,18 +116,18 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
echo "<tr";
|
||||
if(isset($extconf[$re['name']])) {
|
||||
if($needsupdate)
|
||||
echo " class=\"warning\"";
|
||||
echo " class=\"table-warning warning\"";
|
||||
else
|
||||
echo " class=\"success\"";
|
||||
echo " class=\"table-success success\"";
|
||||
}
|
||||
echo ">";
|
||||
echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>";
|
||||
echo "<td>".$re['title']."<br /><small>".$re['description']."</small>";
|
||||
echo "<br /><small>".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company']."</small>";
|
||||
if($checkmsgs)
|
||||
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
|
||||
echo "</td>";
|
||||
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
|
||||
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
|
||||
echo "<td nowrap>";
|
||||
echo "<div class=\"list-action\">";
|
||||
if(!$checkmsgs && $extmgr->isWritableExtDir())
|
||||
|
|
@ -178,12 +177,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$extdir = $this->params['extdir'];
|
||||
$extconf = $extmgr->getExtensionConfiguration();
|
||||
|
||||
echo "<table id=\"extensionlist\" class=\"table _table-condensed\">\n";
|
||||
echo "<table id=\"extensionlist\" class=\"table\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText('name')."</th>\n";
|
||||
print "<th>".getMLText('version')."</th>\n";
|
||||
print "<th>".getMLText('author')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
$errmsgs = array();
|
||||
|
|
@ -194,11 +192,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$extmgr->checkExtension($extname);
|
||||
$errmsgs = $extmgr->getErrorMsgs();
|
||||
if($errmsgs)
|
||||
echo "<tr class=\"error\" ref=\"".$extname."\">";
|
||||
echo "<tr class=\"table-danger error\" ref=\"".$extname."\">";
|
||||
else
|
||||
echo "<tr class=\"success\" ref=\"".$extname."\">";
|
||||
echo "<tr class=\"table-success success\" ref=\"".$extname."\">";
|
||||
} else {
|
||||
echo "<tr class=\"warning\" ref=\"".$extname."\">";
|
||||
echo "<tr class=\"table-warning warning\" ref=\"".$extname."\">";
|
||||
}
|
||||
echo "<td width=\"32\">";
|
||||
if($extconf['icon'])
|
||||
|
|
@ -206,17 +204,17 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
echo "</td>";
|
||||
echo "<td>".$extconf['title'];
|
||||
echo "<br /><small>".$extconf['description']."</small>";
|
||||
echo "<br /><small>".getMLText('author').": <a href=\"mailto:".htmlspecialchars($extconf['author']['email'])."\">".$extconf['author']['name']."</a>, ".$extconf['author']['company']."</small>";
|
||||
if($errmsgs)
|
||||
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $errmsgs)."</div>";
|
||||
echo "</td>";
|
||||
echo "<td nowrap>".$extconf['version'];
|
||||
echo "<br /><small>".$extconf['releasedate']."</small>";
|
||||
echo "</td>";
|
||||
echo "<td nowrap><a href=\"mailto:".htmlspecialchars($extconf['author']['email'])."\">".$extconf['author']['name']."</a><br /><small>".$extconf['author']['company']."</small></td>";
|
||||
echo "<td nowrap>";
|
||||
echo "<div class=\"list-action\">";
|
||||
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
|
||||
echo "<a data-target=\"#extensionChangelog\" href=\"../out/out.ExtensionMgr.php?action=changelog&extensionname=".$extname."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_changelog')."\"><i class=\"fa fa-reorder\"></i></a>\n";
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=changelog&extensionname='.$extname, 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>'));
|
||||
}
|
||||
if($extconf['config'])
|
||||
echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>";
|
||||
|
|
@ -271,12 +269,12 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$this->columnEnd();
|
||||
$this->columnStart(8);
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="extensionstab">
|
||||
<li class="nav-item <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" data-target="#installed" data-toggle="tab"><?= getMLText('extension_mgr_installed'); ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'repository') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'repository') echo 'active'; ?>" data-target="#repository" data-toggle="tab"><?= getMLText('extension_mgr_repository'); ?></a></li>
|
||||
<ul class="nav nav-pills" id="extensionstab" role="tablist">
|
||||
<li class="nav-item <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" data-target="#installed" data-toggle="tab" role="tab"><?= getMLText('extension_mgr_installed'); ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'repository') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'repository') echo 'active'; ?>" data-target="#repository" data-toggle="tab" role="tab"><?= getMLText('extension_mgr_repository'); ?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" id="installed">
|
||||
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'installed') echo 'active'; ?>" id="installed" role="tabpanel">
|
||||
<input id="extensionfilter" type="text">
|
||||
<div class="ajax" data-view="ExtensionMgr" data-action="installedList"></div>
|
||||
<?php
|
||||
|
|
@ -289,15 +287,14 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane <?php if($currenttab == 'repository') echo 'active'; ?>" id="repository">
|
||||
<div class="tab-pane <?php if($currenttab == 'repository') echo 'active'; ?>" id="repository" role="tabpanel">
|
||||
<?php
|
||||
if($extmgr->getRepositoryUrl()) {
|
||||
echo "<table class=\"table _table-condensed\">\n";
|
||||
echo "<table class=\"table\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText('name')."</th>\n";
|
||||
print "<th>".getMLText('version')."</th>\n";
|
||||
print "<th>".getMLText('author')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
$list = $extmgr->getExtensionList();
|
||||
|
|
@ -310,23 +307,23 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
echo "<tr";
|
||||
if(isset($extconf[$re['name']])) {
|
||||
if($needsupdate)
|
||||
echo " class=\"warning\"";
|
||||
echo " class=\"table-warning warning\"";
|
||||
else
|
||||
echo " class=\"success\"";
|
||||
echo " class=\"table-success success\"";
|
||||
}
|
||||
echo ">";
|
||||
echo "<td width=\"32\">".($re['icon-data'] ? '<img width="32" height="32" alt="'.$re['name'].'" title="'.$re['name'].'" src="'.$re['icon-data'].'">' : '')."</td>";
|
||||
echo "<td>".$re['title'];
|
||||
echo "<br /><small>".$re['description']."</small>";
|
||||
echo "<br /><small>".getMLText('author').": ".$re['author']['name'].", ".$re['author']['company']."</small>";
|
||||
if($checkmsgs)
|
||||
echo "<div><img src=\"".$this->getImgPath("attention.gif")."\"> ".implode('<br /><img src="'.$this->getImgPath("attention.gif").'"> ', $checkmsgs)."</div>";
|
||||
echo "</td>";
|
||||
echo "<td nowrap>".$re['version']."<br /><small>".$re['releasedate']."</small></td>";
|
||||
echo "<td nowrap>".$re['author']['name']."<br /><small>".$re['author']['company']."</small></td>";
|
||||
echo "<td nowrap>";
|
||||
echo "<div class=\"list-action\">";
|
||||
echo "<a data-target=\"#extensionInfo\" href=\"../out/out.ExtensionMgr.php?action=info_versions&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_version_list')."\"><i class=\"fa fa-list-ol\"></i></a>\n";
|
||||
echo "<a data-target=\"#extensionChangelog\" href=\"../out/out.ExtensionMgr.php?action=info_changelog&extensionname=".$re['name']."\" data-toggle=\"modal\" title=\"".getMLText('show_extension_changelog')."\"><i class=\"fa fa-reorder\"></i></a>\n";
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionInfo', 'remote'=>'out.ExtensionMgr.php?action=info_versions&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-list-ol"></i>'));
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=info_changelog&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>'));
|
||||
if(!$checkmsgs && $extmgr->isWritableExtDir())
|
||||
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$re['name']."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"currenttab\" value=\"repository\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$re['name']."\" title=\"".getMLText('import_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
|
||||
echo "</div>";
|
||||
|
|
@ -352,33 +349,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
<?php
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
?>
|
||||
<div class="modal modal-wide hide" id="extensionInfo" tabindex="-1" role="dialog" aria-labelledby="extensionInfoLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="extensionInfoLabel"><?= getMLText("extension_version_list") ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php printMLText('extension_loading') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal modal-wide hide" id="extensionChangelog" tabindex="-1" role="dialog" aria-labelledby="extensionChangelogLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="extensionChangelogLabel"><?= getMLText("extension_changelog") ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php printMLText('changelog_loading') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo $this->getModalBox(array('id'=>'extensionInfo', 'title'=>getMLText('extension_version_list'), 'content'=>'<p>'.getMLText('extension_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
|
||||
echo $this->getModalBox(array('id'=>'extensionChangelog', 'title'=>getMLText('extension_changelog'), 'content'=>'<p>'.getMLText('changelog_loading').'</p>', 'buttons'=>array(array('title'=>getMLText('close')))));
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -136,14 +136,14 @@ $(document).ready(function() {
|
|||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||
<input type="hidden" name="action" value="notinherit">
|
||||
<input type="hidden" name="mode" value="copy">
|
||||
<input type="submit" class="btn" value="<?php printMLText("inherits_access_copy_msg")?>">
|
||||
<input type="submit" class="btn btn-primary" value="<?php printMLText("inherits_access_copy_msg")?>">
|
||||
</form>
|
||||
<form action="../op/op.FolderAccess.php" style="display: inline-block;">
|
||||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||
<input type="hidden" name="action" value="notinherit">
|
||||
<input type="hidden" name="mode" value="empty">
|
||||
<input type="submit" class="btn" value="<?php printMLText("inherits_access_empty_msg")?>">
|
||||
<input type="submit" class="btn btn-primary" value="<?php printMLText("inherits_access_empty_msg")?>">
|
||||
</form>
|
||||
</p>
|
||||
<?php
|
||||
|
|
@ -159,7 +159,7 @@ $(document).ready(function() {
|
|||
<?php echo createHiddenFieldWithKey('folderaccess'); ?>
|
||||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||
<input type="hidden" name="action" value="inherit">
|
||||
<input type="submit" class="btn" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
||||
<input type="submit" class="btn btn-primary" value="<?php printMLText("does_not_inherit_access_msg")?>">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ $(document).ready(function() {
|
|||
|
||||
$this->rowStart();
|
||||
$this->columnStart(6);
|
||||
$this->contentContainerStart();
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -111,6 +110,7 @@ $(document).ready(function() {
|
|||
} elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) {
|
||||
$options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName()));
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("user"),
|
||||
array(
|
||||
|
|
@ -139,18 +139,17 @@ $(document).ready(function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit(getMLText('add'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->columnStart(6);
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
if (empty($notifyList["users"]) && empty($notifyList["groups"])) {
|
||||
print "<tr><td>".getMLText("empty_notify_list")."</td></tr>";
|
||||
}
|
||||
else {
|
||||
$this->infoMsg(getMLText("empty_notify_list"));
|
||||
} else {
|
||||
print "<table class=\"table table-condensed table-sm\">\n";
|
||||
foreach ($notifyList["users"] as $userNotify) {
|
||||
print "<tr>";
|
||||
print "<td><i class=\"fa fa-user\"></i></td>";
|
||||
|
|
@ -162,7 +161,7 @@ $(document).ready(function() {
|
|||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
|
|
@ -179,14 +178,14 @@ $(document).ready(function() {
|
|||
print "<input type=\"Hidden\" name=\"action\" value=\"delnotify\">\n";
|
||||
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupNotify->getID()."\">\n";
|
||||
print "<td>";
|
||||
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button>";
|
||||
print "</td>";
|
||||
print "</form>\n";
|
||||
}else print "<td></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="action" value="addgroup">
|
||||
<?php
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("name"),
|
||||
array(
|
||||
|
|
@ -207,14 +208,15 @@ $(document).ready( function() {
|
|||
'value'=>($group ? htmlspecialchars($group->getComment()) : '')
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
if($group) {
|
||||
$this->contentSubHeading(getMLText("group_members"));
|
||||
$this->contentHeading(getMLText("group_members"));
|
||||
?>
|
||||
<table class="table-condensed">
|
||||
<table class="table table-condensed table-sm">
|
||||
<?php
|
||||
$members = $group->getUsers();
|
||||
if (count($members) == 0)
|
||||
|
|
@ -228,9 +230,9 @@ $(document).ready( function() {
|
|||
print "<td>" . htmlspecialchars($member->getFullName()) . "</td>";
|
||||
print "<td>" . ($group->isMember($member,true)?getMLText("manager"):" ") . "</td>";
|
||||
print "<td>";
|
||||
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"action\" value=\"rmmember\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('rmmember')."<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
|
||||
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"action\" value=\"rmmember\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('rmmember')."<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i><span class=\"d-none d-lg-block\"> ".getMLText("delete")."</span></button></form>";
|
||||
print " ";
|
||||
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"tmanager\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('tmanager')."<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-random\"></i> ".getMLText("toggle_manager")."</button></form>";
|
||||
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"tmanager\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('tmanager')."<button type=\"submit\" class=\"btn btn-secondary btn-mini btn-sm\"><i class=\"fa fa-random\"></i><span class=\"d-none d-lg-block\"> ".getMLText("toggle_manager")."</span></button></form>";
|
||||
print "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
|
@ -238,7 +240,7 @@ $(document).ready( function() {
|
|||
</table>
|
||||
|
||||
<?php
|
||||
$this->contentSubHeading(getMLText("add_member"));
|
||||
$this->contentHeading(getMLText("add_member"));
|
||||
?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.GroupMgr.php" method="POST" name="form_2" id="form_2">
|
||||
|
|
@ -246,6 +248,7 @@ $(document).ready( function() {
|
|||
<input type="Hidden" name="action" value="addmember">
|
||||
<input type="Hidden" name="groupid" value="<?php print $group->getID();?>">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
$allUsers = $dms->getAllUsers($sortusersinlist);
|
||||
foreach ($allUsers as $currUser) {
|
||||
|
|
@ -271,6 +274,7 @@ $(document).ready( function() {
|
|||
'value'=>1
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('add'));
|
||||
?>
|
||||
</form>
|
||||
|
|
@ -329,13 +333,11 @@ $(document).ready( function() {
|
|||
}
|
||||
$this->columnEnd();
|
||||
$this->columnStart(8);
|
||||
$this->contentContainerStart();
|
||||
if($accessop->check_view_access($this, array('action'=>'form'))) {
|
||||
?>
|
||||
<div class="ajax" data-view="GroupMgr" data-action="form" <?php echo ($selgroup ? "data-query=\"groupid=".$selgroup->getID()."\"" : "") ?>></div>
|
||||
<?php
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
$this->contentEnd();
|
||||
|
|
|
|||
|
|
@ -115,99 +115,88 @@ myTA.focus();
|
|||
<div>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="inputDescription"><?php echo getMLText("keywords")?>:</td>
|
||||
<td><textarea id="keywordta" rows="5" cols="30"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="inputDescription"><?php echo getMLText("global_default_keywords")?>:</td>
|
||||
<td>
|
||||
<select _onchange="showKeywords(0)" id="categories0">
|
||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
||||
<?php
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if (!$owner->isAdmin())
|
||||
continue;
|
||||
|
||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if (!$owner->isAdmin())
|
||||
continue;
|
||||
?>
|
||||
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
|
||||
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$lists = $category->getKeywordLists();
|
||||
|
||||
if (count($lists) == 0) print getMLText("no_default_keywords");
|
||||
else {
|
||||
print "<ul>";
|
||||
foreach ($lists as $list) {
|
||||
print "<li><a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\">".htmlspecialchars($list["keywords"])."</a></li>";
|
||||
}
|
||||
print "</ul>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="inputDescription"><?php echo getMLText("personal_default_keywords")?>:</td>
|
||||
<td>
|
||||
<select _onchange="showKeywords(1)" id="categories1">
|
||||
<option value="-1"><?php echo getMLText("choose_category")?>
|
||||
<?php
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if ($owner->isAdmin())
|
||||
continue;
|
||||
|
||||
print "<option value=\"".$category->getID()."\">" . htmlspecialchars($category->getName());
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText("keywords"),
|
||||
array(
|
||||
'element'=>'textarea',
|
||||
'id'=>'keywordta',
|
||||
'rows'=>4,
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
$options[] = array('-1', getMLText('choose_category'));
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if ($owner->isAdmin())
|
||||
continue;
|
||||
?>
|
||||
<tr id="keywords<?php echo $category->getID()?>" style="display : none;">
|
||||
<td valign="top" class="inputDescription"><?php echo getMLText("default_keywords")?>:</td>
|
||||
<td class="standardText">
|
||||
<?php
|
||||
$lists = $category->getKeywordLists();
|
||||
if (count($lists) == 0) print getMLText("no_default_keywords");
|
||||
else {
|
||||
print "<ul>";
|
||||
foreach ($lists as $list) {
|
||||
print "<li><a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\">".htmlspecialchars($list["keywords"])."</a></li>";
|
||||
}
|
||||
print "</ul>";
|
||||
if($owner->isAdmin())
|
||||
$options[] = array(''.$category->getID(), htmlspecialchars($category->getName()));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("global_default_keywords"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'categories0',
|
||||
'options'=>$options,
|
||||
)
|
||||
);
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if($owner->isAdmin()) {
|
||||
$lists = $category->getKeywordLists();
|
||||
if(count($lists)) {
|
||||
$kw = array();
|
||||
foreach ($lists as $list) {
|
||||
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo '<div id="keywords'.$category->getId().'" style="display: none;">';
|
||||
$this->formField(
|
||||
getMLText("default_keywords"),
|
||||
array(
|
||||
'element'=>'plain',
|
||||
'name'=>'categories0',
|
||||
'value'=>implode(' ', $kw),
|
||||
)
|
||||
);
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$options = array();
|
||||
$options[] = array('-1', getMLText('choose_category'));
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if(!$owner->isAdmin())
|
||||
$options[] = array(''.$category->getID(), htmlspecialchars($category->getName()));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("personal_default_keywords"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>'categories1',
|
||||
'options'=>$options,
|
||||
)
|
||||
);
|
||||
foreach ($categories as $category) {
|
||||
$owner = $category->getOwner();
|
||||
if(!$owner->isAdmin()) {
|
||||
$lists = $category->getKeywordLists();
|
||||
if(count($lists)) {
|
||||
$kw = array();
|
||||
foreach ($lists as $list) {
|
||||
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";
|
||||
}
|
||||
echo '<div id="keywords'.$category->getId().'" style="display: none;">';
|
||||
$this->formField(
|
||||
getMLText("default_keywords"),
|
||||
array(
|
||||
'element'=>'plain',
|
||||
'name'=>'categories0',
|
||||
'value'=>implode(', ', $kw),
|
||||
)
|
||||
);
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
echo '<script src="../out/out.KeywordChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
|
||||
// $this->htmlEndPage();
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
|
|||
|
||||
if ($print_header){
|
||||
print "<form action=\"out.RemoveLog.php\" method=\"get\">\n";
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
print "<table class=\"table table-condensed table-sm\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("creation_date")."</th>\n";
|
||||
print "<th>".getMLText("file_size")."</th>\n";
|
||||
print "<th class=\"d-none d-lg-table-cell\">".getMLText("file_size")."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$print_header=false;
|
||||
|
|
@ -53,35 +53,35 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
|
|||
print "<td><input type=\"checkbox\" name=\"logname[]\" value=\"".$entry."\"/></td>\n";
|
||||
print "<td><a href=\"out.LogManagement.php?logname=".$entry."\">".$entry."</a></td>\n";
|
||||
print "\n";
|
||||
print "<td>".getLongReadableDate(filectime($this->logdir.$entry))."</td>\n";
|
||||
print "<td>".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry))."</td>\n";
|
||||
print "<td>".getReadableDate(filectime($this->logdir.$entry))."</td>\n";
|
||||
print "<td class=\"d-none d-lg-table-cell\">".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry))."</td>\n";
|
||||
print "<td>";
|
||||
|
||||
if($accessop->check_view_access('RemoveLog')) {
|
||||
print "<a href=\"out.RemoveLog.php?mode=".$mode."&logname=".$entry."\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("rm_file")."</a>";
|
||||
print "<a href=\"out.RemoveLog.php?mode=".$mode."&logname=".$entry."\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i><span class=\"d-none d-lg-block\"> ".getMLText("rm_file")."</span></a>";
|
||||
}
|
||||
if($accessop->check_controller_access('Download', array('action'=>'log'))) {
|
||||
print " ";
|
||||
print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText("download")."</a>";
|
||||
print "<a href=\"../op/op.Download.php?logname=".$entry."\" class=\"btn btn-secondary btn-mini btn-sm\"><i class=\"fa fa-download\"></i><span class=\"d-none d-lg-block\"> ".getMLText("download")."</span></a>";
|
||||
}
|
||||
print " ";
|
||||
print "<a data-target=\"#logViewer\" data-cache=\"false\" href=\"out.LogManagement.php?logname=".$entry."\" role=\"button\" class=\"btn btn-mini\" data-toggle=\"modal\"><i class=\"fa fa-eye-open\"></i> ".getMLText('view')." …</a>";
|
||||
echo $this->getModalBoxLink(array('target'=>'logViewer', 'remote'=>'out.LogManagement.php?logname='.$entry, 'class'=>'btn btn-primary btn-mini btn-sm', 'title'=>'<i class="fa fa-eye"></i><span class="d-none d-lg-block"> '.getMLText('view').'</span>', 'attributes'=>array('data-modal-title'=>$entry)));
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if ($print_header) printMLText("empty_list");
|
||||
else print "<tr><td><i class=\"fa fa-arrow-up\"></i></td><td colspan=\"2\"><button type=\"submit\" class=\"btn\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n";
|
||||
else print "<tr><td><span id=\"toggleall\"><i class=\"fa fa-exchange\"></i></span></td><td colspan=\"3\"><button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n";
|
||||
} /* }}} */
|
||||
|
||||
function js() { /* {{{ */
|
||||
header('Content-Type: application/javascript; charset=UTF-8');
|
||||
?>
|
||||
$(document).ready( function() {
|
||||
$('i.fa fa-arrow-up').on('click', function(e) {
|
||||
$('#toggleall').on('click', function(e) {
|
||||
//var checkBoxes = $("input[type=checkbox]");
|
||||
//checkBoxes.prop("checked", !checkBoxes.prop("checked"));
|
||||
$('input[type=checkbox]').prop('checked', true);
|
||||
$("input[type=checkbox]").each(function () { this.checked = !this.checked; });
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -126,35 +126,23 @@ $(document).ready( function() {
|
|||
$wentries = array_reverse($wentries);
|
||||
}
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="logtab">
|
||||
<li <?php echo ($mode == 'web') ? 'class="active"' : ''; ?>><a data-target="#web" data-toggle="tab">web</a></li>
|
||||
<li <?php echo ($mode == 'webdav') ? 'class="active"' : ''; ?>><a data-target="#webdav" data-toggle="tab">webdav</a></li>
|
||||
<ul class="nav nav-pills" id="logtab" role="tablist">
|
||||
<?php $this->showPaneHeader('web', 'web', (!$mode || $mode == 'web')); ?>
|
||||
<?php $this->showPaneHeader('webdav', 'webdav', (!$mode || $mode == 'webdav')); ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane <?php echo ($mode == 'web') ? 'active' : ''; ?>" id="web">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->showStartPaneContent('web', (!$mode || $mode == 'web'));
|
||||
$this->filelist($entries, 'web');
|
||||
$this->contentContainerEnd();
|
||||
?>
|
||||
</div>
|
||||
<div class="tab-pane <?php echo ($mode == 'webdav') ? 'active' : ''; ?>" id="webdav">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->showEndPaneContent('web', $mode);
|
||||
|
||||
$this->showStartPaneContent('webdav', (!$mode || $mode == 'webdav'));
|
||||
$this->filelist($wentries, 'webdav');
|
||||
$this->contentContainerEnd();
|
||||
$this->showEndPaneContent('webdav', $mode);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal hide" style="width: 900px; margin-left: -450px;" id="logViewer" tabindex="-1" role="dialog" aria-labelledby="docChooserLabel" aria-hidden="true">
|
||||
<div class="modal-body">
|
||||
<p><?php printMLText('logfile_loading') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php print getMLText("close"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->getModalBox(array('id'=>'logViewer', 'title'=>getMLText('logfile'), 'buttons'=>array(array('title'=>getMLText('close')))));
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} elseif(file_exists($this->logdir.$logname)){
|
||||
|
|
|
|||
|
|
@ -49,18 +49,18 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Theme_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("move_document"));
|
||||
$this->contentContainerStart('warning');
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.MoveDocument.php" name="form1">
|
||||
<?php echo createHiddenFieldWithKey('movedocument'); ?>
|
||||
<input type="hidden" name="documentid" value="<?php print $document->getID();?>">
|
||||
<?php
|
||||
$this->contentContainerStart('warning');
|
||||
$this->formField(getMLText("choose_target_folder"), $this->getFolderChooserHtml("form1", M_READWRITE, -1, $target));
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit(getMLText('move'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Theme_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||
$this->contentHeading(getMLText("move_folder"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.MoveFolder.php" name="form1">
|
||||
|
|
@ -56,14 +55,13 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Theme_Style {
|
|||
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(getMLText("choose_target_folder"), $this->getFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target));
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit(getMLText('move_folder'));
|
||||
?>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ require_once("SeedDMS/Preview.php");
|
|||
class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
||||
|
||||
protected function printListHeader($resArr, $previewer, $order=false) { /* {{{ */
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
if($order) {
|
||||
|
|
@ -103,9 +103,9 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
|
||||
if($objects) {
|
||||
if($repair) {
|
||||
echo "<div class=\"alert\">".getMLText('repairing_objects')."</div>";
|
||||
$this->warningMsg(getMLText('repairing_objects'));
|
||||
}
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
|
|
@ -114,6 +114,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
print "<th>".getMLText("error")."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$needsrepair = false;
|
||||
foreach($objects as $object) {
|
||||
if($object['object']->isType('document')) {
|
||||
$document = $object['object'];
|
||||
|
|
@ -123,6 +124,11 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
echo $txt;
|
||||
else
|
||||
echo $this->documentListRow($document, $previewer, false);
|
||||
echo "<td>".$object['msg'];
|
||||
if($repair)
|
||||
$document->repair();
|
||||
echo "</td>";
|
||||
$needsrepair = true;
|
||||
}
|
||||
} elseif($object['object']->isType('documentcontent')) {
|
||||
$document = $object['object']->getDocument();
|
||||
|
|
@ -145,16 +151,19 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
echo $txt;
|
||||
else
|
||||
echo $this->folderListRow($folder, true);
|
||||
echo "<td>".$object['msg']."</td>";
|
||||
echo "<td>".$object['msg'];
|
||||
if($repair)
|
||||
$folder->repair();
|
||||
echo "</td>";
|
||||
echo $this->folderListRowEnd($folder);
|
||||
$needsrepair = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->needsrepair = false;
|
||||
print "</tbody></table>\n";
|
||||
|
||||
if($this->needsrepair && $repair == 0) {
|
||||
echo '<p><a class="btn btn-primary" href="out.ObjectCheck.php?repair=1">'.getMLText('do_object_repair').'</a></p>';
|
||||
if($needsrepair && $repair == 0) {
|
||||
echo '<div class="repair"><a class="btn btn-primary" href="out.ObjectCheck.php?list=listRepair&repair=1">'.getMLText('do_object_repair').'</a></div>';
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
|
@ -167,7 +176,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
|
||||
$this->contentHeading(getMLText("unlinked_folders"));
|
||||
if($unlinkedfolders) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("id")."</th>\n";
|
||||
|
|
@ -196,7 +205,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
|
||||
$this->contentHeading(getMLText("unlinked_documents"));
|
||||
if($unlinkeddocuments) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("id")."</th>\n";
|
||||
|
|
@ -230,7 +239,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
}
|
||||
|
||||
if($unlinkedcontent) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("document")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
|
|
@ -263,7 +272,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
|
||||
$this->contentHeading(getMLText("missing_filesize"));
|
||||
if($nofilesizeversions) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("document")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
|
|
@ -307,7 +316,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
$this->contentHeading(getMLText("missing_checksum"));
|
||||
|
||||
if($nochecksumversions) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("document")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
|
|
@ -350,7 +359,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
$this->contentHeading(getMLText("wrong_filetype"));
|
||||
|
||||
if($wrongfiletypeversions) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("document")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
|
|
@ -393,7 +402,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
$this->contentHeading(getMLText("duplicate_content"));
|
||||
|
||||
if($duplicateversions) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("document")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
|
|
@ -476,7 +485,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
$this->contentHeading(getMLText($process."s_without_".$ug));
|
||||
|
||||
if($processwithoutusergroup[$process][$ug]) {
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<table class=\"table table-condensed table-sm\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText("process")."</th>\n";
|
||||
print "<th>".getMLText("user_group")."</th>\n";
|
||||
|
|
@ -545,7 +554,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
|
|||
$this->printClickDocumentJs();
|
||||
?>
|
||||
$(document).ready( function() {
|
||||
$('body').on('click', 'ul.bs-docs-sidenav li a', function(ev){
|
||||
$('body').on('click', 'ul.sidenav li a', function(ev){
|
||||
ev.preventDefault();
|
||||
$('#kkkk.ajax').data('action', $(this).data('action'));
|
||||
$('#kkkk.ajax').trigger('update', {orderby: $(this).data('orderby')});
|
||||
|
|
@ -593,46 +602,44 @@ $(document).ready( function() {
|
|||
$repairobjects = $this->params['repairobjects'];
|
||||
$this->enableClipboard = $this->params['enableclipboard'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
// $this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||
|
||||
echo '<div class="row-fluid">';
|
||||
echo '<div class="span3">';
|
||||
$this->rowStart();
|
||||
$this->columnStart(3);
|
||||
$this->contentHeading(getMLText("object_check_critical"));
|
||||
echo '<ul class="nav nav-list bs-docs-sidenav _affix">';
|
||||
echo '<li class=""><a data-href="#all_documents" data-action="listRepair"><span class="badge '.($repairobjects ? 'badge-info ' : '').'badge-right">'.count($repairobjects).'</span>'.getMLText("objectcheck").'</a></li>';
|
||||
echo '<li class=""><a data-href="#unlinked_folders" data-action="listUnlinkedFolders"><span class="badge '.($unlinkedfolders ? 'badge-info ' : '').'badge-right">'.count($unlinkedfolders).'</span>'.getMLText("unlinked_folders").'</a></li>';
|
||||
echo '<li class=""><a data-href="#unlinked_documents" data-action="listUnlinkedDocuments"><span class="badge '.($unlinkeddocuments ? 'badge-info ' : '').'badge-right">'.count($unlinkeddocuments).'</span>'.getMLText("unlinked_documents").'</a></li>';
|
||||
echo '<li class=""><a data-href="#unlinked_content" data-action="listUnlinkedContent"><span class="badge '.($unlinkedcontent ? 'badge-info ' : '').'badge-right">'.count($unlinkedcontent).'</span>'.getMLText("unlinked_content").'</a></li>';
|
||||
echo '<li class=""><a data-href="#missing_filesize" data-action="listMissingFileSize"><span class="badge '.($nofilesizeversions ? 'badge-info ' : '').'badge-right">'.count($nofilesizeversions).'</span>'.getMLText("missing_filesize").'</a></li>';
|
||||
echo '<li class=""><a data-href="#missing_checksum" data-action="listMissingChecksum"><span class="badge '.($nochecksumversions ? 'badge-info ' : '').'badge-right">'.count($nochecksumversions).'</span>'.getMLText("missing_checksum").'</a></li>';
|
||||
echo '<li class=""><a data-href="#wrong_filetype" data-action="listWrongFiletype"><span class="badge '.($wrongfiletypeversions ? 'badge-info ' : '').'badge-right">'.count($wrongfiletypeversions).'</span>'.getMLText("wrong_filetype").'</a></li>';
|
||||
echo '</ul>';
|
||||
$menuitems = [];
|
||||
$menuitems[] = array('label'=>getMLText('objectcheck'), 'badge'=>count($repairobjects), 'attributes'=>array(array('data-href', "#all_documents"), array('data-action', "listRepair")));
|
||||
$menuitems[] = array('label'=>getMLText('unlinked_folders'), 'badge'=>count($unlinkedfolders), 'attributes'=>array(array('data-href', "#unlinked_folders"), array('data-action', "listUnlinkedFolders")));
|
||||
$menuitems[] = array('label'=>getMLText('unlinked_documents'), 'badge'=>count($unlinkeddocuments), 'attributes'=>array(array('data-href', "#unlinked_documents"), array('data-action', "listUnlinkedDocuments")));
|
||||
$menuitems[] = array('label'=>getMLText('unlinked_content'), 'badge'=>count($unlinkedcontent), 'attributes'=>array(array('data-href', "#unlinked_content"), array('data-action', "listUnlinkedContent")));
|
||||
$menuitems[] = array('label'=>getMLText('missing_filesize'), 'badge'=>count($nofilesizeversions), 'attributes'=>array(array('data-href', "#missing_filesize"), array('data-action', "listMissingFileSize")));
|
||||
$menuitems[] = array('label'=>getMLText('missing_checksum'), 'badge'=>count($nochecksumversions), 'attributes'=>array(array('data-href', "#missing_checksum"), array('data-action', "listMissingChecksum")));
|
||||
$menuitems[] = array('label'=>getMLText('wrong_filetype'), 'badge'=>count($wrongfiletypeversions), 'attributes'=>array(array('data-href', "#wrong_filetype"), array('data-action', "listWrongFiletype")));
|
||||
self::showNavigationListWithBadges($menuitems);
|
||||
|
||||
$this->contentHeading(getMLText("object_check_warning"));
|
||||
echo '<ul class="nav nav-list bs-docs-sidenav _affix">';
|
||||
echo '<li class=""><a data-href="#duplicate_content" data-action="listDuplicateContent"><span class="badge '.($duplicateversions ? 'badge-info ' : '').'badge-right">'.count($duplicateversions).'</span>'.getMLText("duplicate_content").'</a></li>';
|
||||
echo '<li class=""><a data-href="#inrevision_no_access" data-action="listDocsInRevisionNoAccess"><span class="badge '.($docsinrevision ? 'badge-info ' : '').'badge-right">'.count($docsinrevision).'</span>'.getMLText("docs_in_revision_no_access").'</a></li>';
|
||||
echo '<li class=""><a data-href="#inreception_no_access" data-action="listDocsInReceptionNoAccess"><span class="badge '.($docsinreception ? 'badge-info ' : '').'badge-right">'.count($docsinreception).'</span>'.getMLText("docs_in_reception_no_access").'</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<ul class="nav nav-list bs-docs-sidenav _affix">';
|
||||
$menuitems = [];
|
||||
$menuitems[] = array('label'=>getMLText('duplicate_content'), 'badge'=>count($duplicateversions), 'attributes'=>array(array('data-href', "#duplicate_content"), array('data-action', "listDuplicateContent")));
|
||||
$menuitems[] = array('label'=>getMLText('docs_in_revision_no_access'), 'badge'=>count($docsinrevision), 'attributes'=>array(array('data-href', "#inrevision_no_access"), array('data-action', "listDocsInRevisionNoAccess")));
|
||||
$menuitems[] = array('label'=>getMLText('docs_in_reception_no_access'), 'badge'=>count($docsinreception), 'attributes'=>array(array('data-href', "#inreception_no_access"), array('data-action', "listDocsInReceptionNoAccess")));
|
||||
foreach(array('review', 'approval', 'receipt', 'revision') as $process) {
|
||||
foreach(array('user', 'group') as $ug) {
|
||||
echo '<li class=""><a data-href="#'.$process.'_without_'.$ug.'" data-action="list'.ucfirst($process).'Without'.ucfirst($ug).'"><span class="badge '.($processwithoutusergroup[$process][$ug] ? 'badge-info ' : '').'badge-right">'.count($processwithoutusergroup[$process][$ug]).'</span>'.getMLText($process."s_without_".$ug).'</a></li>';
|
||||
$menuitems[] = array('label'=>getMLText($process."s_without_".$ug), 'badge'=>count($processwithoutusergroup[$process][$ug]), 'attributes'=>array(array('data-href', "#".$process.'_without_'.$ug), array('data-action', "list".ucfirst($process).'Without'.ucfirst($ug))));
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
echo '<div class="span9">';
|
||||
self::showNavigationListWithBadges($menuitems);
|
||||
$this->columnEnd();
|
||||
$this->columnStart(9);
|
||||
|
||||
echo '<div id="kkkk" class="ajax" data-view="ObjectCheck" data-action="'.($listtype ? $listtype : 'listRepair').'"></div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -80,8 +80,6 @@ $(document).ready(function() {
|
|||
|
||||
$this->contentHeading(getMLText("change_status"));
|
||||
|
||||
$this->contentContainerStart();
|
||||
|
||||
// Display the Review form.
|
||||
?>
|
||||
<form class="form-horizontal" method="post" action="../op/op.OverrideContentStatus.php" id="form1" name="form1">
|
||||
|
|
@ -89,6 +87,7 @@ $(document).ready(function() {
|
|||
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
|
||||
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("comment"),
|
||||
array(
|
||||
|
|
@ -115,11 +114,11 @@ $(document).ready(function() {
|
|||
'options'=>$options,
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('update'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -47,19 +47,15 @@ class SeedDMS_View_RemoveDocument extends SeedDMS_Theme_Style {
|
|||
$msg = getMLText('document_is_checked_out_remove');
|
||||
$this->warningMsg($msg);
|
||||
}
|
||||
$this->contentContainerStart('warning');
|
||||
|
||||
$this->warningMsg(getMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName()))));
|
||||
?>
|
||||
<form action="../op/op.RemoveDocument.php" name="form1" method="post">
|
||||
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
|
||||
<?php echo createHiddenFieldWithKey('removedocument'); ?>
|
||||
<p>
|
||||
<?php printMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName())));?>
|
||||
</p>
|
||||
<p><button type="submit" class="btn btn-danger"><i class="fa fa-remove"></i> <?php printMLText("rm_document");?></button></p>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -41,19 +41,15 @@ class SeedDMS_View_RemoveFolder extends SeedDMS_Theme_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||
$this->contentHeading(getMLText("rm_folder"));
|
||||
$this->contentContainerStart();
|
||||
$this->warningMsg(getMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName()))));
|
||||
?>
|
||||
<form action="../op/op.RemoveFolder.php" method="post" name="form1">
|
||||
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>">
|
||||
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
|
||||
<?php echo createHiddenFieldWithKey('removefolder'); ?>
|
||||
<p>
|
||||
<?php printMLText("confirm_rm_folder", array ("foldername" => htmlspecialchars($folder->getName())));?>
|
||||
</p>
|
||||
<p><button class="btn btn-danger" type="submit"><i class="fa fa-remove"></i> <?php printMLText("rm_folder");?></button></p>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -43,17 +43,15 @@ class SeedDMS_View_RemoveVersion extends SeedDMS_Theme_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("rm_version"));
|
||||
$this->contentContainerStart();
|
||||
$this->warningMsg(getMLText("confirm_rm_version", array ("documentname" => htmlspecialchars($document->getName()), "version" => $version->getVersion())));
|
||||
?>
|
||||
<form action="../op/op.RemoveVersion.php" name="form1" method="post">
|
||||
<?php echo createHiddenFieldWithKey('removeversion'); ?>
|
||||
<input type="hidden" name="documentid" value="<?php echo $document->getID()?>">
|
||||
<input type="hidden" name="version" value="<?php echo $version->getVersion()?>">
|
||||
<p><?php printMLText("confirm_rm_version", array ("documentname" => htmlspecialchars($document->getName()), "version" => $version->getVersion()));?></p>
|
||||
<p><button type="submit" class="btn btn-danger"><i class="fa fa-remove"></i> <?php printMLText("rm_version");?></button></p>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="action" value="addrole">
|
||||
<?php
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("role_name"),
|
||||
array(
|
||||
|
|
@ -187,6 +188,7 @@ $(document).ready( function() {
|
|||
)
|
||||
);
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
if($currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'editrole')) || !$currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'addrole'))) {
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText($currRole ? "save" : "add_role"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ $(document).ready( function() {
|
|||
),
|
||||
array(
|
||||
'help'=>$param['description']
|
||||
),
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'password':
|
||||
|
|
@ -426,9 +426,9 @@ $(document).ready( function() {
|
|||
print "</tr></thead><tbody>\n";
|
||||
foreach($tasks as $task) {
|
||||
if(!isset($GLOBALS['SEEDDMS_SCHEDULER']['tasks'][$task->getExtension()][$task->getTask()]) || !is_object(resolveTask($GLOBALS['SEEDDMS_SCHEDULER']['tasks'][$task->getExtension()][$task->getTask()])))
|
||||
$class = 'error';
|
||||
$class = 'table-danger error';
|
||||
else
|
||||
$class = 'success';
|
||||
$class = 'table-success success';
|
||||
echo "<tr id=\"table-row-task-".$task->getID()."\" class=\"".(!$task->getDisabled() ? " ".$class : "")."\">";
|
||||
echo "<td>";
|
||||
echo $task->getExtension()."::".$task->getTask();
|
||||
|
|
|
|||
|
|
@ -71,6 +71,12 @@ $(document).ready( function() {
|
|||
/* Add js for catching click on document in one page mode */
|
||||
$this->printClickDocumentJs();
|
||||
$this->printClickFolderJs();
|
||||
?>
|
||||
$(document).ready(function() {
|
||||
$('body').on('submit', '#form1', function(ev){
|
||||
});
|
||||
});
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function export() { /* {{{ */
|
||||
|
|
@ -91,7 +97,7 @@ $(document).ready( function() {
|
|||
$downmgr->addItem($entry->getLatestContent(), $extracols);
|
||||
}
|
||||
}
|
||||
$filename = tempnam('/tmp', '');
|
||||
$filename = tempnam(sys_get_temp_dir(), '');
|
||||
if(isset($_GET['includecontent']) && $_GET['includecontent']) {
|
||||
$downmgr->createArchive($filename);
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
|
|
@ -184,19 +190,18 @@ function typeahead() { /* {{{ */
|
|||
$enablefullsearch = $this->params['enablefullsearch'];
|
||||
$enableclipboard = $this->params['enableclipboard'];
|
||||
$attributes = $this->params['attributes'];
|
||||
$category = $this->params['category'];
|
||||
$categories = $this->params['categories'];
|
||||
$mimetype = $this->params['mimetype'];
|
||||
$owner = $this->params['owner'];
|
||||
$startfolder = $this->params['startfolder'];
|
||||
$startdate = $this->params['startdate'];
|
||||
$stopdate = $this->params['stopdate'];
|
||||
$createstartdate = $this->params['createstartdate'];
|
||||
$createenddate = $this->params['createenddate'];
|
||||
$expstartdate = $this->params['expstartdate'];
|
||||
$expstopdate = $this->params['expstopdate'];
|
||||
$expenddate = $this->params['expenddate'];
|
||||
$statusstartdate = $this->params['statusstartdate'];
|
||||
$statusstopdate = $this->params['statusstopdate'];
|
||||
$statusenddate = $this->params['statusenddate'];
|
||||
$revisionstartdate = $this->params['revisionstartdate'];
|
||||
$revisionstopdate = $this->params['revisionstopdate'];
|
||||
$revisionenddate = $this->params['revisionenddate'];
|
||||
$creationdate = $this->params['creationdate'];
|
||||
$expirationdate = $this->params['expirationdate'];
|
||||
$statusdate = $this->params['statusdate'];
|
||||
|
|
@ -233,18 +238,19 @@ function typeahead() { /* {{{ */
|
|||
// if ($pageNumber != 'all')
|
||||
// $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("search_results"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("search_results"), "");
|
||||
$this->pageNavigation("", "");
|
||||
|
||||
$this->rowStart();
|
||||
$this->columnStart(4);
|
||||
//echo "<pre>";print_r($_GET);echo "</pre>";
|
||||
$this->contentHeading("<button class=\"btn btn-primary\" id=\"searchform-toggle\" data-toggle=\"collapse\" href=\"#searchform\"><i class=\"fa fa-exchange\"></i></button> ".getMLText('search'), true);
|
||||
if($this->query) {
|
||||
echo "<div id=\"searchform\" class=\"collapse mb-sm-4\">";
|
||||
}
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="searchtab">
|
||||
<ul class="nav nav-pills" id="searchtab">
|
||||
<li class="nav-item <?php echo ($fullsearch == false) ? 'active' : ''; ?>"><a class="nav-link <?php echo ($fullsearch == false) ? 'active' : ''; ?>" data-target="#database" data-toggle="tab"><?php printMLText('databasesearch'); ?></a></li>
|
||||
<?php
|
||||
if($enablefullsearch) {
|
||||
|
|
@ -259,81 +265,86 @@ function typeahead() { /* {{{ */
|
|||
// Database search Form {{{
|
||||
?>
|
||||
<div class="tab-pane <?php echo ($fullsearch == false) ? 'active' : ''; ?>" id="database">
|
||||
<form action="../out/out.Search.php" name="form1">
|
||||
<form class="form-horizontal" action="../out/out.Search.php" name="form1">
|
||||
<input type="hidden" name="fullsearch" value="0" />
|
||||
<?php
|
||||
// General search options {{{
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<table class="table-condensed">
|
||||
<tr>
|
||||
<td><?php printMLText("search_query");?>:</td>
|
||||
<td>
|
||||
<input type="text" name="query" value="<?php echo htmlspecialchars($this->query); ?>" />
|
||||
<select name="mode">
|
||||
<option value="1" <?php echo ($mode=='AND') ? "selected" : ""; ?>><?php printMLText("search_mode_and");?>
|
||||
<option value="0"<?php echo ($mode=='OR') ? "selected" : ""; ?>><?php printMLText("search_mode_or");?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("search_in");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox" for="keywords"><input type="checkbox" id="keywords" name="searchin[]" value="1" <?php if(in_array('1', $searchin)) echo " checked"; ?>><?php printMLText("keywords");?> (<?php printMLText('documents_only'); ?>)</label>
|
||||
<label class="checkbox" for="searchName"><input type="checkbox" name="searchin[]" id="searchName" value="2" <?php if(in_array('2', $searchin)) echo " checked"; ?>><?php printMLText("name");?></label>
|
||||
<label class="checkbox" for="comment"><input type="checkbox" name="searchin[]" id="comment" value="3" <?php if(in_array('3', $searchin)) echo " checked"; ?>><?php printMLText("comment");?></label>
|
||||
<label class="checkbox" for="attributes"><input type="checkbox" name="searchin[]" id="attributes" value="4" <?php if(in_array('4', $searchin)) echo " checked"; ?>><?php printMLText("attributes");?></label>
|
||||
<label class="checkbox" for="id"><input type="checkbox" name="searchin[]" id="id" value="5" <?php if(in_array('5', $searchin)) echo " checked"; ?>><?php printMLText("id");?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select" name="owner[]" data-allow-clear="true" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<option value=""></option>
|
||||
<?php
|
||||
foreach ($allUsers as $userObj) {
|
||||
if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin()))
|
||||
continue;
|
||||
print "<option value=\"".$userObj->getLogin()."\" ".(in_array($userObj->getLogin(), $owner) ? "selected" : "").">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("search_resultmode");?>:</td>
|
||||
<td>
|
||||
<select name="resultmode" class="form-control">
|
||||
<option value="1"<?php echo ($resultmode=='1') ? "selected" : ""; ?>><?php printMLText("search_mode_documents");?>
|
||||
<option value="2"<?php echo ($resultmode=='2') ? "selected" : ""; ?>><?php printMLText("search_mode_folders");?>
|
||||
<option value="3" <?php echo ($resultmode=='3') ? "selected" : ""; ?>><?php printMLText("search_resultmode_both");?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("under_folder")?>:</td>
|
||||
<td><?php $this->printFolderChooserHtml("form1", M_READ, -1, $startfolder);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("creation_date");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="creationdate" value="true" <?php if($creationdate) echo "checked"; ?>/><?php printMLText("between");?>
|
||||
</label><br />
|
||||
<span class="input-append date" style="display: inline;" id="createstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="createstart" type="text" value="<?php if($startdate) printf("%04d-%02d-%02d", $startdate['year'], $startdate['month'], $startdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
<?php printMLText("and"); ?>
|
||||
<span class="input-append date" style="display: inline;" id="createenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="createend" type="text" value="<?php if($stopdate) printf("%04d-%02d-%02d", $stopdate['year'], $stopdate['month'], $stopdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText("search_query"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'text',
|
||||
'name'=>'query',
|
||||
'value'=>htmlspecialchars($this->query)
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
$options[] = array('1', getMLText('search_mode_and'), $mode=='AND');
|
||||
$options[] = array('0', getMLText('search_mode_or'), $mode=='OR');
|
||||
$this->formField(
|
||||
getMLText("search_mode"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'mode',
|
||||
'multiple'=>false,
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
$options[] = array('1', getMLText('keywords').' ('.getMLText('documents_only').')', in_array('1', $searchin));
|
||||
$options[] = array('2', getMLText('name'), in_array('2', $searchin));
|
||||
$options[] = array('3', getMLText('comment'), in_array('3', $searchin));
|
||||
$options[] = array('4', getMLText('attributes'), in_array('4', $searchin));
|
||||
$options[] = array('5', getMLText('id'), in_array('5', $searchin));
|
||||
$this->formField(
|
||||
getMLText("search_in"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'searchin[]',
|
||||
'class'=>'chzn-select',
|
||||
'multiple'=>true,
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
foreach ($allUsers as $currUser) {
|
||||
if($user->isAdmin() || (!$currUser->isGuest() && (!$currObj->isHidden() || $currObj->getID() == $user->getID())))
|
||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), in_array($currUser->getID(), $owner), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("owner"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'owner[]',
|
||||
'class'=>'chzn-select',
|
||||
'multiple'=>true,
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
$options[] = array('1', getMLText('search_mode_documents'), $resultmode==1);
|
||||
$options[] = array('2', getMLText('search_mode_folders'), $resultmode==2);
|
||||
$options[] = array('3', getMLText('search_resultmode_both'), $resultmode==3);
|
||||
$this->formField(
|
||||
getMLText("search_resultmode"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'resultmode',
|
||||
'multiple'=>false,
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->formField(getMLText("under_folder"), $this->getFolderChooserHtml("form1", M_READ, -1, $startfolder));
|
||||
$this->formField(
|
||||
getMLText("creation_date")." (".getMLText('from').")",
|
||||
$this->getDateChooser($createstartdate, "createstart", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("creation_date")." (".getMLText('to').")",
|
||||
$this->getDateChooser($createenddate, "createend", $this->params['session']->getLanguage())
|
||||
);
|
||||
if($attrdefgrps) {
|
||||
$attrdefids = array();
|
||||
foreach($attrdefgrps as $attrdefgrp) {
|
||||
|
|
@ -362,34 +373,17 @@ function typeahead() { /* {{{ */
|
|||
}
|
||||
} elseif($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$attricon = '';
|
||||
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date)
|
||||
echo $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from').' '.getMLText('to').' '.$this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to');
|
||||
else
|
||||
$this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true)
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
|
||||
} else
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td></td><td><button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> <?php printMLText("search"); ?></button></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-search\"></i> ".getMLText('search'));
|
||||
// }}}
|
||||
|
||||
// Seach options for documents {{{
|
||||
|
|
@ -399,14 +393,13 @@ function typeahead() { /* {{{ */
|
|||
$openfilterdlg = false;
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$attricon = '';
|
||||
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
|
||||
if(!empty($attributes[$attrdef->getID()]))
|
||||
$openfilterdlg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($category)
|
||||
if($categories)
|
||||
$openfilterdlg = true;
|
||||
if($status)
|
||||
$openfilterdlg = true;
|
||||
|
|
@ -418,138 +411,94 @@ function typeahead() { /* {{{ */
|
|||
$openfilterdlg = true;
|
||||
if($statusdate)
|
||||
$openfilterdlg = true;
|
||||
?>
|
||||
<?php if($totaldocs): ?>
|
||||
<div class="accordion" id="accordion1">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseExport">
|
||||
<?php printMLText('export'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapseExport" class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<table class="table-condensed">
|
||||
<tr>
|
||||
<td><?= getMLText('content') ?></td><td><label class="checkbox inline"><input id="includecontent" type="checkbox" name="includecontent" value="1"> <?php printMLText("include_content"); ?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><a id="export" class="btn" href="<?= $_SERVER['REQUEST_URI']."&action=export" ?>"><i class="fa fa-download"></i> Export</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="accordion" id="accordion2">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
|
||||
<?php printMLText('filter_for_documents'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapseOne" class="accordion-body <?php if(!$openfilterdlg) echo "collapse";?>">
|
||||
<div class="accordion-inner">
|
||||
<table class="table-condensed">
|
||||
<tr>
|
||||
<td><?php printMLText("category");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select" name="category[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
|
||||
<!--
|
||||
<option value="-1"><?php printMLText("all_categories");?>
|
||||
-->
|
||||
<?php
|
||||
|
||||
if($totaldocs) {
|
||||
ob_start();
|
||||
$this->formField(
|
||||
getMLText("include_content"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'includecontent',
|
||||
'value'=>1,
|
||||
)
|
||||
);
|
||||
$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export'));
|
||||
$content = ob_get_clean();
|
||||
$this->printAccordion(getMLText('export'), $content);
|
||||
}
|
||||
|
||||
/* Start of fields only applicable to documents */
|
||||
ob_start();
|
||||
$tmpcatids = array();
|
||||
foreach($categories as $tmpcat)
|
||||
$tmpcatids[] = $tmpcat->getID();
|
||||
foreach ($allCats as $catObj) {
|
||||
print "<option value=\"".$catObj->getName()."\" ".(in_array($catObj->getID(), $tmpcatids) ? "selected" : "").">" . htmlspecialchars($catObj->getName()) . "\n";
|
||||
$options = array();
|
||||
$allcategories = $dms->getDocumentCategories();
|
||||
foreach($allcategories as $category) {
|
||||
$options[] = array($category->getID(), $category->getName(), in_array($category->getId(), $tmpcatids));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("status");?>:</td>
|
||||
<td>
|
||||
<?php if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { ?>
|
||||
<label class="checkbox" for='draft'><input type="checkbox" id="draft" name="draft" value="1" <?php echo in_array(S_DRAFT, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT);?></label>
|
||||
<?php if($workflowmode == 'traditional') { ?>
|
||||
<label class="checkbox" for='pendingReview'><input type="checkbox" id="pendingReview" name="pendingReview" value="1" <?php echo in_array(S_DRAFT_REV, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_REV);?></label>
|
||||
<?php } ?>
|
||||
<label class="checkbox" for='pendingApproval'><input type="checkbox" id="pendingApproval" name="pendingApproval" value="1" <?php echo in_array(S_DRAFT_APP, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_APP);?></label>
|
||||
<?php } elseif($workflowmode == 'advanced') { ?>
|
||||
<label class="checkbox" for='inWorkflow'><input type="checkbox" id="inWorkflow" name="inWorkflow" value="1" <?php echo in_array(S_IN_WORKFLOW, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_IN_WORKFLOW);?></label>
|
||||
<?php } ?>
|
||||
<label class="checkbox" for='released'><input type="checkbox" id="released" name="released" value="1" <?php echo in_array(S_RELEASED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_RELEASED);?></label>
|
||||
<label class="checkbox" for='rejected'><input type="checkbox" id="rejected" name="rejected" value="1" <?php echo in_array(S_REJECTED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_REJECTED);?></label>
|
||||
<label class="checkbox" for='inrevision'><input type="checkbox" id="inrevision" name="inrevision" value="1" <?php echo in_array(S_IN_REVISION, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_IN_REVISION);?></label>
|
||||
<label class="checkbox" for='obsolete'><input type="checkbox" id="obsolete" name="obsolete" value="1" <?php echo in_array(S_OBSOLETE, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_OBSOLETE);?></label>
|
||||
<label class="checkbox" for='expired'><input type="checkbox" id="expired" name="expired" value="1" <?php echo in_array(S_EXPIRED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_EXPIRED);?></label>
|
||||
<label class="checkbox" for='needs_correction'><input type="checkbox" id="needs_correction" name="needs_correction" value="1" <?php echo in_array(S_NEEDS_CORRECTION, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_NEEDS_CORRECTION);?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("reception");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox" for='reception'><input type="checkbox" id="reception" name="reception[]" value="missingaction" <?php echo in_array('missingaction', $reception) ? "checked" : ""; ?>><?php printMLText('reception_noaction'); ?></label>
|
||||
<label class="checkbox" for='reception'><input type="checkbox" id="reception" name="reception[]" value="hasrejection" <?php echo in_array('hasrejection', $reception) ? "checked" : ""; ?>><?php printMLText('reception_rejected'); ?></label>
|
||||
<label class="checkbox" for='reception'><input type="checkbox" id="reception" name="reception[]" value="hasacknowledge" <?php echo in_array('hasacknowledge', $reception) ? "checked" : ""; ?>><?php printMLText('reception_acknowleged'); ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("expires");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="expirationdate" value="true" <?php if($expirationdate) echo "checked"; ?>/><?php printMLText("between");?>
|
||||
</label><br />
|
||||
<span class="input-append date" style="display: inline;" id="expirationstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="expirationstart" type="text" value="<?php if($expstartdate) printf("%04d-%02d-%02d", $expstartdate['year'], $expstartdate['month'], $expstartdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
<?php printMLText("and"); ?>
|
||||
<span class="input-append date" style="display: inline;" id="expirationenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="expirationend" type="text" value="<?php if($expstopdate) printf("%04d-%02d-%02d", $expstopdate['year'], $expstopdate['month'], $expstopdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("revision");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="revisiondate" value="true" <?php if($revisiondate) echo "checked"; ?>/><?php printMLText("between");?>
|
||||
</label><br />
|
||||
<span class="input-append date" style="display: inline;" id="revisionstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="revisionstart" type="text" value="<?php if($revisionstartdate) printf("%04d-%02d-%02d", $revisionstartdate['year'], $revisionstartdate['month'], $revisionstartdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
<?php printMLText("and"); ?>
|
||||
<span class="input-append date" style="display: inline;" id="revisionenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="revisionend" type="text" value="<?php if($revisionstopdate) printf("%04d-%02d-%02d", $revisionstopdate['year'], $revisionstopdate['month'], $revisionstopdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("status_change");?>:</td>
|
||||
<td>
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="statusdate" value="true" <?php if($statusdate) echo "checked"; ?>/><?php printMLText("between");?>
|
||||
</label><br />
|
||||
<span class="input-append date datepicker" style="display: inline;" id="statusstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="statusstart" type="text" value="<?php if($statusstartdate) printf("%04d-%02d-%02d", $statusstartdate['year'], $statusstartdate['month'], $statusstartdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
<?php printMLText("and"); ?>
|
||||
<span class="input-append date datepicker" style="display: inline;" id="statusenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="statusend" type="text" value="<?php if($statusstopdate) printf("%04d-%02d-%02d", $statusstopdate['year'], $statusstopdate['month'], $statusstopdate['day']); else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText("categories"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'category[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_category'), array('data-no_results_text', getMLText('unknown_document_category')))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$options = array();
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
if($workflowmode == 'traditional') {
|
||||
$options[] = array(S_DRAFT_REV, getOverallStatusText(S_DRAFT_REV), in_array(S_DRAFT_REV, $status));
|
||||
}
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
$options[] = array(S_IN_WORKFLOW, getOverallStatusText(S_IN_WORKFLOW), in_array(S_IN_WORKFLOW, $status));
|
||||
}
|
||||
$options[] = array(S_DRAFT_APP, getOverallStatusText(S_DRAFT_APP), in_array(S_DRAFT_APP, $status));
|
||||
$options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED), in_array(S_RELEASED, $status));
|
||||
$options[] = array(S_REJECTED, getOverallStatusText(S_REJECTED), in_array(S_REJECTED, $status));
|
||||
$options[] = array(S_IN_REVISION, getOverallStatusText(S_IN_REVISION), in_array(S_IN_REVISION, $status));
|
||||
$options[] = array(S_EXPIRED, getOverallStatusText(S_EXPIRED), in_array(S_EXPIRED, $status));
|
||||
$options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE), in_array(S_OBSOLETE, $status));
|
||||
$options[] = array(S_NEEDS_CORRECTION, getOverallStatusText(S_NEEDS_CORRECTION), in_array(S_NEEDS_CORRECTION, $status));
|
||||
$this->formField(
|
||||
getMLText("status"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'status[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_status')), array('data-no_results_text', getMLText('unknown_status'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("expires")." (".getMLText('from').")",
|
||||
$this->getDateChooser($expstartdate, "expirationstart", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("expires")." (".getMLText('to').")",
|
||||
$this->getDateChooser($expenddate, "expirationend", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("revision")." (".getMLText('from').")",
|
||||
$this->getDateChooser($revisionstartdate, "revisiondatestart", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("revision")." (".getMLText('to').")",
|
||||
$this->getDateChooser($revisionenddate, "revisiondateend", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("status_change")." (".getMLText('from').")",
|
||||
$this->getDateChooser($statusstartdate, "statusdatestart", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("status_change")." (".getMLText('to').")",
|
||||
$this->getDateChooser($statusenddate, "statusdateend", $this->params['session']->getLanguage())
|
||||
);
|
||||
if($attrdefgrps) {
|
||||
$attrdefids = array();
|
||||
foreach($attrdefgrps as $attrdefgrp) {
|
||||
|
|
@ -578,59 +527,33 @@ function typeahead() { /* {{{ */
|
|||
}
|
||||
} elseif($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$attricon = '';
|
||||
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date)
|
||||
echo $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from').' '.getMLText('to').' '.$this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to');
|
||||
else
|
||||
$this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true)
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
|
||||
} else
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// }}}
|
||||
|
||||
// Seach options for folders {{{
|
||||
$content = ob_get_clean();
|
||||
$this->printAccordion(getMLText('filter_for_documents'), $content);
|
||||
/* First check if any of the folder filters are set. If it is,
|
||||
* open the accordion.
|
||||
*/
|
||||
$openfilterdlg = false;
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$attricon = '';
|
||||
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) {
|
||||
if(!empty($attributes[$attrdef->getID()]))
|
||||
$openfilterdlg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="accordion" id="accordion3">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion3" href="#collapseFolder">
|
||||
<?php printMLText('filter_for_folders'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapseFolder" class="accordion-body <?php if(!$openfilterdlg) echo "collapse";?>">
|
||||
<div class="accordion-inner">
|
||||
<table class="table-condensed">
|
||||
<?php
|
||||
ob_start();
|
||||
if($attrdefgrps) {
|
||||
$attrdefids = array();
|
||||
foreach($attrdefgrps as $attrdefgrp) {
|
||||
|
|
@ -659,24 +582,17 @@ function typeahead() { /* {{{ */
|
|||
}
|
||||
} elseif($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$attricon = '';
|
||||
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||
<td><?php $this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : null, 'attributes', true) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
|
||||
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
|
||||
} else
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$this->printAccordion(getMLText('filter_for_folders'), $content);
|
||||
// }}}
|
||||
?>
|
||||
</form>
|
||||
|
|
@ -688,84 +604,86 @@ function typeahead() { /* {{{ */
|
|||
// Fulltext search Form {{{
|
||||
if($enablefullsearch) {
|
||||
echo "<div class=\"tab-pane ".(($fullsearch == true) ? 'active' : '')."\" id=\"fulltext\">\n";
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form action="../out/out.Search.php" name="form2" style="min-height: 330px;">
|
||||
<input type="hidden" name="fullsearch" value="1" />
|
||||
<table class="table-condensed">
|
||||
<tr>
|
||||
<td><?php printMLText("search_query");?>:</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" name="query" value="<?php echo htmlspecialchars($this->query); ?>" />
|
||||
<!--
|
||||
<select name="mode">
|
||||
<option value="1" selected><?php printMLText("search_mode_and");?>
|
||||
<option value="0"><?php printMLText("search_mode_or");?>
|
||||
</select>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!isset($facets['owner'])) { ?>
|
||||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select" name="owner[]" data-allow-clear="true" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<option value=""></option>
|
||||
<?php
|
||||
foreach ($allUsers as $userObj) {
|
||||
if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin()))
|
||||
continue;
|
||||
print "<option value=\"".$userObj->getLogin()."\" ".(in_array($userObj->getLogin(), $owner) ? "selected" : "").">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "</option>\n";
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("search_query"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'text',
|
||||
'name'=>'query',
|
||||
'value'=>htmlspecialchars($this->query)
|
||||
)
|
||||
);
|
||||
$this->formField(getMLText("under_folder"), $this->getFolderChooserHtml("form1", M_READ, -1, $startfolder, 'folderfullsearchid'));
|
||||
if(!isset($facets['owner'])) {
|
||||
$options = array();
|
||||
foreach ($allUsers as $currUser) {
|
||||
if($user->isAdmin() || (!$currUser->isGuest() && (!$currObj->isHidden() || $currObj->getID() == $user->getID())))
|
||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), in_array($currUser->getID(), $owner), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if(!isset($facets['category'])) { ?>
|
||||
<tr>
|
||||
<td><?php printMLText("category_filter");?>:</td>
|
||||
<td>
|
||||
<select class="chzn-select" name="categoryids[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
|
||||
<!--
|
||||
<option value="-1"><?php printMLText("all_categories");?>
|
||||
-->
|
||||
<?php
|
||||
$tmpcatids = array();
|
||||
foreach($categories as $tmpcat)
|
||||
$tmpcatids[] = $tmpcat->getID();
|
||||
foreach ($allCats as $catObj) {
|
||||
print "<option value=\"".$catObj->getID()."\" ".(in_array($catObj->getID(), $tmpcatids) ? "selected" : "").">" . htmlspecialchars($catObj->getName()) . "\n";
|
||||
$this->formField(
|
||||
getMLText("owner"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'owner[]',
|
||||
'class'=>'chzn-select',
|
||||
'multiple'=>true,
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td><?php printMLText("status");?>:</td>
|
||||
<td>
|
||||
<?php if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { ?>
|
||||
<?php if($workflowmode == 'traditional') { ?>
|
||||
<label class="checkbox" for='pendingReview'><input type="checkbox" id="pendingReview" name="pendingReview" value="1" <?php echo in_array(S_DRAFT_REV, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_REV);?></label>
|
||||
<?php } ?>
|
||||
<label class="checkbox" for='pendingApproval'><input type="checkbox" id="pendingApproval" name="pendingApproval" value="1" <?php echo in_array(S_DRAFT_APP, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_APP);?></label>
|
||||
<?php } elseif($workflowmode == 'advanced') { ?>
|
||||
<label class="checkbox" for='inWorkflow'><input type="checkbox" id="inWorkflow" name="inWorkflow" value="1" <?php echo in_array(S_IN_WORKFLOW, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_IN_WORKFLOW);?></label>
|
||||
<?php } ?>
|
||||
<label class="checkbox" for='released'><input type="checkbox" id="released" name="released" value="1" <?php echo in_array(S_RELEASED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_RELEASED);?></label>
|
||||
<label class="checkbox" for='rejected'><input type="checkbox" id="rejected" name="rejected" value="1" <?php echo in_array(S_REJECTED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_REJECTED);?></label>
|
||||
<label class="checkbox" for='obsolete'><input type="checkbox" id="obsolete" name="obsolete" value="1" <?php echo in_array(S_OBSOLETE, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_OBSOLETE);?></label>
|
||||
<label class="checkbox" for='expired'><input type="checkbox" id="expired" name="expired" value="1" <?php echo in_array(S_EXPIRED, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_EXPIRED);?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($facets) {
|
||||
if(!isset($facets['category'])) {
|
||||
$tmpcatids = array();
|
||||
foreach($categories as $tmpcat)
|
||||
$tmpcatids[] = $tmpcat->getID();
|
||||
$options = array();
|
||||
$allcategories = $dms->getDocumentCategories();
|
||||
foreach($allcategories as $category) {
|
||||
$options[] = array($category->getID(), $category->getName(), in_array($category->getId(), $tmpcatids));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("category_filter"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'category[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_category'), array('data-no_results_text', getMLText('unknown_document_category')))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
}
|
||||
$options = array();
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
if($workflowmode == 'traditional') {
|
||||
$options[] = array(S_DRAFT_REV, getOverallStatusText(S_DRAFT_REV), in_array(S_DRAFT_REV, $status));
|
||||
}
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
$options[] = array(S_IN_WORKFLOW, getOverallStatusText(S_IN_WORKFLOW), in_array(S_IN_WORKFLOW, $status));
|
||||
}
|
||||
$options[] = array(S_DRAFT_APP, getOverallStatusText(S_DRAFT_APP), in_array(S_DRAFT_APP, $status));
|
||||
$options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED), in_array(S_RELEASED, $status));
|
||||
$options[] = array(S_REJECTED, getOverallStatusText(S_REJECTED), in_array(S_REJECTED, $status));
|
||||
$options[] = array(S_EXPIRED, getOverallStatusText(S_EXPIRED), in_array(S_EXPIRED, $status));
|
||||
$options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE), in_array(S_OBSOLETE, $status));
|
||||
$this->formField(
|
||||
getMLText("status"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'class'=>'chzn-select',
|
||||
'name'=>'status[]',
|
||||
'multiple'=>true,
|
||||
'attributes'=>array(array('data-placeholder', getMLText('select_status')), array('data-no_results_text', getMLText('unknown_status'))),
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
|
||||
if($facets) {
|
||||
foreach($facets as $facetname=>$values) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?= getMLText($facetname);?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$options = array();
|
||||
foreach($values as $v=>$c) {
|
||||
$option = array($v, $v.' ('.$c.')');
|
||||
|
|
@ -774,7 +692,7 @@ foreach($facets as $facetname=>$values) {
|
|||
$options[] = $option;
|
||||
}
|
||||
$this->formField(
|
||||
null,
|
||||
getMLText($facetname),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'id'=>$facetname,
|
||||
|
|
@ -785,18 +703,13 @@ foreach($facets as $facetname=>$values) {
|
|||
'multiple'=>true
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-search\"></i> ".getMLText('search'));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
<tr>
|
||||
<td></td><td><button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> <?php printMLText("search"); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
echo "</div>\n";
|
||||
}
|
||||
// }}}
|
||||
|
|
@ -805,6 +718,7 @@ foreach($facets as $facetname=>$values) {
|
|||
<?php
|
||||
$this->columnEnd();
|
||||
$this->columnStart(8);
|
||||
$this->contentHeading(getMLText('search_results'));
|
||||
// Search Result {{{
|
||||
$foldercount = $doccount = 0;
|
||||
if($entries) {
|
||||
|
|
@ -817,7 +731,7 @@ foreach($facets as $facetname=>$values) {
|
|||
}
|
||||
}
|
||||
*/
|
||||
print "<div class=\"alert alert-info\">".getMLText("search_report", array("doccount" => $totaldocs, "foldercount" => $totalfolders, 'searchtime'=>$searchTime))."</div>";
|
||||
echo $this->infoMsg(getMLText("search_report", array("doccount" => $totaldocs, "foldercount" => $totalfolders, 'searchtime'=>$searchTime)));
|
||||
$this->pageList($pageNumber, $totalpages, "../out/out.Search.php", $urlparams);
|
||||
// $this->contentContainerStart();
|
||||
|
||||
|
|
@ -827,7 +741,7 @@ foreach($facets as $facetname=>$values) {
|
|||
else {
|
||||
parse_str($_SERVER['QUERY_STRING'], $tmp);
|
||||
$tmp['orderby'] = $orderby=="n"||$orderby=="na)"?"nd":"n";
|
||||
print "<table class=\"table table-hover\">";
|
||||
print "<table class=\"table table-condensed table-sm table-hover\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name");
|
||||
|
|
@ -865,7 +779,7 @@ foreach($facets as $facetname=>$values) {
|
|||
$lcattributes = $lc ? $lc->getAttributes() : null;
|
||||
$attrstr = '';
|
||||
if($lcattributes) {
|
||||
$attrstr .= "<table class=\"table table-condensed\">\n";
|
||||
$attrstr .= "<table class=\"table table-condensed table-sm\">\n";
|
||||
$attrstr .= "<tr><th>".getMLText('name')."</th><th>".getMLText('attribute_value')."</th></tr>";
|
||||
foreach($lcattributes as $lcattribute) {
|
||||
$arr = $this->callHook('showDocumentContentAttribute', $lc, $lcattribute);
|
||||
|
|
@ -887,7 +801,7 @@ foreach($facets as $facetname=>$values) {
|
|||
}
|
||||
$docattributes = $document->getAttributes();
|
||||
if($docattributes) {
|
||||
$attrstr .= "<table class=\"table table-condensed\">\n";
|
||||
$attrstr .= "<table class=\"table table-condensed table-sm\">\n";
|
||||
$attrstr .= "<tr><th>".getMLText('name')."</th><th>".getMLText('attribute_value')."</th></tr>";
|
||||
foreach($docattributes as $docattribute) {
|
||||
$arr = $this->callHook('showDocumentAttribute', $document, $docattribute);
|
||||
|
|
@ -908,7 +822,7 @@ foreach($facets as $facetname=>$values) {
|
|||
$extracontent = array();
|
||||
$extracontent['below_title'] = $this->getListRowPath($document);
|
||||
if($attrstr)
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-sm btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
print $this->documentListRow($document, $previewer, false, 0, $extracontent);
|
||||
}
|
||||
} elseif($entry->isType('folder')) {
|
||||
|
|
@ -927,7 +841,7 @@ foreach($facets as $facetname=>$values) {
|
|||
$attrstr = '';
|
||||
$folderattributes = $folder->getAttributes();
|
||||
if($folderattributes) {
|
||||
$attrstr .= "<table class=\"table table-condensed\">\n";
|
||||
$attrstr .= "<table class=\"table table-condensed table-sm\">\n";
|
||||
$attrstr .= "<tr><th>".getMLText('name')."</th><th>".getMLText('attribute_value')."</th></tr>";
|
||||
foreach($folderattributes as $folderattribute) {
|
||||
$attrdef = $folderattribute->getAttributeDefinition();
|
||||
|
|
@ -938,9 +852,8 @@ foreach($facets as $facetname=>$values) {
|
|||
$extracontent = array();
|
||||
$extracontent['below_title'] = $this->getListRowPath($folder);
|
||||
if($attrstr)
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-sm btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
print $this->folderListRow($folder, false, $extracontent, SeedDMS_Core_AttributeDefinitionGroup::show_search);
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -954,7 +867,7 @@ foreach($facets as $facetname=>$values) {
|
|||
} else {
|
||||
$numResults = $totaldocs + $totalfolders;
|
||||
if ($numResults == 0) {
|
||||
print "<div class=\"alert alert-error\">".getMLText("search_no_results")."</div>";
|
||||
echo $this->warningMsg(getMLText("search_no_results"));
|
||||
}
|
||||
}
|
||||
// }}}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ $(document).ready( function() {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("set_expiry"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
if($document->expires())
|
||||
$expdate = getReadableDate($document->getExpires());
|
||||
|
|
@ -68,6 +67,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="documentid" value="<?php print $document->getID();?>">
|
||||
<?php echo createHiddenFieldWithKey('setexpires'); ?>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
$options[] = array('never', getMLText('does_not_expire'));
|
||||
$options[] = array('date', getMLText('expire_by_date'), $expdate != '');
|
||||
|
|
@ -89,11 +89,11 @@ $(document).ready( function() {
|
|||
getMLText("expires"),
|
||||
$this->getDateChooser($expdate, "expdate", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style {
|
|||
<p>
|
||||
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
|
||||
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
|
||||
<input type="submit" class="btn" value="<?php printMLText("update");?>">
|
||||
<input type="submit" class="btn btn-primary" value="<?php printMLText("update");?>">
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
|
|||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||
$this->contentHeading(getMLText("change_assignments"));
|
||||
$this->contentHeading(getMLText("update_revisors"));
|
||||
|
||||
// Retrieve a list of all users and groups that have review / approve privileges.
|
||||
$docAccess = $document->getReadAccessList($enableadminrevapp, $enableownerrevapp);
|
||||
|
|
@ -55,7 +55,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
|
|||
// Retrieve list of currently assigned revisors, along with
|
||||
// their latest status.
|
||||
$revisionStatus = $content->getRevisionStatus();
|
||||
$startdate = substr($content->getRevisionDate(), 0, 10);
|
||||
$startdate = getReadableDate(makeTsFromDate($content->getRevisionDate()));
|
||||
|
||||
// Index the revision results for easy cross-reference with the revisor list.
|
||||
$revisionIndex = array("i"=>array(), "g"=>array());
|
||||
|
|
@ -68,21 +68,15 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
|
|||
}
|
||||
?>
|
||||
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
|
||||
<form class="form-horizontal" action="../op/op.SetRevisors.php" method="post" name="form1">
|
||||
|
||||
<?php $this->contentSubHeading(getMLText("update_revisors"));?>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"><?php printMLText("revision_date")?>:</label>
|
||||
<div class="controls">
|
||||
<span class="input-append date" style="display: inline;" id="revisionstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
|
||||
<input class="span4" size="16" name="startdate" type="text" value="<?php if($startdate) echo $startdate; else echo date('Y-m-d'); ?>">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("revision_date"),
|
||||
$this->getDateChooser($startdate, "startdate", $this->params['session']->getLanguage())
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"><?php printMLText("individuals")?>:</label>
|
||||
|
|
@ -160,15 +154,12 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
|
|||
|
||||
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
|
||||
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
|
||||
<div class="control-group">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<input type="submit" class="btn" value="<?php printMLText("update");?>">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('update'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
|
|
|
|||
|
|
@ -31,21 +31,17 @@
|
|||
*/
|
||||
class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||
|
||||
protected function showPaneHeader($name, $title, $isactive) { /* {{{ */
|
||||
echo '<li class="nav-item '.($isactive ? 'active' : '').'"><a class="nav-link '.($isactive ? 'active' : '').'" data-target="#'.$name.'" data-toggle="tab">'.$title.'</a></li>'."\n";
|
||||
} /* }}} */
|
||||
|
||||
protected function showStartPaneContent($name, $isactive) { /* {{{ */
|
||||
echo '<div class="tab-pane'.($isactive ? ' active' : '').'" id="'.$name.'">';
|
||||
parent::showStartPaneContent($name, $isactive);
|
||||
$this->contentContainerStart();
|
||||
echo '<table class="table-condensed table-sm" style="table-layout: fixed;">';
|
||||
echo '<tr><td width="20%"></td><td width="80%"></td></tr>';
|
||||
} /* }}} */
|
||||
|
||||
protected function showEndPaneContent($name, $currentab) { /* {{{ */
|
||||
protected function showEndPaneContent($name, $currenttab) { /* {{{ */
|
||||
echo '</table>';
|
||||
$this->contentContainerEnd();
|
||||
echo '</div>';
|
||||
parent::showEndPaneContent($name, $currenttab);
|
||||
} /* }}} */
|
||||
|
||||
protected function getTextField($name, $value, $type='', $placeholder='') { /* {{{ */
|
||||
|
|
@ -260,14 +256,12 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
|||
<input type="hidden" name="action" value="saveSettings" />
|
||||
<input type="hidden" id="currenttab" name="currenttab" value="<?php echo $currenttab ? $currenttab : 'site'; ?>" />
|
||||
<?php
|
||||
if(!is_writeable($settings->_configFilePath)) {
|
||||
print "<div class=\"alert alert-warning\">";
|
||||
echo "<p>".getMLText("settings_notwritable")."</p>";
|
||||
print "</div>";
|
||||
}
|
||||
if(!is_writeable($settings->_configFilePath)) {
|
||||
$this->warningMsg(getMLText("settings_notwritable"));
|
||||
}
|
||||
?>
|
||||
|
||||
<ul class="nav nav-tabs" id="settingstab">
|
||||
<ul class="nav nav-pills" id="settingstab" role="tablist">
|
||||
<?php $this->showPaneHeader('site', getMLText('settings_Site'), (!$currenttab || $currenttab == 'site')); ?>
|
||||
<?php $this->showPaneHeader('system', getMLText('settings_System'), ($currenttab == 'system')); ?>
|
||||
<?php $this->showPaneHeader('advanced', getMLText('settings_Advanced'), ($currenttab == 'advanced')); ?>
|
||||
|
|
@ -436,7 +430,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigText('settings_smtpSendFrom', 'smtpSendFrom'); ?>
|
||||
<?php $this->showConfigText('settings_smtpUser', 'smtpUser'); ?>
|
||||
<?php $this->showConfigText('settings_smtpPassword', 'smtpPassword', 'password'); ?>
|
||||
<?php $this->showConfigPlain(htmlspecialchars(getMLText('settings_smtpSendTestMail')), htmlspecialchars(getMLText('settings_smtpSendTestMail_desc')), '<a class="btn sendtestmail">'.getMLText('send_test_mail').'</a><div><pre id="maildebug">You will see debug messages here</pre></div>'); ?>
|
||||
<?php $this->showConfigPlain(htmlspecialchars(getMLText('settings_smtpSendTestMail')), htmlspecialchars(getMLText('settings_smtpSendTestMail_desc')), '<a class="btn btn-secondary sendtestmail">'.getMLText('send_test_mail').'</a><div><pre id="maildebug">You will see debug messages here</pre></div>'); ?>
|
||||
<?php
|
||||
$this->showEndPaneContent('system', $currenttab);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,36 +76,46 @@ $(document).ready( function() {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("my_account"), "my_account");
|
||||
$this->contentHeading(getMLText('2_factor_auth'));
|
||||
echo "<div class=\"alert\">".getMLText('2_factor_auth_info')."</div>";
|
||||
$this->infoMsg(getMLText('2_factor_auth_info'));
|
||||
$this->rowStart();
|
||||
$this->contentContainerStart('span6');
|
||||
$this->columnStart(6);
|
||||
$this->contentHeading(getMLText('2_fact_auth_new_secret'));
|
||||
|
||||
$tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS');
|
||||
$oldsecret = $user->getSecret();
|
||||
$secret = $tfa->createSecret();
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.Setup2Factor.php" method="post" id="form" name="form1">
|
||||
<div class="control-group"><label class="control-label"><?php printMLText('2_fact_auth_secret'); ?></label><div class="controls">
|
||||
<input id="secret" class="secret" type="text" name="secret" size="30" value="<?php echo $secret; ?>"><br />
|
||||
</div></div>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText('2_fact_auth_secret'),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'text',
|
||||
'name'=>'secret',
|
||||
'class'=>'secret',
|
||||
'value'=>htmlspecialchars($secret),
|
||||
'required'=>true
|
||||
)
|
||||
);
|
||||
$this->formSubmit(getMLText('submit_2_fact_auth'));
|
||||
?>
|
||||
<div class="control-group"><label class="control-label"></label><div class="controls">
|
||||
<img src="<?php echo $tfa->getQRCodeImageAsDataUri($sitename, $secret); ?>">
|
||||
</div></div>
|
||||
<?php
|
||||
$this->formSubmit(getMLText('submit_2_fact_auth'));
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
if($oldsecret) {
|
||||
$this->contentContainerEnd();
|
||||
$this->contentContainerStart('span6');
|
||||
$this->columnEnd();
|
||||
$this->columnStart(6);
|
||||
$this->contentHeading(getMLText('2_fact_auth_current_secret'));
|
||||
echo '<div>'.$oldsecret.'</div>';
|
||||
echo '<div><img src="'.$tfa->getQRCodeImageAsDataUri($sitename, $oldsecret).'"></div>';
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
|
|
|
|||
|
|
@ -57,26 +57,31 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Theme_Style {
|
|||
|
||||
$this->contentHeading(getMLText("substitute_user"));
|
||||
?>
|
||||
<input type="text" id="myInput" placeholder="<?= getMLText('type_to_filter'); ?>">
|
||||
<table id="myTable" class="table table-condensed">
|
||||
<input type="text" id="myInput" class="form-control" placeholder="<?= getMLText('type_to_filter'); ?>">
|
||||
<table id="myTable" class="table table-condensed table-sm">
|
||||
<thead>
|
||||
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('email');?></th><th><?php printMLText('role'); ?></th><th><?php printMLText('groups'); ?></th><th></th></tr>
|
||||
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('role'); ?>/<?php printMLText('groups'); ?></th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($allUsers as $currUser) {
|
||||
echo "<tr".($currUser->isDisabled() ? " class=\"error\"" : "").">";
|
||||
echo "<td>";
|
||||
echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")<br />";
|
||||
$hasemail = $currUser->getEmail() && (preg_match("/.+@.+/", $currUser->getEmail()) == 1);
|
||||
if($hasemail)
|
||||
echo "<a href=\"mailto:".$currUser->getEmail()."\">";
|
||||
echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")";
|
||||
if($hasemail)
|
||||
echo "</a>";
|
||||
echo "<br />";
|
||||
if($hasemail)
|
||||
echo "<small>".htmlspecialchars($currUser->getEmail())."</small><br />";
|
||||
echo "<small>".htmlspecialchars($currUser->getComment())."</small>";
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "<a href=\"mailto:".htmlspecialchars($currUser->getEmail())."\">".htmlspecialchars($currUser->getEmail())."</a><br />";
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo getMLText('role').": ";
|
||||
echo htmlspecialchars($currUser->getRole()->getName());
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "<br />";
|
||||
$groups = $currUser->getGroups();
|
||||
if (count($groups) != 0) {
|
||||
for ($j = 0; $j < count($groups); $j++) {
|
||||
|
|
@ -87,21 +92,9 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Theme_Style {
|
|||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
switch($currUser->getRole()) {
|
||||
case SeedDMS_Core_User::role_user:
|
||||
printMLText("role_user");
|
||||
break;
|
||||
case SeedDMS_Core_User::role_admin:
|
||||
printMLText("role_admin");
|
||||
break;
|
||||
case SeedDMS_Core_User::role_guest:
|
||||
printMLText("role_guest");
|
||||
break;
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
if($currUser->getID() != $user->getID()) {
|
||||
echo "<a class=\"btn btn-primary\" href=\"../op/op.SubstituteUser.php?userid=".((int) $currUser->getID())."&formtoken=".createFormKey('substituteuser')."\"><i class=\"fa fa-exchange\"></i> ".getMLText('substitute_user')."</a> ";
|
||||
echo "<a class=\"btn btn-primary btn-mini btn-sm text-nowrap\" href=\"../op/op.SubstituteUser.php?userid=".((int) $currUser->getID())."&formtoken=".createFormKey('substituteuser')."\"><i class=\"fa fa-exchange\"></i><span class=\"d-none d-md-inline\"> ".getMLText('substitute_user')."</span></a> ";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Theme_Style {
|
|||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
||||
break;
|
||||
default:
|
||||
$msg = '???';
|
||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
||||
}
|
||||
$data[$i]['msg'] = $msg;
|
||||
}
|
||||
|
|
@ -185,6 +185,11 @@ div.timeline-frame {
|
|||
border-color: #e3e3e3;
|
||||
}
|
||||
|
||||
div.add_file {
|
||||
background-color: #E5D5F5;
|
||||
border-color: #AA9ABA;
|
||||
}
|
||||
|
||||
div.status_change_2 {
|
||||
background-color: #DAF6D5;
|
||||
border-color: #AAF897;
|
||||
|
|
@ -195,6 +200,16 @@ div.status_change_-1 {
|
|||
border-color: #F89797;
|
||||
}
|
||||
|
||||
div.status_change_-2 {
|
||||
background-color: #eee;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
div.status_change_-3 {
|
||||
background-color: #eee;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
div.timeline-event-selected {
|
||||
background-color: #fff785;
|
||||
border-color: #ffc200;
|
||||
|
|
@ -258,6 +273,7 @@ div.timeline-event-selected {
|
|||
<input type="checkbox" name="skip[]" value="status_change_4" '.(($skip && in_array('status_change_4', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_4').'<br />
|
||||
<input type="checkbox" name="skip[]" value="status_change_5" '.(($skip && in_array('status_change_5', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_5').'<br />
|
||||
<input type="checkbox" name="skip[]" value="status_change_-1" '.(($skip && in_array('status_change_-1', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_-1').'<br />
|
||||
<input type="checkbox" name="skip[]" value="status_change_-2" '.(($skip && in_array('status_change_-2', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_-2').'<br />
|
||||
<input type="checkbox" name="skip[]" value="status_change_-3" '.(($skip && in_array('status_change_-3', $skip)) ? 'checked' : '').'> '.getMLText('timeline_skip_status_change_-3').'<br />';
|
||||
$this->formField(
|
||||
getMLText("exclude_items"),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
//require_once("class.Bootstrap.php");
|
||||
|
||||
require_once("vendor/autoload.php");
|
||||
|
||||
|
|
@ -34,11 +34,12 @@ require_once("SeedDMS/Preview.php");
|
|||
* @copyright Copyright (C)2016 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_TimelineFeed extends SeedDMS_Bootstrap_Style {
|
||||
class SeedDMS_View_TimelineFeed extends SeedDMS_Theme_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$settings = $this->params['settings'];
|
||||
$httproot = $this->params['httproot'];
|
||||
$skip = $this->params['skip'];
|
||||
$fromdate = $this->params['fromdate'];
|
||||
|
|
@ -72,10 +73,10 @@ class SeedDMS_View_TimelineFeed extends SeedDMS_Bootstrap_Style {
|
|||
// Use core setChannelElement() function for other optional channel elements.
|
||||
// See http://www.rssboard.org/rss-specification#optionalChannelElements
|
||||
// for other optional channel elements. Here the language code for American English and
|
||||
$feed->setChannelElement('language', 'en-US');
|
||||
$feed->setChannelElement('language', str_replace('_', '-', $user->getLanguage()));
|
||||
// The date when this feed was lastly updated. The publication date is also set.
|
||||
$feed->setDate(date(DATE_RSS, time()));
|
||||
$feed->setChannelElement('pubDate', date(\DATE_RSS, strtotime('2013-04-06')));
|
||||
$feed->setChannelElement('pubDate', date(\DATE_RSS, time() /*strtotime('2013-04-06')*/));
|
||||
// You can add additional link elements, e.g. to a PubSubHubbub server with custom relations.
|
||||
// It's recommended to provide a backlink to the feed URL.
|
||||
$feed->setSelfLink($baseurl.'out/out.TimelineFeed.php');
|
||||
|
|
@ -93,13 +94,13 @@ class SeedDMS_View_TimelineFeed extends SeedDMS_Bootstrap_Style {
|
|||
foreach($data as $i=>$item) {
|
||||
switch($item['type']) {
|
||||
case 'add_version':
|
||||
$msg = getMLText('timeline_'.$item['type']);
|
||||
$msg = getMLText('timeline_'.$item['type'], array(), null, $user->getLanguage());
|
||||
break;
|
||||
case 'add_file':
|
||||
$msg = getMLText('timeline_'.$item['type']);
|
||||
$msg = getMLText('timeline_'.$item['type'], array(), null, $user->getLanguage());
|
||||
break;
|
||||
case 'status_change':
|
||||
$msg = getMLText('timeline_'.$item['type'], array('version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||
$msg = getMLText('timeline_'.$item['type'], array('version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])), null, $user->getLanguage());
|
||||
break;
|
||||
default:
|
||||
$msg = '???';
|
||||
|
|
@ -121,18 +122,21 @@ class SeedDMS_View_TimelineFeed extends SeedDMS_Bootstrap_Style {
|
|||
$newItem->setTitle($doc->getName()." (".$item['msg'].")");
|
||||
$newItem->setLink($baseurl.'out/out.ViewDocument.php?documentid='.$doc->getID());
|
||||
$newItem->setDescription("<h2>".$item['msg']."</h2>".
|
||||
"<p>".getMLText('comment').": <b>".$doc->getComment()."</b></p>".
|
||||
"<p>".getMLText('owner').": <b><a href=\"mailto:".htmlspecialchars($owner->getEmail())."\">".htmlspecialchars($owner->getFullName())."</a></b></p>".
|
||||
"<p>".getMLText("creation_date").": <b>".getLongReadableDate($doc->getDate())."</p>"
|
||||
"<p>".getMLText('comment', array(), null, $user->getLanguage()).": <b>".$doc->getComment()."</b></p>".
|
||||
"<p>".getMLText('owner', array(), null, $user->getLanguage()).": <b><a href=\"mailto:".htmlspecialchars($owner->getEmail())."\">".htmlspecialchars($owner->getFullName())."</a></b></p>".
|
||||
"<p>".getMLText("creation_date", array(), null, $user->getLanguage()).": <b>".getLongReadableDate($doc->getDate())."</p>"
|
||||
);
|
||||
$newItem->setDate(date('c', $d));
|
||||
$newItem->setAuthor($owner->getFullName(), $owner->getEmail());
|
||||
$newItem->setAuthor($owner->getFullName(), preg_match('/.+@.+/', $owner->getEmail()) == 1 ? $owner->getEmail() : null);
|
||||
$newItem->setId($baseurl.'out/out.ViewDocument.php?documentid='.$doc->getID()."&kkk=".$classname, true);
|
||||
if(!empty($item['version'])) {
|
||||
$version = $doc->getContentByVersion($item['version']);
|
||||
$previewer->createPreview($version);
|
||||
if($previewer->hasPreview($version)) {
|
||||
$newItem->addElement('enclosure', null, array('url' => $baseurl.'op/op.Preview.php?documentid='.$item['document']->getId().'&version='.$version->getVersion().'&width='.$previewwidthdetail, 'length'=>$previewer->getFileSize($version), 'type'=>'image/png'));
|
||||
$token = new SeedDMS_JwtToken($settings->_encryptionKey);
|
||||
$data = array('d'=>$doc->getId(), 'v'=>$item['version'], 'u'=>$user->getId(), 'w'=>$previewwidthdetail,);
|
||||
$hash = $token->jwtEncode($data);
|
||||
$newItem->addElement('enclosure', null, array('url' => $baseurl.'op/op.TimelineFeedPreview.php?hash='.$hash, 'length'=>$previewer->getFileSize($version), 'type'=>'image/png'));
|
||||
}
|
||||
}
|
||||
$feed->addItem($newItem);
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ class SeedDMS_View_TransferDocument extends SeedDMS_Theme_Style {
|
|||
getMLText("transfer_to_user"),
|
||||
$html
|
||||
);
|
||||
$this->formSubmit("<i class=\"fa fa-exchange\"></i> ".getMLText('transfer_document'));
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-exchange\"></i> ".getMLText('transfer_document'));
|
||||
} else {
|
||||
$this->warningMsg('transfer_no_users');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ $(document).ready( function() {
|
|||
<input type="hidden" name="action" value="adduser">
|
||||
<?php
|
||||
}
|
||||
$this->contentContainerStart();
|
||||
$this->formField(
|
||||
getMLText("user_login"),
|
||||
array(
|
||||
|
|
@ -317,7 +318,7 @@ $(document).ready( function() {
|
|||
if($passwordstrength > 0) {
|
||||
$this->formField(
|
||||
getMLText("password_strength"),
|
||||
'<div id="strengthbar'.($currUser ? $currUser->getID() : "0").'" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>'
|
||||
'<div id="strengthbar'.($currUser ? $currUser->getID() : "0").'" class="progress" style="_width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger bg-danger" style="width: 0%;"></div></div>'
|
||||
);
|
||||
}
|
||||
$this->formField(
|
||||
|
|
@ -599,6 +600,7 @@ $(document).ready( function() {
|
|||
);
|
||||
}
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText($currUser ? "save" : "add_user"));
|
||||
?>
|
||||
</form>
|
||||
|
|
@ -676,7 +678,6 @@ $(document).ready( function() {
|
|||
<div class="ajax" data-view="UsrMgr" data-action="listapikeys" <?php echo ($seluser ? "data-query=\"userid=".$seluser->getID()."\"" : "") ?>></div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
$this->contentEnd();
|
||||
|
|
|
|||
|
|
@ -516,6 +516,195 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
protected function showActions($items) { /* {{{ */
|
||||
print "<ul class=\"nav nav-pills mb-4\">";
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li class=\"nav-item\">".$item."</li>";
|
||||
elseif(is_array($item)) {
|
||||
echo "<li class=\"nav-item m-1\"><a class=\"_nav-link btn btn-mini btn-outline-primary btn-sm".(!empty($item['class']) ? ' '. $item['class'] : '')."\"".(isset($item['link']) ? " href=\"".$item['link']."\"" : '').(!empty($item['target']) ? ' target="'.$item['target'].'"' : '');
|
||||
if(!empty($item['attributes'])) {
|
||||
foreach($item['attributes'] as $attr) {
|
||||
echo ' '.$attr[0].'="'.$attr[1].'"';
|
||||
}
|
||||
}
|
||||
echo ">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i> " : "").'<span class="d-none d-lg-inline">'.getMLText($item['label'])."</span></a></li>";
|
||||
}
|
||||
}
|
||||
print "</ul>";
|
||||
return;
|
||||
print "<ul class=\"unstyled actions\">";
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li>".$item."</li>";
|
||||
elseif(is_array($item)) {
|
||||
echo "<li><a href=\"".$item['link']."\"".(!empty($item['target']) ? ' target="'.$item['target'].'"' : '');
|
||||
if(!empty($item['attributes'])) {
|
||||
foreach($item['attributes'] as $attr) {
|
||||
echo ' '.$attr[0].'="'.$attr[1].'"';
|
||||
}
|
||||
}
|
||||
echo ">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
|
||||
}
|
||||
}
|
||||
print "</ul>";
|
||||
} /* }}} */
|
||||
|
||||
protected function showVersionDetails($latestContent, $previewer, $islatest=false) { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
$accessobject = $this->params['accessobject'];
|
||||
$viewonlinefiletypes = $this->params['viewonlinefiletypes'];
|
||||
$enableownerrevapp = $this->params['enableownerrevapp'];
|
||||
$enablereceiptworkflow = $this->params['enablereceiptworkflow'];
|
||||
$enablereceiptreject = $this->params['enablereceiptreject'];
|
||||
$enablerevisionworkflow = $this->params['enablerevisionworkflow'];
|
||||
$workflowmode = $this->params['workflowmode'];
|
||||
$previewwidthdetail = $this->params['previewWidthDetail'];
|
||||
|
||||
// verify if file exists
|
||||
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
||||
|
||||
$status = $latestContent->getStatus();
|
||||
|
||||
// print "<table class=\"table\">";
|
||||
// print "<thead>\n<tr>\n";
|
||||
// print "<th colspan=\"2\">".htmlspecialchars($latestContent->getOriginalFileName())."</th>\n";
|
||||
// print "</tr></thead><tbody>\n";
|
||||
// print "<tr>\n";
|
||||
// print "<td style=\"width:".$previewwidthdetail."px; text-align: center;\">";
|
||||
$this->contentHeading(htmlspecialchars($latestContent->getOriginalFileName()));
|
||||
$this->rowStart();
|
||||
$this->columnStart(4);
|
||||
if ($file_exists) {
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) {
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\">";
|
||||
} else {
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\">";
|
||||
}
|
||||
}
|
||||
$previewer->createPreview($latestContent);
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$latestContent->getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
if ($file_exists) {
|
||||
print "</a>";
|
||||
}
|
||||
// print "</td>\n";
|
||||
|
||||
// print "<td>";
|
||||
$this->columnEnd();
|
||||
$this->columnStart(4);
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
print "<li>".getMLText('version').": ".$latestContent->getVersion()."</li>\n";
|
||||
|
||||
if ($file_exists)
|
||||
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."</li>";
|
||||
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||
|
||||
$updatingUser = $latestContent->getUser();
|
||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".htmlspecialchars($updatingUser->getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
|
||||
print "<li>".getLongReadableDate($latestContent->getDate())."</li>";
|
||||
|
||||
print "<li>".getMLText('status').": ".getOverallStatusText($status["status"]);
|
||||
if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){
|
||||
print "<br><span".($latestContent->getDocument()->hasExpired()?" class=\"warning\" ":"").">".(!$latestContent->getDocument()->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($latestContent->getDocument()->getExpires()))."</span>";
|
||||
}
|
||||
print "</li>";
|
||||
print "</ul>\n";
|
||||
|
||||
$txt = $this->callHook('showVersionComment', $latestContent);
|
||||
if($txt) {
|
||||
echo $txt;
|
||||
} else {
|
||||
if($latestContent->getComment())
|
||||
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$this->printVersionAttributes($folder, $latestContent);
|
||||
print "</ul>";
|
||||
// print "</td>\n";
|
||||
|
||||
// print "<td>";
|
||||
|
||||
$this->columnEnd();
|
||||
$this->columnStart(4);
|
||||
if ($file_exists){
|
||||
$items = array();
|
||||
$items[] = array('link'=>"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'download', 'label'=>'download');
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes)))
|
||||
$items[] = array('link'=>"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion(), 'icon'=>'eye', 'label'=>'view_online', 'target'=>'_blank');
|
||||
if($newitems = $this->callHook('extraVersionViews', $latestContent))
|
||||
$items = array_merge($items, $newitems);
|
||||
if($items) {
|
||||
$this->showActions($items);
|
||||
}
|
||||
}
|
||||
|
||||
$items = array();
|
||||
if ($file_exists){
|
||||
if($islatest && $accessobject->mayEditVersion($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.EditOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_version');
|
||||
}
|
||||
}
|
||||
/* Only admin has the right to remove version in any case or a regular
|
||||
* user if enableVersionDeletion is on
|
||||
*/
|
||||
if($accessobject->mayRemoveVersion($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.RemoveVersion.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'remove', 'label'=>'rm_version');
|
||||
}
|
||||
if($islatest && $accessobject->mayOverrideStatus($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.OverrideContentStatus.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'align-justify', 'label'=>'change_status');
|
||||
}
|
||||
if($islatest && $enablereceiptworkflow && $accessobject->check_controller_access('SetRecipients'))
|
||||
if($accessobject->maySetRecipients($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.SetRecipients.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'check', 'label'=>'change_recipients');
|
||||
}
|
||||
if($islatest && $enablerevisionworkflow && $accessobject->check_controller_access('SetRevisors'))
|
||||
if($accessobject->maySetRevisors($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.SetRevisors.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'refresh', 'label'=>'change_revisors');
|
||||
}
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
// Allow changing reviewers/approvals only if not reviewed
|
||||
if($accessobject->maySetReviewersApprovers($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"../out/out.SetReviewersApprovers.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'change_assignments');
|
||||
}
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
if($accessobject->maySetWorkflow($latestContent->getDocument())) {
|
||||
if(!$workflow) {
|
||||
$items[] = array('link'=>"../out/out.SetWorkflow.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'random', 'label'=>'set_workflow');
|
||||
}
|
||||
}
|
||||
}
|
||||
if($accessobject->check_controller_access('AddToTransmittal'))
|
||||
if($dms->getAllTransmittals($user)) {
|
||||
if($accessobject->check_view_access('AddToTransmittal'))
|
||||
$items[] = array('link'=>"out.AddToTransmittal.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'list', 'label'=>'add_to_transmittal');
|
||||
}
|
||||
if($accessobject->mayEditComment($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"out.EditComment.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'comment', 'label'=>'edit_comment');
|
||||
}
|
||||
if($accessobject->mayEditAttributes($latestContent->getDocument())) {
|
||||
$items[] = array('link'=>"out.EditAttributes.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'edit', 'label'=>'edit_attributes');
|
||||
}
|
||||
if(!$islatest)
|
||||
$items[] = array('link'=>"out.DocumentVersionDetail.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion(), 'icon'=>'info', 'label'=>'details');
|
||||
|
||||
if($newitems = $this->callHook('extraVersionActions', $latestContent))
|
||||
$items = array_merge($items, $newitems);
|
||||
if($items) {
|
||||
$this->showActions($items);
|
||||
}
|
||||
|
||||
// echo "</td>";
|
||||
// print "</tr></tbody>\n</table>\n";
|
||||
$this->columnEnd();
|
||||
$this->rowEnd();
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
parent::show();
|
||||
|
||||
|
|
@ -602,7 +791,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
$this->infoMsg(getMLText('needs_workflow_action'));
|
||||
}
|
||||
|
||||
$status = $latestContent->getStatus();
|
||||
$reviewStatus = $latestContent->getReviewStatus();
|
||||
$approvalStatus = $latestContent->getApprovalStatus();
|
||||
$receiptStatus = $latestContent->getReceiptStatus();
|
||||
|
|
@ -624,23 +812,23 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
if(is_string($txt))
|
||||
echo $txt;
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="docinfotab">
|
||||
<li class="nav-item <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'docinfo') echo 'active'; ?>" data-target="#docinfo" data-toggle="tab"><?php printMLText('current_version'); ?></a></li>
|
||||
<ul class="nav nav-pills" id="docinfotab" role="tablist">
|
||||
<li class="nav-item <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" data-target="#docinfo" data-toggle="tab" role="tab"><?php printMLText('current_version'); ?></a></li>
|
||||
<?php if (count($versions)>1) { ?>
|
||||
<li class="nav-item <?php if($currenttab == 'previous') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'previous') echo 'active'; ?>" data-target="#previous" data-toggle="tab"><?php printMLText('previous_versions'); ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'previous') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'previous') echo 'active'; ?>" data-target="#previous" data-toggle="tab" role="tab"><?php printMLText('previous_versions'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<li class="nav-item <?php if($currenttab == 'revapp') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'revapp') echo 'active'; ?>" data-target="#revapp" data-toggle="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'revapp') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'revapp') echo 'active'; ?>" data-target="#revapp" data-toggle="tab" role="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
if($workflow) {
|
||||
?>
|
||||
<li class="nav-item <?php if($currenttab == 'workflow') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'workflow') echo 'active'; ?>" data-target="#workflow" data-toggle="tab"><?php echo getMLText('workflow'); ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'workflow') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'workflow') echo 'active'; ?>" data-target="#workflow" data-toggle="tab" role="tab"><?php echo getMLText('workflow'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
@ -655,19 +843,19 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<li class="nav-item <?php if($currenttab == 'attachments') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'attachments') echo 'active'; ?>" data-target="#attachments" data-toggle="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'links') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'links') echo 'active'; ?>" data-target="#links" data-toggle="tab"><?php printMLText('linked_documents'); echo (count($links) || count($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'attachments') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'attachments') echo 'active'; ?>" data-target="#attachments" data-toggle="tab" role="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
|
||||
<li class="nav-item <?php if($currenttab == 'links') echo 'active'; ?>"><a class="nav-link <?php if($currenttab == 'links') echo 'active'; ?>" data-target="#links" data-toggle="tab" role="tab"><?php printMLText('linked_documents'); echo (count($links) || count($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></a></li>
|
||||
<?php
|
||||
$tabs = $this->callHook('extraTabs', $document);
|
||||
if($tabs) {
|
||||
foreach($tabs as $tabid=>$tab) {
|
||||
echo '<li class="nav-item '.($currenttab == $tabid ? 'active' : '').'"><a class="nav-link '.($currenttab == $tabid ? 'active' : '').'" data-target="#'.$tabid.'" data-toggle="tab">'.$tab['title'].'</a></li>';
|
||||
echo '<li class="nav-item '.($currenttab == $tabid ? 'active' : '').'"><a class="nav-link '.($currenttab == $tabid ? 'active' : '').'" data-target="#'.$tabid.'" data-toggle="tab" role="tab">'.$tab['title'].'</a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo">
|
||||
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo" role="tabpanel">
|
||||
<?php
|
||||
if(!$latestContent) {
|
||||
$this->contentContainerStart();
|
||||
|
|
@ -687,169 +875,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
if(is_string($txt))
|
||||
echo $txt;
|
||||
|
||||
// verify if file exists
|
||||
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
||||
|
||||
$this->contentContainerStart();
|
||||
print "<table class=\"table\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th colspan=\"2\">".htmlspecialchars($latestContent->getOriginalFileName())."</th>\n";
|
||||
// print "<th width='*'>".getMLText("file")."</th>\n";
|
||||
// print "<th width='25%'>".getMLText("comment")."</th>\n";
|
||||
print "<th width='20%'>".getMLText("status")."</th>\n";
|
||||
print "<th width='25%'></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
print "<tr>\n";
|
||||
print "<td style=\"width:".$previewwidthdetail."px; text-align: center;\">";
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile);
|
||||
$previewer->setConverters($previewconverters);
|
||||
$previewer->createPreview($latestContent);
|
||||
if ($file_exists) {
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) {
|
||||
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\">";
|
||||
}
|
||||
} else {
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'version'))) {
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\">";
|
||||
}
|
||||
}
|
||||
}
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$latestContent->getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
if ($file_exists) {
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'run')) || $accessobject->check_controller_access('ViewOnline', array('action'=>'run')))
|
||||
print "</a>";
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
print "<td><ul class=\"actions unstyled\">\n";
|
||||
// print "<li class=\"wordbreak\">".$latestContent->getOriginalFileName() ."</li>\n";
|
||||
print "<li>".getMLText('version').": ".$latestContent->getVersion()."</li>\n";
|
||||
|
||||
if ($file_exists)
|
||||
print "<li>". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."</li>";
|
||||
else print "<li><span class=\"warning\">".getMLText("document_deleted")."</span></li>";
|
||||
|
||||
$updatingUser = $latestContent->getUser();
|
||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".htmlspecialchars($updatingUser->getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
|
||||
print "<li>".getLongReadableDate($latestContent->getDate())."</li>";
|
||||
|
||||
print "</ul>\n";
|
||||
$txt = $this->callHook('showVersionComment', $latestContent);
|
||||
if($txt) {
|
||||
echo $txt;
|
||||
} else {
|
||||
if($latestContent->getComment())
|
||||
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$this->printVersionAttributes($folder, $latestContent);
|
||||
print "</ul></td>\n";
|
||||
|
||||
print "<td width='10%'>";
|
||||
print getOverallStatusText($status["status"]);
|
||||
if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){
|
||||
print "<br><span".($document->hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires()))."</span>";
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print "<td>";
|
||||
|
||||
if ($file_exists){
|
||||
print "<ul class=\"unstyled actions\">";
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'version'))) {
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\"><i class=\"fa fa-download\"></i>".getMLText("download")."</a></li>";
|
||||
}
|
||||
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes)))
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a></li>";
|
||||
}
|
||||
$items = $this->callHook('extraVersionViews', $latestContent);
|
||||
if($items) {
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li>".$item."</li>";
|
||||
elseif(is_array($item))
|
||||
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
|
||||
}
|
||||
}
|
||||
print "</ul>";
|
||||
}
|
||||
|
||||
print "<ul class=\"unstyled actions\">";
|
||||
if($accessobject->check_view_access('EditOnline'))
|
||||
if($accessobject->mayEditVersion($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('EditOnline', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-edit\"></i>".getMLText("edit_version"), false, true)."</li>";
|
||||
}
|
||||
/* Only admin has the right to remove version in any case or a regular
|
||||
* user if enableVersionDeletion is on
|
||||
*/
|
||||
if($accessobject->check_controller_access('RemoveVersion'))
|
||||
if($accessobject->mayRemoveVersion($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('RemoveVersion', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-remove\"></i>".getMLText("rm_version"), false, true)."</li>";
|
||||
}
|
||||
if($accessobject->check_controller_access('OverrideContentStatus'))
|
||||
if($accessobject->mayOverrideStatus($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('OverrideContentStatus', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-align-justify\"></i>".getMLText("change_status"), false, true)."</li>";
|
||||
}
|
||||
if($enablereceiptworkflow && $accessobject->check_controller_access('SetRecipients'))
|
||||
if($accessobject->maySetRecipients($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('SetRecipients', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-check\"></i>".getMLText("change_recipients"), false, true)."</li>";
|
||||
}
|
||||
if($enablerevisionworkflow && $accessobject->check_controller_access('SetRevisors'))
|
||||
if($accessobject->maySetRevisors($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('SetRevisors', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-refresh\"></i>".getMLText("change_revisors"), false, true)."</li>";
|
||||
}
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
// Allow changing reviewers/approvals only if not reviewed
|
||||
if($accessobject->check_controller_access('SetReviewersApprovers'))
|
||||
if($accessobject->maySetReviewersApprovers($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('SetReviewersApprovers', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-edit\"></i>".getMLText("change_assignments"), false, true)."</li>";
|
||||
}
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
if($accessobject->check_controller_access('SetWorkflow'))
|
||||
if($accessobject->maySetWorkflow($latestContent->getDocument())) {
|
||||
if(!$workflow) {
|
||||
print "<li>".$this->html_link('SetWorkflow', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-random\"></i>".getMLText("set_workflow"), false, true)."</li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if($accessobject->maySetExpires($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('SetExpires', array('documentid'=>$latestContent->getDocument()->getId()), array(), "<i class=\"fa fa-time\"></i>".getMLText("set_expiry"), false, true)."</li>";
|
||||
}
|
||||
*/
|
||||
if($accessobject->check_controller_access('AddToTransmittal'))
|
||||
if($dms->getAllTransmittals($user)) {
|
||||
if($accessobject->check_view_access('AddToTransmittal'))
|
||||
print "<li>".$this->html_link('AddToTransmittal', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-list\"></i>".getMLText("add_to_transmittal"), false, true)."</li>";
|
||||
}
|
||||
if($accessobject->check_controller_access('EditComment'))
|
||||
if($accessobject->mayEditComment($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('EditComment', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-comment\"></i>".getMLText("edit_comment"), false, true)."</li>";
|
||||
}
|
||||
if($accessobject->check_controller_access('EditAttributes'))
|
||||
if($accessobject->mayEditAttributes($latestContent->getDocument())) {
|
||||
print "<li>".$this->html_link('EditAttributes', array('documentid'=>$latestContent->getDocument()->getId(), 'version'=>$latestContent->getVersion()), array(), "<i class=\"fa fa-edit\"></i>".getMLText("edit_attributes"), false, true)."</li>";
|
||||
}
|
||||
|
||||
$items = $this->callHook('extraVersionActions', $latestContent);
|
||||
if($items) {
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li>".$item."</li>";
|
||||
elseif(is_array($item))
|
||||
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
print "</ul>";
|
||||
echo "</td>";
|
||||
print "</tr></tbody>\n</table>\n";
|
||||
$this->showVersionDetails($latestContent, $previewer, true);
|
||||
$this->contentContainerEnd();
|
||||
|
||||
if($user->isAdmin()) {
|
||||
|
|
@ -857,14 +886,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
$this->contentContainerStart();
|
||||
$statuslog = $latestContent->getStatusLog();
|
||||
echo "<table class=\"table table-condensed table-sm\"><thead>";
|
||||
echo "<th>".getMLText('date')."</th><th>".getMLText('status')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
|
||||
echo "<th>".getMLText('date')."/".getMLText('user')."</th><th>".getMLText('status')."</th><th>".getMLText('comment')."</th></tr>\n";
|
||||
echo "</thead><tbody>";
|
||||
foreach($statuslog as $entry) {
|
||||
if($suser = $dms->getUser($entry['userID']))
|
||||
$fullname = htmlspecialchars($suser->getFullName());
|
||||
else
|
||||
$fullname = "--";
|
||||
echo "<tr><td>".getLongReadableDate($entry['date'])."</td><td>".getOverallStatusText($entry['status'])."</td><td>".$fullname."</td><td>".htmlspecialchars($entry['comment'])."</td></tr>\n";
|
||||
echo "<tr><td>".getLongReadableDate($entry['date'])."<br />".$fullname."</td><td>".getOverallStatusText($entry['status'])."</td><td>".htmlspecialchars($entry['comment'])."</td></tr>\n";
|
||||
}
|
||||
print "</tbody>\n</table>\n";
|
||||
$this->contentContainerEnd();
|
||||
|
|
@ -899,7 +928,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp">
|
||||
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp" role="tabpanel">
|
||||
<?php
|
||||
$this->rowStart();
|
||||
/* Just check fo an exting reviewStatus, even workflow mode is set
|
||||
|
|
@ -1149,7 +1178,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
}
|
||||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'workflow') echo 'active'; ?>" id="workflow">
|
||||
<div class="tab-pane <?php if($currenttab == 'workflow') echo 'active'; ?>" id="workflow" role="tabpanel">
|
||||
<?php
|
||||
$this->rowStart();
|
||||
if ($user_is_involved && $accessobject->check_view_access('WorkflowGraph'))
|
||||
|
|
@ -1357,6 +1386,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'recipients') echo 'active'; ?>" id="recipients">
|
||||
<?php
|
||||
$status = $latestContent->getStatus();
|
||||
if($status["status"]!=S_RELEASED)
|
||||
echo "<div class=\"alert alert-warning\">".getMLText('info_recipients_tab_not_released')."</div>";
|
||||
|
||||
|
|
@ -1614,132 +1644,24 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
if (count($versions)>1) {
|
||||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'previous') echo 'active'; ?>" id="previous">
|
||||
<div class="tab-pane <?php if($currenttab == 'previous') echo 'active'; ?>" id="previous" role="tabpanel">
|
||||
<?php
|
||||
$txt = $this->callHook('prePreviousVersionsTab', $versions);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
|
||||
$this->contentContainerStart();
|
||||
|
||||
print "<table class=\"table\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th colspan=\"2\"></th>\n";
|
||||
print "<th width='20%'>".getMLText("status")."</th>\n";
|
||||
print "<th width='25%'></th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
|
||||
for ($i = count($versions)-2; $i >= 0; $i--) {
|
||||
$version = $versions[$i];
|
||||
$vstat = $version->getStatus();
|
||||
$workflow = $version->getWorkflow();
|
||||
$workflowstate = $version->getWorkflowState();
|
||||
|
||||
// verify if file exists
|
||||
$file_exists=file_exists($dms->contentDir . $version->getPath());
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td style=\"width:".$previewwidthdetail."px; text-align: center;\">";
|
||||
if($file_exists) {
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($version->getFileType()), $viewonlinefiletypes) || in_array(strtolower($version->getMimeType()), $viewonlinefiletypes))) {
|
||||
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
|
||||
print "<a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\">";
|
||||
}
|
||||
} else {
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'version'))) {
|
||||
print "<a href=\"../op/op.Download.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\">";
|
||||
}
|
||||
}
|
||||
}
|
||||
$previewer->createPreview($version);
|
||||
if($previewer->hasPreview($version)) {
|
||||
print("<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"../op/op.Preview.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">");
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidthdetail."\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
}
|
||||
if($file_exists) {
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'run')) || $accessobject->check_controller_access('ViewOnline', array('action'=>'run')))
|
||||
print "</a>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td><ul class=\"properties unstyled\">\n";
|
||||
print "<li>".htmlspecialchars($version->getOriginalFileName())."</li>\n";
|
||||
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>";
|
||||
$updatingUser = $version->getUser();
|
||||
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".htmlspecialchars($updatingUser->getEmail())."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
|
||||
print "<li>".getLongReadableDate($version->getDate())."</li>";
|
||||
print "</ul>\n";
|
||||
$txt = $this->callHook('showVersionComment', $version);
|
||||
if($txt) {
|
||||
echo $txt;
|
||||
} else {
|
||||
if($version->getComment())
|
||||
print "<p style=\"font-style: italic;\">".htmlspecialchars($version->getComment())."</p>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$this->printVersionAttributes($folder, $version);
|
||||
print "</ul></td>\n";
|
||||
// print "<td>".htmlspecialchars($version->getComment())."</td>";
|
||||
print "<td>".getOverallStatusText($vstat["status"])."</td>";
|
||||
print "<td>";
|
||||
if ($file_exists){
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
if($accessobject->check_controller_access('Download', array('action'=>'version'))) {
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\"><i class=\"fa fa-download\"></i>".getMLText("download")."</a>";
|
||||
}
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($version->getFileType()), $viewonlinefiletypes) || in_array(strtolower($version->getMimeType()), $viewonlinefiletypes)))
|
||||
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a>";
|
||||
}
|
||||
$items = $this->callHook('extraVersionViews', $version);
|
||||
if($items) {
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li>".$item."</li>";
|
||||
elseif(is_array($item))
|
||||
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
|
||||
}
|
||||
}
|
||||
print "</ul>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
/* Only admin has the right to remove version in any case or a regular
|
||||
* user if enableVersionDeletion is on
|
||||
*/
|
||||
if($accessobject->mayRemoveVersion($document)) {
|
||||
print "<li>".$this->html_link('RemoveVersion', array('documentid'=>$version->getDocument()->getId(), 'version'=>$version->getVersion()), array(), "<i class=\"fa fa-remove\"></i>".getMLText("rm_version"), false, true)."</li>";
|
||||
}
|
||||
if($accessobject->check_controller_access('AddToTransmittal'))
|
||||
print "<li>".$this->html_link('AddToTransmittal', array('documentid'=>$version->getDocument()->getId(), 'version'=>$version->getVersion()), array(), "<i class=\"fa fa-list\"></i>".getMLText("add_to_transmittal"), false, true)."</li>";
|
||||
if($accessobject->mayEditComment($document)) {
|
||||
print "<li>".$this->html_link('EditComment', array('documentid'=>$version->getDocument()->getId(), 'version'=>$version->getVersion()), array(), "<i class=\"fa fa-comment\"></i>".getMLText("edit_comment"), false, true)."</li>";
|
||||
}
|
||||
if($accessobject->mayEditAttributes($document)) {
|
||||
print "<li>".$this->html_link('EditAttributes', array('documentid'=>$version->getDocument()->getId(), 'version'=>$version->getVersion()), array(), "<i class=\"fa fa-edit\"></i>".getMLText("edit_attributes"), false, true)."</li>";
|
||||
}
|
||||
print "<li>".$this->html_link('DocumentVersionDetail', array('documentid'=>$version->getDocument()->getId(), 'version'=>$version->getVersion()), array(), "<i class=\"fa fa-info-circle\"></i>".getMLText("details"), false, true)."</li>";
|
||||
$items = $this->callHook('extraVersionActions', $version);
|
||||
if($items) {
|
||||
foreach($items as $item) {
|
||||
if(is_string($item))
|
||||
echo "<li>".$item."</li>";
|
||||
elseif(is_array($item))
|
||||
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
|
||||
}
|
||||
}
|
||||
print "</ul>";
|
||||
print "</td>\n</tr>\n";
|
||||
$this->contentContainerStart();
|
||||
$this->showVersionDetails($version, $previewer, false);
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
print "</tbody>\n</table>\n";
|
||||
$this->contentContainerEnd();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'attachments') echo 'active'; ?>" id="attachments">
|
||||
<div class="tab-pane <?php if($currenttab == 'attachments') echo 'active'; ?>" id="attachments" role="tabpanel">
|
||||
<?php
|
||||
|
||||
if (count($files) > 0) {
|
||||
|
|
@ -1783,7 +1705,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
print "</td>";
|
||||
|
||||
print "<td><ul class=\"unstyled\">\n";
|
||||
print "<td><ul class=\"actions unstyled\">\n";
|
||||
print "<li>".htmlspecialchars($file->getName())."</li>\n";
|
||||
if($file->getName() != $file->getOriginalFileName())
|
||||
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
|
||||
|
|
@ -1837,7 +1759,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="tab-pane <?php if($currenttab == 'links') echo 'active'; ?>" id="links">
|
||||
<div class="tab-pane <?php if($currenttab == 'links') echo 'active'; ?>" id="links" role="tabpanel">
|
||||
<?php
|
||||
if (count($links) > 0) {
|
||||
|
||||
|
|
@ -1945,7 +1867,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
<?php
|
||||
if($tabs) {
|
||||
foreach($tabs as $tabid=>$tab) {
|
||||
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'">';
|
||||
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'" role="tabpanel">';
|
||||
echo $tab['content'];
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
//require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for ViewEvent view
|
||||
|
|
@ -29,7 +29,7 @@ require_once("class.Bootstrap.php");
|
|||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_ViewEvent extends SeedDMS_Bootstrap_Style {
|
||||
class SeedDMS_View_ViewEvent extends SeedDMS_Theme_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user