From 4d471ed592b84dea51147afb756cc24d6c7857cb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 30 Apr 2021 09:25:11 +0200 Subject: [PATCH] fix layout of recipient list, add field to filter table rows --- views/bootstrap/class.ViewDocument.php | 42 ++++++++++++++++++-------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 1a9759d4c..ad9027a3c 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -168,6 +168,16 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { header('Content-Type: application/javascript; charset=UTF-8'); parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); +?> + $(document).ready(function(){ + $("#filterRecipientsInput").on("keyup", function() { + var value = $(this).val().toLowerCase(); + $("#filterRecipientsTable tbody tr").filter(function() { + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) + }); + }); + }); +isAdmin()) { $latestContent = $this->callHook('documentLatestContent', $document); if($latestContent === null) @@ -1307,15 +1317,22 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { if(is_string($txt)) echo $txt; - print "\n"; + if(count($receiptStatus) > 8) { + echo ''; + } + print "
\n"; + + print "\n"; print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; print "\n"; + print "\n"; + print "\n"; $stat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0); foreach ($receiptStatus as $r) { @@ -1372,11 +1389,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { } print "\n"; print "\n"; - print ""; + print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'"); + print ""; print "\n"; print "
".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."".(($count($receiptStatus) > 5) ? '' : getMLText('name'))."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
".$reqName."
  • ".getLongReadableDate($r["date"])."
  • "; + print "
".getLongReadableDate($r["date"])."
"; /* $updateUser is the user who has done the receipt */ $updateUser = $dms->getUser($r["userID"]); - print "
  • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
  • "; - print "
    ".htmlspecialchars($r["comment"]).""; if($class) @@ -1400,6 +1417,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { } } ?> +
    contentContainerEnd(); @@ -1410,9 +1428,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
    -
    +
    -
    +
    @@ -1449,7 +1467,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { contentContainerStart(); - print "\n"; + print "
    \n"; print "\n"; print "\n";
    ".getMLText("name")."