Skip to content
Permalink
Browse files

Make file details modal a bit more compact

  • Loading branch information
Marlamin committed Mar 17, 2020
1 parent c4a30bb commit 883ee2d732d2ead89a4529475be60ce8c230ba36
Showing with 6 additions and 6 deletions.
  1. +6 −6 files/scripts/filedata_api.php
@@ -89,7 +89,7 @@
}
echo "<tr><td colspan='2'><b>Known versions</b></td></tr>";
echo "<tr><td colspan='2'>
<table class='table table-condensed'>";
<table class='table table-sm'>";
echo "<tr><th>Description</th><th>Buildconfig</th><th>Contenthash</th><th>Size</th><th>&nbsp;</th></tr>";
foreach($versions as $version){
echo "<tr><td>".$version['description']."</td><td class='hash'>".$version['buildconfig']."</td><td class='hash'><a href='#' data-toggle='modal' data-target='#chashModal' onClick='fillChashModal(\"".$version['contenthash']."\")'>".$version['contenthash']."</a></td><td>".humanBytes($version['size'])." (".$version['size']." bytes)</td>";
@@ -105,7 +105,7 @@
$nbq->execute();

echo "<tr><td colspan='2'>
<table class='table table-condensed'>";
<table class='table table-sm'>";
echo "<tr><th>ID</th><th>Filename</th></tr>";
while ($nbrow = $nbq->fetch()){
echo "<tr>";
@@ -127,7 +127,7 @@
if(count($parents) > 0){
echo "<tr><td colspan='2'><b>Linked parent files</b></td></tr>";
echo "<tr><td colspan='2'>
<table class='table table-condensed'>";
<table class='table'>";
echo "<tr><th>Link type</th><th>ID</th><th>Filename</th><th>Type</th></tr>";
foreach ($parents as $lrow){
echo "<tr>";
@@ -149,7 +149,7 @@
if(count($children) > 0){
echo "<tr><td colspan='2'><b>Linked child files</b></td></tr>";
echo "<tr><td colspan='2'>
<table class='table table-condensed'>";
<table class='table'>";
echo "<tr><th>Link type</th><th>ID</th><th>Filename</th><th>Type</th><th>&nbsp;</th></tr>";
foreach ($children as $lrow){
echo "<tr>";
@@ -161,7 +161,7 @@
// select newest bc for this file, TODO: most recent one instead of random one
$bhashq->execute([$lrow['child']]);
$buildhashforchildres = $bhashq->fetch();
if(!empty($buildhashforchild)){
if(!empty($buildhashforchildres)){
$buildhashforchild = $buildhashforchildres['hash'];
}else{
$buildhashforchild = $versions[0]['buildconfig'];
@@ -205,7 +205,7 @@
$chashes = $chashq->fetchAll();

echo count($chashes)." results for this contenthash!";
echo "<table class='table table-condensed' id='chashtable'>";
echo "<table class='table' id='chashtable'>";
foreach($chashes as $chashrow){
echo "<tr><td style='width: 85px;'>".$chashrow['filedataid']."</td><td>".$chashrow['filename']."</td></tr>";
}

0 comments on commit 883ee2d

Please sign in to comment.
You can’t perform that action at this time.