add checkmark for each conversion service

This commit is contained in:
Uwe Steinmann 2024-09-17 20:22:56 +02:00
parent 1dad0081f9
commit 32f2cffa9f

View File

@ -54,39 +54,45 @@ class SeedDMS_View_ConversionServices extends SeedDMS_Theme_Style {
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
if($conversionmgr) {
$allservices = $conversionmgr->getServices();
if($data = $dms->getStatisticalData('docspermimetype')) {
$this->contentHeading(getMLText("list_conversion_overview"));
echo "<table class=\"table table-condensed table-sm\">\n";
echo "<thead>";
echo "<tr><th>".getMLText('mimetype')."</th><th>".getMLText('preview')."</th><th>".getMLText('fullsearch')."</th><th>".getMLText('preview_pdf')."</th></tr>\n";
echo "</thead>";
echo "<tbody>";
foreach($data as $d) {
$key = $d['key'];
$t = explode('/', $key);
if(isset($allservices[$key]) || isset($allservices[$t[0].'/*'])) {
echo "<tr><td>".$key."</td>";
echo "<td>";
if(!empty($allservices[$key]['image/png']))
echo '<i class="fa fa-check"></i>';
echo "</td>";
echo "<td>";
if(!empty($allservices[$key]['text/plain']))
echo '<i class="fa fa-check"></i>';
echo "</td>";
echo "<td>";
if(!empty($allservices[$key]['application/pdf']))
echo '<i class="fa fa-check"></i>';
echo "</td>";
echo "</tr>";
$allservices = $conversionmgr->getServices();
if($data = $dms->getStatisticalData('docspermimetype')) {
$this->contentHeading(getMLText("list_conversion_overview"));
echo "<table class=\"table table-condensed table-sm\">\n";
echo "<thead>";
echo "<tr><th>".getMLText('mimetype')."</th><th>".getMLText('preview')."</th><th>".getMLText('fullsearch')."</th><th>".getMLText('preview_pdf')."</th></tr>\n";
echo "</thead>";
echo "<tbody>";
foreach($data as $d) {
$key = $d['key'];
$t = explode('/', $key);
if(isset($allservices[$key]) || isset($allservices[$t[0].'/*'])) {
echo "<tr><td>".$key." (".$d['total'].")</td>";
echo "<td>";
if(!empty($allservices[$key]['image/png'])) {
foreach($allservices[$key]['image/png'] as $object)
echo '<i class="fa fa-check" title="'.get_class($object).'"></i> ';
}
echo "</td>";
echo "<td>";
if(!empty($allservices[$key]['text/plain'])) {
foreach($allservices[$key]['text/plain'] as $object)
echo '<i class="fa fa-check" title="'.get_class($object).'"></i> ';
}
echo "</td>";
echo "<td>";
if(!empty($allservices[$key]['application/pdf'])) {
foreach($allservices[$key]['application/pdf'] as $object)
echo '<i class="fa fa-check" title="'.get_class($object).'"></i> ';
}
echo "</td>";
echo "</tr>";
}
}
echo "</tbody></table>";
}
echo "</tbody></table>";
}
$this->contentHeading(getMLText("list_conversion_services"));
self::list_conversion_services($allservices);
$this->contentHeading(getMLText("list_conversion_services"));
self::list_conversion_services($allservices);
}
$this->contentEnd();