diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FrameController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FrameController.php index 99fe4a4a..8d2930dd 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FrameController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/FrameController.php @@ -76,13 +76,13 @@ class FrameController extends Controller } if((!array_key_exists($directory,$preference["widgetsortdirectory"]))) { $toupdate=true; - $preference["widgetsortdirectory"][$directory]="name"; + $preference["widgetsortdirectory"][$directory]="title"; } if($sort&&$preference["widgetsortdirectory"][$directory]!=$sort) { $toupdate=true; $preference["widgetsortdirectory"][$directory]=$sort; } - + // Mise à jour des préferences if($toupdate) { $em = $this->getDoctrine()->getManager(); @@ -96,6 +96,33 @@ class FrameController extends Controller $firstfolder=($subdirectory?$subdirectory:null); $files=$onlyservice->getDocument($grp->getId(), $firstfolder, $parents, $tasks); + // Trie Fichier + $tmpfiles=$files[$firstfolder]["files"]; + foreach($tmpfiles as $key => $value) { + $tmpfiles[$key]->author=$value->updatedBy->displayName; + $tmpfiles[$key]->updatedformat= date('d/m/Y h:i', strtotime($value->updated)); + } + $sort = array_column($tmpfiles, $preference["widgetsortdirectory"][$directory]); + array_multisort($sort, SORT_ASC, $tmpfiles); + $files[$firstfolder]["files"] = $tmpfiles; + + // Trie Dossier + $tmpdirs=$files[$firstfolder]["folders"]; + foreach($tmpdirs as $key => $value) { + $tmpdirs[$key]["title"]=$value["info"]->title; + $tmpdirs[$key]["updated"]= $value["info"]->updated; + $tmpdirs[$key]["updatedformat"]= date('d/m/Y h:i', strtotime($value["info"]->updated)); + $tmpdirs[$key]["author"]=$value["info"]->updatedBy->displayName; + } + $sort = array_column($tmpdirs, $preference["widgetsortdirectory"][$directory]); + array_multisort($sort, SORT_ASC, $tmpdirs); + $files[$firstfolder]["folders"] = $tmpdirs; + + //$sort = array_column($tmpfiles, $preference["widgetsortdirectory"][$directory]); + //array_multisort($sort, SORT_ASC, $tmpfiles); + //$files[$firstfolder]["files"] = $tmpfiles; + + // Récupération du numéro de groupe oo if($grp) $idonly= $grp->getIdOnlyoffice(); else $idonly=0; diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Frame/only.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Frame/only.html.twig index 788b249c..dbcd0349 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Frame/only.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Frame/only.html.twig @@ -11,10 +11,15 @@ .grid .grid-list .grid-item-title h2 { font-size: 14px; - line-height: 22px; - height: 22px; + line-height: 18px; + height: 18px } + .grid .grid-list .grid-item-title { + padding:0px 0px 0px 5px; + line-height: 10px; + } + .grid-item-title h2 { text-transform: initial !important; } @@ -39,19 +44,38 @@ {% else %} {%set action="small" %} {% endif %} - {% if not subdirectory is empty %} {% else %} {% endif %} - {% if view=="small" %} {% else %} {% endif %} + + {% if sort=="title" %} + {%set action="updated" %} + {% elseif sort=="updated" %} + {%set action="author" %} + {% else %} + {%set action="title" %} + {% endif %} + {% if not subdirectory is empty %} + + {% else %} + + {% endif %} + {% if sort=="title" %} + Nom + {% elseif sort=="updated" %} + Date + {% else %} + Utilisateur + {% endif %} + @@ -83,7 +107,7 @@