mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-10-17 05:22:23 +00:00
fix layout of recipient list, add field to filter table rows
This commit is contained in:
parent
fb44b524fd
commit
4d471ed592
|
@ -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)
|
||||
});
|
||||
});
|
||||
});
|
||||
<?php
|
||||
if($user->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 "<table class=\"table table-condensed\">\n";
|
||||
if(count($receiptStatus) > 8) {
|
||||
echo '<input type="text" id="filterRecipientsInput" placeholder="'.getMLText('type_to_filter').'">';
|
||||
}
|
||||
|
||||
print "<table id=\"filterRecipientsTable\" class=\"table table-condensed table-sm\">\n";
|
||||
|
||||
print "<thead>\n";
|
||||
print "<tr>\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='25%'><b>".getMLText("comment")."</b></td>";
|
||||
print "<td width='15%'><b>".getMLText("status")."</b></td>\n";
|
||||
print "<td width='20%'></td>\n";
|
||||
print "<th width='20%'>".(($count($receiptStatus) > 5) ? '<input type="text" id="filterRecipientsInput" placeholder="'.getMLText('type_to_filter').'">' : getMLText('name'))."</th>\n";
|
||||
print "<th width='20%'>".getMLText("last_update")."</th>\n";
|
||||
print "<th width='25%'>".getMLText("comment")."</th>";
|
||||
print "<th width='15%'>".getMLText("status")."</th>\n";
|
||||
print "<th width='20%'></th>\n";
|
||||
print "</tr>\n";
|
||||
print "</thead>\n";
|
||||
print "<tbody>\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 "<tr>\n";
|
||||
print "<td>".$reqName."</td>\n";
|
||||
print "<td><ul class=\"actions unstyled\"><li>".getLongReadableDate($r["date"])."</li>";
|
||||
print "<td>".getLongReadableDate($r["date"])."<br />";
|
||||
/* $updateUser is the user who has done the receipt */
|
||||
$updateUser = $dms->getUser($r["userID"]);
|
||||
print "<li>".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."</li>";
|
||||
print "</ul></td>";
|
||||
print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'");
|
||||
print "</td>";
|
||||
print "<td>".htmlspecialchars($r["comment"])."</td>\n";
|
||||
print "<td>";
|
||||
if($class)
|
||||
|
@ -1400,6 +1417,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
}
|
||||
?>
|
||||
<tbody>
|
||||
</table>
|
||||
<?php
|
||||
// $this->contentContainerEnd();
|
||||
|
@ -1410,9 +1428,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="progress">
|
||||
<div class="bar bar-success" style="width: <?php echo round($stat['1']/$totalreceipts*100); ?>%;"><?php echo ($stat['1'] ? $stat['1']."/".$totalreceipts : ''); ?></div>
|
||||
<div class="progress-bar bar bar-success bg-success" style="width: <?php echo round($stat['1']/$totalreceipts*100); ?>%;"><?php echo ($stat['1'] ? $stat['1']."/".$totalreceipts : ''); ?></div>
|
||||
<!-- div class="bar bar-warning" style="width: <?php echo round($stat['0']/$totalreceipts*100); ?>%;"></div -->
|
||||
<div class="bar bar-danger" style="width: <?php echo round($stat['-1']/$totalreceipts*100); ?>%;"><?php echo ($stat['-1'] ? $stat['-1']."/".$totalreceipts : ''); ?></div>
|
||||
<div class="progress-bar bar bar-danger bg-danger" style="width: <?php echo round($stat['-1']/$totalreceipts*100); ?>%;"><?php echo ($stat['-1'] ? $stat['-1']."/".$totalreceipts : ''); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1449,7 +1467,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
<?php
|
||||
} */
|
||||
// $this->contentContainerStart();
|
||||
print "<table class=\"table table-condensed\">\n";
|
||||
print "<table class=\"table table-condensed table-sm\">\n";
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user