mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-4.3.4' into develop
Conflicts: Makefile op/op.Ajax.php styles/bootstrap/application.js views/bootstrap/class.Search.php views/bootstrap/class.ViewFolder.php
This commit is contained in:
commit
5d879a3439
|
@ -3,6 +3,12 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- clean up and test ldap authentication code
|
||||
- fix handling of multivalue attributes
|
||||
- use same ordering in tree as in list view (Bug #121)
|
||||
- add missing parenthesis in version file (Bug #100)
|
||||
- add missing file views/bootstrap/class.RemoveFolderFileѕ.php (Bug #101)
|
||||
- unlinked documents/folders can be moved into root folder
|
||||
- take out debug echo statement (Bug #125)
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.3
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION=4.3.3
|
||||
VERSION=4.3.4
|
||||
SRC=CHANGELOG inc conf utils index.php languages views op out controllers README.md README.Notification README.Ubuntu drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install
|
||||
#restapi webapp
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class SeedDMS_Core_DMS {
|
|||
$this->convertFileTypes = array();
|
||||
$this->version = '@package_version@';
|
||||
if($this->version[0] == '@')
|
||||
$this->version = '4.3.3';
|
||||
$this->version = '4.3.4';
|
||||
} /* }}} */
|
||||
|
||||
function getDB() { /* {{{ */
|
||||
|
|
|
@ -583,7 +583,7 @@ New release
|
|||
- new methods SeedDMS_Core_DMS::checkFolders() and SeedDMS_Core_DMS::checkDocuments()
|
||||
</notes>
|
||||
</release>
|
||||
</release>
|
||||
<release>
|
||||
<date>2014-02-01</date>
|
||||
<time>16:19:34</time>
|
||||
<version>
|
||||
|
|
|
@ -175,7 +175,7 @@ function createVersionigFile($document) { /* {{{ */
|
|||
|
||||
if (is_bool($handle)&&!$handle) return false;
|
||||
|
||||
$tmp = $document->getName()." (ID ".$document->getID()."\n\n";
|
||||
$tmp = $document->getName()." (ID ".$document->getID().")\n\n";
|
||||
fwrite($handle, $tmp);
|
||||
|
||||
$owner = $document->getOwner();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
class SeedDMS_Version {
|
||||
|
||||
var $_number = "4.3.3";
|
||||
var $_number = "4.3.4";
|
||||
var $_string = "SeedDMS";
|
||||
|
||||
function SeedDMS_Version() {
|
||||
|
|
|
@ -181,5 +181,72 @@ switch($command) {
|
|||
}
|
||||
}
|
||||
break; /* }}} */
|
||||
|
||||
case 'movefolder': /* {{{ */
|
||||
if($user) {
|
||||
$mfolder = $dms->getFolder($_REQUEST['folderid']);
|
||||
if($mfolder) {
|
||||
if ($mfolder->getAccessMode($user) >= M_READ) {
|
||||
if($folder = $dms->getFolder($_REQUEST['targetfolderid'])) {
|
||||
if($folder->getAccessMode($user) >= M_READWRITE) {
|
||||
if($mfolder->setParent($folder)) {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>true, 'message'=>'Folder moved', 'data'=>''));
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'Error moving folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No access on destination folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No destination folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No folder', 'data'=>''));
|
||||
}
|
||||
}
|
||||
break; /* }}} */
|
||||
|
||||
case 'movedocument': /* {{{ */
|
||||
if($user) {
|
||||
$mdocument = $dms->getDocument($_REQUEST['docid']);
|
||||
if($mdocument) {
|
||||
if ($mdocument->getAccessMode($user) >= M_READ) {
|
||||
if($folder = $dms->getFolder($_REQUEST['targetfolderid'])) {
|
||||
if($folder->getAccessMode($user) >= M_READWRITE) {
|
||||
if($mdocument->setFolder($folder)) {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>true, 'message'=>'Document moved', 'data'=>''));
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'Error moving folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No access on destination folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No destination folder', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No folder', 'data'=>''));
|
||||
}
|
||||
}
|
||||
break; /* }}} */
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -100,7 +100,7 @@ if ($user->getTheme() != $mytheme)
|
|||
if (isset($_FILES["userfile"]) && is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0)
|
||||
{
|
||||
$finfo = new finfo(FILEINFO_MIME);
|
||||
echo $finfo->file($_FILES["userfile"]["tmp_name"]);
|
||||
// echo $finfo->file($_FILES["userfile"]["tmp_name"]);
|
||||
if(substr($finfo->file($_FILES["userfile"]["tmp_name"]), 0, 10) != "image/jpeg") {;
|
||||
UI::exitError(getMLText("user_info"),getMLText("only_jpg_user_images"));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.ClassEmail.php");
|
||||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.Language.php");
|
||||
|
@ -48,7 +48,6 @@ function removeFolderFiles($folder) {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (!isset($_POST["folderid"]) || !is_numeric($_POST["folderid"]) || intval($_POST["folderid"])<1) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id"));
|
||||
}
|
||||
|
|
|
@ -60,9 +60,10 @@ $unlinkedfolders = $dms->checkFolders();
|
|||
$unlinkeddocuments = $dms->checkDocuments();
|
||||
$nofilesizeversions = $dms->getNoFileSizeDocumentContent();
|
||||
$nochecksumversions = $dms->getNoChecksumDocumentContent();
|
||||
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'unlinkedcontent'=>$unlinkedversions, 'unlinkedfolders'=>$unlinkedfolders, 'unlinkeddocuments'=>$unlinkeddocuments, 'nofilesizeversions'=>$nofilesizeversions, 'nochecksumversions'=>$nochecksumversions, 'unlink'=>$unlink, 'setfilesize'=>$setfilesize, 'setchecksum'=>$setchecksum, 'repair'=>$repair));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'unlinkedcontent'=>$unlinkedversions, 'unlinkedfolders'=>$unlinkedfolders, 'unlinkeddocuments'=>$unlinkeddocuments, 'nofilesizeversions'=>$nofilesizeversions, 'nochecksumversions'=>$nochecksumversions, 'unlink'=>$unlink, 'setfilesize'=>$setfilesize, 'setchecksum'=>$setchecksum, 'repair'=>$repair, 'rootfolder'=>$rootfolder));
|
||||
if($view) {
|
||||
$view->show();
|
||||
exit;
|
||||
|
|
|
@ -159,6 +159,49 @@ $(document).ready( function() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('a.movefolder').click(function(ev){
|
||||
ev.preventDefault();
|
||||
attr_source = $(ev.currentTarget).attr('source');
|
||||
attr_dest = $(ev.currentTarget).attr('dest');
|
||||
attr_msg = $(ev.currentTarget).attr('msg');
|
||||
$.get('../op/op.Ajax.php',
|
||||
{ command: 'movefolder', folderid: attr_source, targetfolderid: attr_dest },
|
||||
function(data) {
|
||||
console.log(data);
|
||||
noty({
|
||||
text: data.msg,
|
||||
type: data.success ? 'success' : 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('a.movedocument').click(function(ev){
|
||||
ev.preventDefault();
|
||||
attr_source = $(ev.currentTarget).attr('source');
|
||||
attr_dest = $(ev.currentTarget).attr('dest');
|
||||
attr_msg = $(ev.currentTarget).attr('msg');
|
||||
$.get('../op/op.Ajax.php',
|
||||
{ command: 'movedocument', docid: attr_source, targetfolderid: attr_dest },
|
||||
function(data) {
|
||||
console.log(data);
|
||||
noty({
|
||||
text: data.msg,
|
||||
type: data.success ? 'success' : 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function allowDrop(ev) {
|
||||
|
|
|
@ -141,20 +141,12 @@ function showAttributeDefinitions(selectObj) {
|
|||
foreach ($attrdefs as $attrdef) {
|
||||
|
||||
print "<div id=\"attrdefs".$attrdef->getID()."\" style=\"display : none;\">";
|
||||
if($attrdef->isUsed())
|
||||
echo '<div class="alert alert-warning">'.getMLText('attrdef_in_use').'</div>';
|
||||
?>
|
||||
<div class="well">
|
||||
<?php
|
||||
if(!$attrdef->isUsed()) {
|
||||
?>
|
||||
<form style="display: inline-block;" method="post" action="../op/op.AttributeMgr.php" >
|
||||
<?php echo createHiddenFieldWithKey('removeattrdef'); ?>
|
||||
<input type="hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>">
|
||||
<input type="hidden" name="action" value="removeattrdef">
|
||||
<button type="submit" class="btn"><i class="icon-remove"></i> <?php echo getMLText("rm_attrdef")?></button>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>'.getMLText('attrdef_in_use').'</p>';
|
||||
if($attrdef->isUsed()) {
|
||||
$res = $attrdef->getStatistics(3);
|
||||
if(isset($res['frequencies']) && $res['frequencies']) {
|
||||
print "<table class=\"table-condensed\">";
|
||||
|
@ -256,6 +248,15 @@ function showAttributeDefinitions(selectObj) {
|
|||
}
|
||||
print "</tbody></table>";
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<form style="display: inline-block;" method="post" action="../op/op.AttributeMgr.php" >
|
||||
<?php echo createHiddenFieldWithKey('removeattrdef'); ?>
|
||||
<input type="hidden" name="attrdefid" value="<?php echo $attrdef->getID()?>">
|
||||
<input type="hidden" name="action" value="removeattrdef">
|
||||
<button type="submit" class="btn"><i class="icon-remove"></i> <?php echo getMLText("rm_attrdef")?></button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentContainerStart();
|
||||
print "<p>".getMLText("versioning_file_creation_warning")."</p>\n";
|
||||
|
||||
print "<form action=\"../op/op.CreateVersioningFiles.php\" name=\"form1\">";
|
||||
print "<form class=\"form-inline\" action=\"../op/op.CreateVersioningFiles.php\" name=\"form1\">";
|
||||
$this->printFolderChooser("form1",M_READWRITE);
|
||||
print "<input type='submit' class='btn' name='' value='".getMLText("versioning_file_creation")."'/>";
|
||||
print "</form>\n";
|
||||
|
@ -183,7 +183,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentContainerStart();
|
||||
print "<p>".getMLText("files_deletion_warning")."</p>\n";
|
||||
|
||||
print "<form action=\"../out/out.RemoveFolderFiles.php\" name=\"form3\">";
|
||||
print "<form class=\"form-inline\" action=\"../out/out.RemoveFolderFiles.php\" name=\"form3\">";
|
||||
$this->printFolderChooser("form3",M_READWRITE);
|
||||
print "<input type='submit' class='btn' name='' value='".getMLText("files_deletion")."'/>";
|
||||
print "</form>\n";
|
||||
|
|
|
@ -997,19 +997,19 @@ function clearFilename<?php print $formName ?>() {
|
|||
* @params boolean $showdocs set to true if tree shall contain documents
|
||||
* as well.
|
||||
*/
|
||||
function printNewTreeNavigation($folderid=0, $accessmode=M_READ, $showdocs=0, $formid='form1', $expandtree=0) { /* {{{ */
|
||||
function jqtree($path, $folder, $user, $accessmode, $showdocs=1, $expandtree=0) {
|
||||
function printNewTreeNavigation($folderid=0, $accessmode=M_READ, $showdocs=0, $formid='form1', $expandtree=0, $orderby='') { /* {{{ */
|
||||
function jqtree($path, $folder, $user, $accessmode, $showdocs=1, $expandtree=0, $orderby='') {
|
||||
if($path || $expandtree) {
|
||||
if($path)
|
||||
$pathfolder = array_shift($path);
|
||||
$subfolders = $folder->getSubFolders();
|
||||
$subfolders = $folder->getSubFolders($orderby);
|
||||
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, $accessmode);
|
||||
$children = array();
|
||||
foreach($subfolders as $subfolder) {
|
||||
$node = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>($subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs)) ? true : false, 'is_folder'=>true);
|
||||
if($expandtree || $pathfolder->getID() == $subfolder->getID()) {
|
||||
if($showdocs) {
|
||||
$documents = $folder->getDocuments();
|
||||
$documents = $folder->getDocuments($orderby);
|
||||
$documents = SeedDMS_Core_DMS::filterAccess($documents, $user, $accessmode);
|
||||
foreach($documents as $document) {
|
||||
$node2 = array('label'=>$document->getName(), 'id'=>$document->getID(), 'load_on_demand'=>false, 'is_folder'=>false);
|
||||
|
@ -1022,7 +1022,7 @@ function clearFilename<?php print $formName ?>() {
|
|||
}
|
||||
return $children;
|
||||
} else {
|
||||
$subfolders = $folder->getSubFolders();
|
||||
$subfolders = $folder->getSubFolders($orderby);
|
||||
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, $accessmode);
|
||||
$children = array();
|
||||
foreach($subfolders as $subfolder) {
|
||||
|
@ -1043,7 +1043,7 @@ function clearFilename<?php print $formName ?>() {
|
|||
$node['load_on_demand'] = false;
|
||||
$node['children'] = array();
|
||||
} else {
|
||||
$node['children'] = jqtree($path, $folder, $this->params['user'], $accessmode, $showdocs, $expandtree);
|
||||
$node['children'] = jqtree($path, $folder, $this->params['user'], $accessmode, $showdocs, $expandtree, $orderby);
|
||||
}
|
||||
/* Nasty hack to remove the highest folder */
|
||||
if(isset($this->params['remove_root_from_tree']) && $this->params['remove_root_from_tree']) {
|
||||
|
|
|
@ -39,8 +39,10 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$cachedir = $this->params['cachedir'];
|
||||
$workflowmode = $this->params['workflowmode'];
|
||||
|
||||
$previewwidth = 40;
|
||||
|
||||
$db = $dms->getDB();
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
|
||||
$this->htmlStartPage(getMLText("my_documents"));
|
||||
$this->globalNavigation();
|
||||
|
@ -165,7 +167,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -202,7 +204,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -250,7 +252,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -284,7 +286,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -374,7 +376,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$res["documentID"]."&version=".$res["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -450,7 +452,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$res["documentID"]."&version=".$res["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
@ -531,7 +533,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
print "<th><a href=\"../out/out.MyDocuments.php?orderby=e\">".getMLText("expires")."</a></th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
foreach ($resArr as $res) {
|
||||
$document = $dms->getDocument($res["documentID"]);
|
||||
|
||||
|
@ -547,7 +549,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$res["documentID"]."&version=".$res["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
|
|
@ -176,6 +176,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
|||
$unlink = $this->params['unlink'];
|
||||
$setfilesize = $this->params['setfilesize'];
|
||||
$setchecksum = $this->params['setchecksum'];
|
||||
$rootfolder = $this->params['rootfolder'];
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
|
@ -221,6 +222,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
|||
echo "<td>".$error['id']."</td>";
|
||||
echo "<td>".$error['parent']."</td>";
|
||||
echo "<td>".$error['msg']."</td>";
|
||||
echo "<td><a class=\"btn movefolder\" source=\"".$error['id']."\" dest=\"".$rootfolder->getID()."\">Move</a> </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</tbody></table>\n";
|
||||
|
@ -244,6 +246,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style {
|
|||
echo "<td>".$error['id']."</td>";
|
||||
echo "<td>".$error['parent']."</td>";
|
||||
echo "<td>".$error['msg']."</td>";
|
||||
echo "<td><a class=\"btn movedocument\" source=\"".$error['id']."\" dest=\"".$rootfolder->getID()."\">Move</a> </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "</tbody></table>\n";
|
||||
|
|
58
views/bootstrap/class.RemoveFolderFiles.php
Normal file
58
views/bootstrap/class.RemoveFolderFiles.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* Implementation of RemoveFolderFiles view
|
||||
*
|
||||
* @category DMS
|
||||
* @package SeedDMS
|
||||
* @license GPL 2
|
||||
* @version @version@
|
||||
* @author Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
||||
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
||||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Include parent class
|
||||
*/
|
||||
require_once("class.Bootstrap.php");
|
||||
|
||||
/**
|
||||
* Class which outputs the html page for RemoveFolderFiles view
|
||||
*
|
||||
* @category DMS
|
||||
* @package SeedDMS
|
||||
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
||||
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
||||
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
||||
* 2010-2012 Uwe Steinmann
|
||||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_RemoveFolderFiles extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
|
||||
$this->htmlStartPage(getMLText("files_deletion"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||
|
||||
$this->contentHeading(getMLText("files_deletion"));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form action="../op/op.RemoveFolderFiles.php" name="form1" method="post">
|
||||
<?php echo createHiddenFieldWithKey('removefolderfiles'); ?>
|
||||
<input type="hidden" name="folderid" value="<?php echo $folder->getID()?>">
|
||||
<p><?php printMLText("confirm_rm_folder_files", array ("foldername" => htmlspecialchars($folder->getName())));?></p>
|
||||
<input class="btn" type="submit" value="<?php printMLText("accept");?>">
|
||||
</form>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
|
@ -79,6 +79,8 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
$searchin = $this->params['searchin'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
|
||||
$previewwidth = 40;
|
||||
|
||||
$this->htmlStartPage(getMLText("search_results"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
@ -324,7 +326,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
foreach ($entries as $entry) {
|
||||
if(get_class($entry) == 'SeedDMS_Core_Document') {
|
||||
$txt = $this->callHook('documentListItem', $entry, $previewer);
|
||||
|
@ -351,7 +353,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
print "<td><a class=\"standardText\" href=\"../out/out.ViewDocument.php?documentid=".$document->getID()."\">";
|
||||
if($previewer->hasPreview($lc)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$lc->getVersion()."&width=40\" title=\"".htmlspecialchars($lc->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$lc->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($lc->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($lc->getFileType())."\" title=\"".htmlspecialchars($lc->getMimeType())."\">";
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
$enableRecursiveCount = $this->params['enableRecursiveCount'];
|
||||
$maxRecursiveCount = $this->params['maxRecursiveCount'];
|
||||
|
||||
$previewwidth = 40;
|
||||
|
||||
$folderid = $folder->getId();
|
||||
|
||||
echo $this->callHook('startPage');
|
||||
|
@ -128,7 +130,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
* access expandFolderTree with $this->params because it can
|
||||
* be changed by preContent hook.
|
||||
*/
|
||||
$this->printNewTreeNavigation($folderid, M_READ, 0, '', $this->params['expandFolderTree'] == 2);
|
||||
$this->printNewTreeNavigation($folderid, M_READ, 0, '', $this->params['expandFolderTree'] == 2, $orderby);
|
||||
$this->contentContainerEnd();
|
||||
} else {
|
||||
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"icon-plus-sign\"></i></a>", true);
|
||||
|
@ -303,7 +305,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
}
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
foreach($documents as $document) {
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
|
@ -337,7 +339,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
if (file_exists($dms->contentDir . $latestContent->getPath())) {
|
||||
print "<td><a rel=\"document_".$docID."\" draggable=\"true\" ondragstart=\"onDragStartDocument(event);\" href=\"../op/op.Download.php?documentid=".$docID."&version=".$version."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img draggable=\"false\" class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img draggable=\"false\" class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style {
|
|||
$user = $this->params['user'];
|
||||
$cachedir = $this->params['cachedir'];
|
||||
|
||||
$previewwidth = 40;
|
||||
|
||||
$this->htmlStartPage(getMLText("my_documents"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
@ -47,7 +49,7 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style {
|
|||
// Get document list for the current user.
|
||||
$workflowStatus = $user->getWorkflowStatus();
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth);
|
||||
|
||||
$printheader=true;
|
||||
$iRev = array();
|
||||
|
@ -81,7 +83,7 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style {
|
|||
print "<tr>\n";
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$st['version']."\">";
|
||||
if($previewer->hasPreview($version)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=40\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
}
|
||||
|
@ -137,7 +139,7 @@ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style {
|
|||
print "<tr>\n";
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$document->getID()."&version=".$st['version']."\">";
|
||||
if($previewer->hasPreview($version)) {
|
||||
print "<img class=\"mimeicon\" width=\"40\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=40\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user