From 40ed613fe736f63c64ed2517a28e60ebbfaeab22 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Sun, 15 Dec 2024 19:55:32 +0100 Subject: [PATCH] dateien improved version display --- phpwf/plugins/class.yui.php | 23 +++++++++++++++++------ www/pages/dateien.php | 16 ++++++++++++---- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index 5a5e8b2f..9dd3d631 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -4215,9 +4215,9 @@ url:strUrl, success:function(html){strReturn = html;}, async:false $sortmodus = $this->TableSearchFilter($name, 1, 'sortmodus', 0,0, 'checkbox'); // headings - $heading = array('','','','Titel', 'Stichwort', 'Version','Größe', 'Ersteller','Version','Datum','Sortierung','Geschützt','Menü'); + $heading = array('','','','Titel', 'Stichwort', 'Version','Größe', 'Ersteller','Beschreibung','Datum','Sortierung','Geschützt','Menü'); $width = array('1%','1%','10','40%', '15%', '5%','10%','15%', '10%', '10%','15%', '10%','5%','1%','1%'); - $findcols = array('open','d.id','d.id',"CONCAT(d.titel,' ',v.dateiname)", 's.subjekt', 'v.version',"if(v.size!='',if(v.size > 1024*1024,CONCAT(ROUND(v.size/1024/1024,2),' MB'),CONCAT(ROUND(v.size/1024,2),' KB')),'')", 'v.ersteller','v.bemerkung','v.datum', 's.sort','d.geschuetzt','s.id'); + $findcols = array('open','d.id','d.id',"CONCAT(d.titel,' ',v.dateiname)", 's.subjekt', 'v.version',"if(v.size!='',if(v.size > 1024*1024,CONCAT(ROUND(v.size/1024/1024,2),' MB'),CONCAT(ROUND(v.size/1024,2),' KB')),'')", 'v.ersteller','d.beschreibungbemerkung','v.datum', 's.sort','d.geschuetzt','s.id'); $searchsql = array('d.titel', 's.subjekt', 'v.version',"if(v.size!='',if(v.size > 1024*1024,CONCAT(ROUND(v.size/1024/1024,2),' MB'),CONCAT(ROUND(v.size/1024,2),' KB')),'')", 'v.ersteller','v.bemerkung','v.dateiname',"DATE_FORMAT(v.datum, '%d.%m.%Y')"); $menu = "
app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"> app->Conf->WFconf['defaulttheme']}/images/download.svg\" border=\"0\"> app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\" >
"; @@ -4232,10 +4232,21 @@ url:strUrl, success:function(html){strReturn = html;}, async:false } // SQL statement - $sql = "SELECT SQL_CALC_FOUND_ROWS d.id,'app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open,concat(''), - $img, - - if(d.titel!='',CONCAT(d.titel,'
',v.dateiname,''),v.dateiname), s.subjekt, v.version, if(v.size!='',if(v.size > 1024*1024,CONCAT(ROUND(v.size/1024/1024,2),' MB'),CONCAT(ROUND(v.size/1024,2),' KB')),''), v.ersteller, v.bemerkung, DATE_FORMAT(v.datum, '%d.%m.%Y'),s.sort,d.geschuetzt,".($sortmodus?"s.id": "d.id")." + $sql = "SELECT SQL_CALC_FOUND_ROWS + d.id, + 'app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open, + CONCAT(''), + $img, + if(d.titel!='',CONCAT(d.titel,'
',v.dateiname,''),v.dateiname), + s.subjekt, + v.version, + if(v.size!='',if(v.size > 1024*1024,CONCAT(ROUND(v.size/1024/1024,2),' MB'),CONCAT(ROUND(v.size/1024,2),' KB')),''), + v.ersteller, + d.beschreibung, + ".$this->app->erp->FormatDate("v.datum").", + s.sort, + d.geschuetzt, + ".($sortmodus?"s.id": "d.id")." FROM `datei` AS `d` INNER JOIN `datei_stichwoerter` AS `s` ON d.id=s.datei LEFT JOIN ( diff --git a/www/pages/dateien.php b/www/pages/dateien.php index dd5df8ae..aa5523e7 100644 --- a/www/pages/dateien.php +++ b/www/pages/dateien.php @@ -184,10 +184,18 @@ class Dateien { function DateienMinidetail() { - $id = (int)$this->app->Secure->GetGET('id'); - echo "

Beschreibung:

"; - echo nl2br($this->app->DB->Select("SELECT beschreibung FROM datei WHERE id = '$id' LIMIT 1")); - $this->app->ExitXentral(); + $id = (int)$this->app->Secure->GetGET('id'); + $table = new EasyTable($this->app); + $table->Query("SELECT version,dateiname,datum,ersteller,bemerkung,id FROM datei_version WHERE datei='$id'",0,""); + $table->DisplayNew('VERSIONEN'," + + "); + + $table = new EasyTable($this->app); + $table->Query("SELECT subjekt,objekt,parameter FROM datei_stichwoerter WHERE datei='$id'",0,""); + $table->DisplayNew('STICHWOERTER',"Parameter","noAction"); + $this->app->Tpl->Output('datei_minidetail.tpl'); + $this->app->ExitXentral(); } function DateienHauptMenu()