Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-02-16 14:42:09 +01:00
commit 02a830e74c
5 changed files with 50 additions and 29 deletions

View File

@ -122,7 +122,7 @@ if ($_POST["approvalType"] == "ind" || $_POST["approvalType"] == "grp") {
$params['username'] = $user->getFullName();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."&currenttab=revapp";
$notifier->toIndividual($user, $content->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER);

View File

@ -120,7 +120,7 @@ if ($_POST["reviewType"] == "ind" || $_POST["reviewType"] == "grp") {
$params['status'] = getReviewStatusText($_POST["reviewStatus"]);
$params['comment'] = strip_tags($_POST['comment']);
$params['username'] = $user->getFullName();
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."&currenttab=revapp";
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
$notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION);
@ -172,7 +172,7 @@ if ($newdocstatus['status'] == S_DRAFT_APP) {
$params['username'] = $user->getFullName();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."&currenttab=revapp";
foreach ($docApprovalStatus as $dastat) {
if ($dastat["status"] == 0) {

View File

@ -204,14 +204,16 @@ $(document).ready(function() {
$txt = $this->callHook('addDocumentPreForm');
if(is_string($txt))
echo $txt;
$this->contentContainerStart();
?>
<form class="form-horizontal" action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" id="adddocform" name="adddocform">
<?php echo createHiddenFieldWithKey('adddocument'); ?>
<input type="hidden" name="folderid" value="<?php print $folderid; ?>">
<input type="hidden" name="showtree" value="<?php echo showtree();?>">
<?php
$this->rowStart();
$this->columnStart(6);
$this->contentSubHeading(getMLText("document_infos"));
$this->contentContainerStart();
$this->formField(
getMLText("name"),
array(
@ -345,7 +347,11 @@ $(document).ready(function() {
echo $arrs;
}
$this->contentContainerEnd();
$this->columnEnd();
$this->columnStart(6);
$this->contentSubHeading(getMLText("version_info"));
$this->contentContainerStart();
if(!$nodocumentformfields || !in_array('version', $nodocumentformfields)) {
$this->formField(
getMLText("version"),
@ -417,6 +423,7 @@ $(document).ready(function() {
echo $arrs;
}
$this->contentContainerEnd();
if($workflowmode == 'advanced') {
$mandatoryworkflows = $user->getMandatoryWorkflows();
if($mandatoryworkflows) {
@ -465,6 +472,7 @@ $(document).ready(function() {
} elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
if($workflowmode == 'traditional') {
$this->contentSubHeading(getMLText("assign_reviewers"));
$this->contentContainerStart();
/* List all mandatory reviewers */
$res=$user->getMandatoryReviewers();
@ -579,9 +587,11 @@ $(document).ready(function() {
}
}
}
$this->contentContainerEnd();
}
$this->contentSubHeading(getMLText("assign_approvers"));
$this->contentContainerStart();
$res=$user->getMandatoryApprovers();
/* List all mandatory approvers */
$tmp = array();
@ -699,11 +709,13 @@ $(document).ready(function() {
}
}
}
$this->contentContainerEnd();
$this->warningMsg(getMLText("add_doc_reviewer_approver_warning"));
}
if($enablereceiptworkflow) {
$this->contentSubHeading(getMLText("assign_recipients"));
$this->contentContainerStart();
$options = array();
foreach ($docAccess["users"] as $usr) {
if (!$enableselfreceipt && $usr->getID()==$user->getID()) continue;
@ -756,10 +768,12 @@ $(document).ready(function() {
)
);
$this->contentContainerEnd();
}
if(!$nodocumentformfields || !in_array('notification', $nodocumentformfields)) {
$this->contentSubHeading(getMLText("add_document_notify"));
$this->contentSubHeading(getMLText("add_document_notify"));
$this->contentContainerStart();
$options = array();
$allUsers = $dms->getAllUsers($sortusersinlist);
@ -795,12 +809,14 @@ $(document).ready(function() {
'options'=>$options
)
);
$this->contentContainerEnd();
}
$this->columnEnd();
$this->rowEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('add_document'));
?>
</form>
<?php
$this->contentContainerEnd();
$txt = $this->callHook('addDocumentPostForm');
if(is_string($txt))
echo $txt;

View File

@ -144,6 +144,7 @@ $(document).ready( function() {
function showKeywordForm($category, $user) { /* {{{ */
if(!$category) {
$this->contentContainerStart();
?>
<form class="form-horizontal" action="../op/op.DefaultKeywords.php" method="post" id="form">
@ -163,26 +164,33 @@ $(document).ready( function() {
?>
</form>
<?php
$this->contentContainerEnd();
} else {
$this->contentContainerStart();
$owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return;
?>
<div class="control-group">
<label class="control-label"><?php echo getMLText("name")?>:</label>
<div class="controls">
<form class="form-inline formn" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="hidden" name="action" value="editcategory">
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" class="name" type="text" value="<?php echo htmlspecialchars($category->getName()) ?>">
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> <?php printMLText("save");?></button>
</form>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php echo getMLText("default_keywords")?>:</label>
<div class="controls">
<form class="form-horizontal form" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="hidden" name="action" value="editcategory">
<?php
$this->formField(
getMLText("name"),
array(
'element'=>'input',
'type'=>'text',
'name'=>'name',
'value'=>$category->getName()
)
);
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
?>
</form>
<?php
$this->contentContainerEnd();
$this->contentHeading(getMLText("default_keywords"));
$this->contentContainerStart();
?>
<?php
$lists = $category->getKeywordLists();
if (count($lists) == 0)
@ -190,7 +198,7 @@ $(document).ready( function() {
else
foreach ($lists as $list) {
?>
<form class="form-inline formk" style="display: inline-block;" method="post" action="../op/op.DefaultKeywords.php">
<form class="form-inline form" 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"]?>">
@ -208,8 +216,6 @@ $(document).ready( function() {
</form>
<br>
<?php } ?>
</div>
</div>
<div class="control-group">
<label class="control-label"></label>
@ -225,6 +231,7 @@ $(document).ready( function() {
</div>
<?php
$this->contentContainerEnd();
}
} /* }}} */
@ -267,12 +274,10 @@ $(document).ready( function() {
<?php
$this->columnEnd();
$this->columnStart(8);
$this->contentContainerStart();
?>
<div class="ajax" data-view="DefaultKeywords" data-action="form" <?php echo ($selcategoryid ? "data-query=\"categoryid=".$selcategoryid."\"" : "") ?>></div>
</div>
<?php
$this->contentContainerEnd();
$this->columnEnd();
$this->rowEnd();
$this->contentEnd();

View File

@ -77,8 +77,8 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Bootstrap_Style {
print "<thead>\n<tr>\n";
print "<th></th>";
print "<th>".getMLText("name");
print " <a href=\"../out/out.ExpiredDocuments.php?".($order=="na"?"&orderby=n&orderdir=d":"&orderby=n&orderdir=a")."\" \"title=\"".getMLText("sort_by_name")."\">".($order=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($order=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
print " <a href=\"../out/out.ExpiredDocuments.php?".($order=="ea"?"&orderby=e&orderdir=d":"&orderby=e&orderdir=a")."\" \"title=\"".getMLText("sort_by_expiration_date")."\">".($order=="ea"?' <i class="icon-sort-by-order selected"></i>':($order=="ed"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"../out/out.ExpiredDocuments.php?".($order=="na"?"&orderby=n&orderdir=d":"&orderby=n&orderdir=a")."\" \"title=\"".getMLText("sort_by_name")."\">".($order=="na"?' <i class="fa fa-sort-alpha-asc selected"></i>':($order=="nd"?' <i class="fa fa-sort-alpha-desc selected"></i>':' <i class="fa fa-sort-alpha-asc"></i>'))."</a>";
print " <a class=\"order-btn\" href=\"../out/out.ExpiredDocuments.php?".($order=="ea"?"&orderby=e&orderdir=d":"&orderby=e&orderdir=a")."\" \"title=\"".getMLText("sort_by_expiration_date")."\">".($order=="ea"?' <i class="fa fa-sort-numeric-asc selected"></i>':($order=="ed"?' <i class="fa fa-sort-numeric-desc selected"></i>':' <i class="fa fa-sort-numeric-asc"></i>'))."</a>";
print "</th>\n";
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("action")."</th>\n";