Merge branch 'seeddms-4.2.2' into develop

Conflicts:
	CHANGELOG
	views/bootstrap/class.ViewDocument.php
This commit is contained in:
Uwe Steinmann 2013-05-17 09:42:33 +02:00
commit 9f945b2714
10 changed files with 80 additions and 36 deletions

View File

@ -9,6 +9,13 @@
- maximum execution time of php scripts can be set in the settings - maximum execution time of php scripts can be set in the settings
is now actually used. is now actually used.
--------------------------------------------------------------------------------
Changes in version 4.2.2
--------------------------------------------------------------------------------
- admin can be set as reviewer/approver again and do the review/approval
- fixed minor layout problem in folder tree (Bug #51)
- close folder choose dialog when folder is selected (Bug #52)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.2.1 Changes in version 4.2.1
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
VERSION=4.2.1 VERSION=4.2.2
SRC=CHANGELOG inc conf utils index.php languages views op out README.md README.Notification README.Ubuntu drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install SRC=CHANGELOG inc conf utils index.php languages views op out README.md README.Notification README.Ubuntu drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install
#restapi webapp #restapi webapp

View File

@ -243,7 +243,7 @@ class SeedDMS_Core_DMS {
$this->convertFileTypes = array(); $this->convertFileTypes = array();
$this->version = '@package_version@'; $this->version = '@package_version@';
if($this->version[0] == '@') if($this->version[0] == '@')
$this->version = '4.2.1'; $this->version = '4.2.2';
} /* }}} */ } /* }}} */
function getDB() { /* {{{ */ function getDB() { /* {{{ */

View File

@ -12,10 +12,10 @@
<email>uwe@steinmann.cx</email> <email>uwe@steinmann.cx</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2013-04-30</date> <date>2013-05-17</date>
<time>07:43:29</time> <time>09:21:37</time>
<version> <version>
<release>4.2.1</release> <release>4.2.2</release>
<api>4.2.1</api> <api>4.2.1</api>
</version> </version>
<stability> <stability>
@ -24,7 +24,7 @@
</stability> </stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license> <license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes> <notes>
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp() - admins can be added as reviewer/approver again
</notes> </notes>
<contents> <contents>
<dir baseinstalldir="SeedDMS" name="/"> <dir baseinstalldir="SeedDMS" name="/">
@ -510,6 +510,22 @@ New release
</stability> </stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license> <license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes> <notes>
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
</notes>
</release>
<release>
<date>2013-04-30</date>
<time>07:43:29</time>
<version>
<release>4.2.1</release>
<api>4.2.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp() - fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
</notes> </notes>
</release> </release>

View File

@ -20,7 +20,7 @@
class SeedDMS_Version { class SeedDMS_Version {
var $_number = "4.2.1"; var $_number = "4.2.2";
var $_string = "SeedDMS"; var $_string = "SeedDMS";
function SeedDMS_Version() { function SeedDMS_Version() {

View File

@ -116,7 +116,7 @@ function fileExistsInIncludePath($file) { /* {{{ */
* Load default settings + set * Load default settings + set
*/ */
define("SEEDDMS_INSTALL", "on"); define("SEEDDMS_INSTALL", "on");
define("SEEDDMS_VERSION", "4.2.1"); define("SEEDDMS_VERSION", "4.2.2");
require_once('../inc/inc.ClassSettings.php'); require_once('../inc/inc.ClassSettings.php');

View File

@ -35,6 +35,10 @@ ul.actions li a.btn > i {
font-size: 200%; font-size: 200%;
} }
ul.tree, ul.tree ul {
margin-left: 20px;
}
@media (max-width: 480px) { @media (max-width: 480px) {
.nav-tabs > li { .nav-tabs > li {
float:none; float:none;

View File

@ -704,25 +704,17 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
} /* }}} */ } /* }}} */
function printFolderChooser($formName, $accessMode, $exclude = -1, $default = false) { /* {{{ */ function printFolderChooser($formName, $accessMode, $exclude = -1, $default = false) { /* {{{ */
?>
<script language="JavaScript">
var openDlg;
function chooseFolder<?php print $formName ?>() {
openDlg = open("out.FolderChooser.php?form=<?php echo $formName?>&mode=<?php echo $accessMode?>&exclude=<?php echo $exclude?>", "openDlg", "width=480,height=480,scrollbars=yes,resizable=yes,status=yes");
}
</script>
<?php
print "<input type=\"hidden\" id=\"targetid".$formName."\" name=\"targetid".$formName."\" value=\"". (($default) ? $default->getID() : "") ."\">"; print "<input type=\"hidden\" id=\"targetid".$formName."\" name=\"targetid".$formName."\" value=\"". (($default) ? $default->getID() : "") ."\">";
print "<div class=\"input-append\">\n"; print "<div class=\"input-append\">\n";
print "<input type=\"text\" id=\"choosefoldersearch\" data-provide=\"typeahead\" name=\"targetname".$formName."\" value=\"". (($default) ? htmlspecialchars($default->getName()) : "") ."\" placeholder=\"".getMLText('type_to_search')."\" autocomplete=\"off\" />"; print "<input type=\"text\" id=\"choosefoldersearch\" data-provide=\"typeahead\" name=\"targetname".$formName."\" value=\"". (($default) ? htmlspecialchars($default->getName()) : "") ."\" placeholder=\"".getMLText('type_to_search')."\" autocomplete=\"off\" />";
// print "<button type=\"button\" class=\"btn\" onclick=\"chooseFolder".$formName."(); return false;\">".getMLText("folder")."...</button>"; // print "<button type=\"button\" class=\"btn\" onclick=\"chooseFolder".$formName."(); return false;\">".getMLText("folder")."...</button>";
print "<a data-target=\"#folderChooser\" href=\"out.FolderChooser.php?form=".$formName."&mode=".$accessMode."&exclude=".$exclude."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".getMLText("folder")."…</a>\n"; print "<a data-target=\"#folderChooser".$formName."\" href=\"out.FolderChooser.php?form=".$formName."&mode=".$accessMode."&exclude=".$exclude."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".getMLText("folder")."…</a>\n";
print "</div>\n"; print "</div>\n";
?> ?>
<div class="modal hide" id="folderChooser" tabindex="-1" role="dialog" aria-labelledby="folderChooserLabel" aria-hidden="true"> <div class="modal hide" id="folderChooser<?= $formName ?>" tabindex="-1" role="dialog" aria-labelledby="folderChooser<?= $formName ?>Label" aria-hidden="true">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="folderChooserLabel"><?php printMLText("choose_target_folder") ?></h3> <h3 id="folderChooser<?= $formName ?>Label"><?php printMLText("choose_target_folder") ?></h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>Please wait, until document tree is loaded </p> <p>Please wait, until document tree is loaded </p>
@ -731,6 +723,13 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button> <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
</div> </div>
</div> </div>
<script language="JavaScript">
/* Set up a callback which is called when a folder in the tree is selected */
modalFolderChooser<?= $formName ?> = $('#folderChooser<?= $formName ?>');
function folderSelectedCallback<?= $formName ?>(id, name) {
modalFolderChooser<?= $formName ?>.modal('hide');
}
</script>
<?php <?php
} /* }}} */ } /* }}} */
@ -966,8 +965,9 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
} }
if ($folder->getAccessMode($this->params['user']) >= $accessMode) { if ($folder->getAccessMode($this->params['user']) >= $accessMode) {
if ($is_open) print "<i class=\"icon-folder-open\" name=\"treeimg".$folderID."\"></i><span style=\"padding-left:5px\" >"; if ($is_open) print "<i class=\"icon-folder-open\" name=\"treeimg".$folderID."\"></i>";
else print "<i class=\"icon-folder-close\" name=\"treeimg".$folderID."\"></i><span style=\"padding-left:5px\" >"; else print "<i class=\"icon-folder-close\" name=\"treeimg".$folderID."\"></i>";
// print "<span style=\"padding-left:5px\" >";
if ($folderID != $currentFolderID){ if ($folderID != $currentFolderID){

View File

@ -52,23 +52,20 @@ function toggleTree(id){
var targetName; var targetName;
var targetID; var targetID;
function folderSelected(id, name) { function folderSelected(id, name) {
targetName.value = name; targetName.value = name;
targetID.value = id; targetID.value = id;
// window.close(); if(typeof(folderSelectedCallback<?= $form ?>) !== 'undefined')
// return true; folderSelectedCallback<?= $form ?>(id, name);
} }
</script> </script>
<?php <?php
$this->contentContainerStart(); $this->contentContainerStart();
$this->printFoldersTree($mode, $exclude, $rootfolderid); $this->printFoldersTree($mode, $exclude, $rootfolderid);
$this->contentContainerEnd(); $this->contentContainerEnd();
?> ?>
<script language="JavaScript"> <script language="JavaScript">
targetName = document.<?php echo $form?>.targetname<?php print $form ?>; targetName = document.<?php echo $form?>.targetname<?php print $form ?>;
targetID = document.<?php echo $form?>.targetid<?php print $form ?>; targetID = document.<?php echo $form?>.targetid<?php print $form ?>;

View File

@ -406,11 +406,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if($user->isAdmin()) { if($user->isAdmin()) {
$this->contentHeading(getMLText("status")); $this->contentHeading(getMLText("status"));
$this->contentContainerStart(); $this->contentContainerStart();
$status = $latestContent->getStatusLog(); $statuslog = $latestContent->getStatusLog();
echo "<table class=\"table table-condensed\"><thead>"; echo "<table class=\"table table-condensed\"><thead>";
echo "<th>".getMLText('date')."</th><th>".getMLText('status')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n"; echo "<th>".getMLText('date')."</th><th>".getMLText('status')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
echo "</thead><tbody>"; echo "</thead><tbody>";
foreach($status as $entry) { foreach($statuslog as $entry) {
if($suser = $dms->getUser($entry['userID'])) if($suser = $dms->getUser($entry['userID']))
$fullname = $suser->getFullName(); $fullname = $suser->getFullName();
else else
@ -457,7 +457,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<tr><td colspan=5>\n"; print "<tr><td colspan=5>\n";
$this->contentSubHeading(getMLText("reviewers")); $this->contentSubHeading(getMLText("reviewers"));
print "</tr>"; print "</tr>";
print "<tr>\n"; print "<tr>\n";
print "<td width='20%'><b>".getMLText("name")."</b></td>\n"; print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n"; print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
@ -510,7 +510,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."</a></li>"; print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."</a></li>";
} }
} }
print "</ul></td>\n"; print "</ul></td>\n";
print "</td>\n</tr>\n"; print "</td>\n</tr>\n";
} }
@ -566,7 +566,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<td>".htmlspecialchars($a["comment"])."</td>\n"; print "<td>".htmlspecialchars($a["comment"])."</td>\n";
print "<td>".getApprovalStatusText($a["status"])."</td>\n"; print "<td>".getApprovalStatusText($a["status"])."</td>\n";
print "<td><ul class=\"unstyled\">"; print "<td><ul class=\"unstyled\">";
if($accessop->mayApprove()) { if($accessop->mayApprove()) {
if ($is_approver && $status["status"]==S_DRAFT_APP) { if ($is_approver && $status["status"]==S_DRAFT_APP) {
print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("submit_approval")."</a></li>"; print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("submit_approval")."</a></li>";
@ -574,7 +574,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>"; print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>";
} }
} }
print "</ul>"; print "</ul>";
print "</td>\n"; print "</td>\n";
print "</td>\n</tr>\n"; print "</td>\n</tr>\n";
@ -787,10 +787,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$vstat = $version->getStatus(); $vstat = $version->getStatus();
$workflow = $version->getWorkflow(); $workflow = $version->getWorkflow();
$workflowstate = $version->getWorkflowState(); $workflowstate = $version->getWorkflowState();
// verify if file exists // verify if file exists
$file_exists=file_exists($dms->contentDir . $version->getPath()); $file_exists=file_exists($dms->contentDir . $version->getPath());
print "<tr>\n"; print "<tr>\n";
print "<td nowrap>"; print "<td nowrap>";
/* /*
@ -800,7 +800,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes)) if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>"; print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; }else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
print "</ul>"; print "</ul>";
*/ */
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes)) if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
@ -885,10 +885,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
foreach($files as $file) { foreach($files as $file) {
$file_exists=file_exists($dms->contentDir . $file->getPath()); $file_exists=file_exists($dms->contentDir . $file->getPath());
$responsibleUser = $file->getUser(); $responsibleUser = $file->getUser();
print "<tr>"; print "<tr>";
<<<<<<< HEAD
print "<td>"; print "<td>";
$previewer->createPreview($file); $previewer->createPreview($file);
if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes)) if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes))
@ -903,6 +904,16 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "</a>"; print "</a>";
print "</td>"; print "</td>";
=======
print "<td><ul class=\"actions unstyled\">";
if ($file_exists) {
print "<li><a href=\"../op/op.Download.php?documentid=".$documentid."&file=".$file->getID()."\"><i class=\"icon-download\"></i>".getMLText('download')."</a>";
if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&file=". $file->getID()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a></li>";
} else print "<li><img class=\"mimeicon\" src=\"images/icons/".$this->getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">";
print "</ul></td>";
>>>>>>> seeddms-4.2.2
print "<td><ul class=\"unstyled\">\n"; print "<td><ul class=\"unstyled\">\n";
print "<li>".htmlspecialchars($file->getName())."</li>\n"; print "<li>".htmlspecialchars($file->getName())."</li>\n";
print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n"; print "<li>".htmlspecialchars($file->getOriginalFileName())."</li>\n";
@ -914,6 +925,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<li>".getLongReadableDate($file->getDate())."</li>"; print "<li>".getLongReadableDate($file->getDate())."</li>";
print "<td>".htmlspecialchars($file->getComment())."</td>"; print "<td>".htmlspecialchars($file->getComment())."</td>";
<<<<<<< HEAD
print "<td><ul class=\"unstyled actions\">"; print "<td><ul class=\"unstyled actions\">";
if ($file_exists) { if ($file_exists) {
@ -926,6 +938,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<li><a href=\"out.RemoveDocumentFile.php?documentid=".$documentid."&fileid=".$file->getID()."\"><i class=\"icon-remove\"></i>".getMLText("delete")."</a></li>"; print "<li><a href=\"out.RemoveDocumentFile.php?documentid=".$documentid."&fileid=".$file->getID()."\"><i class=\"icon-remove\"></i>".getMLText("delete")."</a></li>";
print "</ul></td>"; print "</ul></td>";
=======
print "<td><span class=\"actions\">";
if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID()))
print "<form action=\"../out/out.RemoveDocumentFile.php\" method=\"get\"><input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"fileid\" value=\"".$file->getID()."\" /><button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button></form>";
print "</span></td>";
>>>>>>> seeddms-4.2.2
print "</tr>"; print "</tr>";
} }
print "</tbody>\n</table>\n"; print "</tbody>\n</table>\n";