widget only preference
This commit is contained in:
parent
8f2e412b60
commit
e029ad79a6
|
@ -76,13 +76,13 @@ class FrameController extends Controller
|
||||||
}
|
}
|
||||||
if((!array_key_exists($directory,$preference["widgetsortdirectory"]))) {
|
if((!array_key_exists($directory,$preference["widgetsortdirectory"]))) {
|
||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference["widgetsortdirectory"][$directory]="name";
|
$preference["widgetsortdirectory"][$directory]="title";
|
||||||
}
|
}
|
||||||
if($sort&&$preference["widgetsortdirectory"][$directory]!=$sort) {
|
if($sort&&$preference["widgetsortdirectory"][$directory]!=$sort) {
|
||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference["widgetsortdirectory"][$directory]=$sort;
|
$preference["widgetsortdirectory"][$directory]=$sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mise à jour des préferences
|
// Mise à jour des préferences
|
||||||
if($toupdate) {
|
if($toupdate) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -96,6 +96,33 @@ class FrameController extends Controller
|
||||||
$firstfolder=($subdirectory?$subdirectory:null);
|
$firstfolder=($subdirectory?$subdirectory:null);
|
||||||
$files=$onlyservice->getDocument($grp->getId(), $firstfolder, $parents, $tasks);
|
$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
|
// Récupération du numéro de groupe oo
|
||||||
if($grp) $idonly= $grp->getIdOnlyoffice();
|
if($grp) $idonly= $grp->getIdOnlyoffice();
|
||||||
else $idonly=0;
|
else $idonly=0;
|
||||||
|
|
|
@ -11,10 +11,15 @@
|
||||||
|
|
||||||
.grid .grid-list .grid-item-title h2 {
|
.grid .grid-list .grid-item-title h2 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
line-height: 18px;
|
||||||
height: 22px;
|
height: 18px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid .grid-list .grid-item-title {
|
||||||
|
padding:0px 0px 0px 5px;
|
||||||
|
line-height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.grid-item-title h2 {
|
.grid-item-title h2 {
|
||||||
text-transform: initial !important;
|
text-transform: initial !important;
|
||||||
}
|
}
|
||||||
|
@ -39,19 +44,38 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{%set action="small" %}
|
{%set action="small" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not subdirectory is empty %}
|
{% if not subdirectory is empty %}
|
||||||
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'subdirectory':subdirectory,'view':action }) }}" type="button" class="btn btn-primary">
|
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'subdirectory':subdirectory,'view':action }) }}" type="button" class="btn btn-primary">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'clear':true,'view':action }) }}" type="button" class="btn btn-primary">
|
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'clear':true,'view':action }) }}" type="button" class="btn btn-primary">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if view=="small" %}
|
{% if view=="small" %}
|
||||||
<i class="fas fa-list"></i>
|
<i class="fas fa-list"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fas fa-th"></i>
|
<i class="fas fa-th"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{% if sort=="title" %}
|
||||||
|
{%set action="updated" %}
|
||||||
|
{% elseif sort=="updated" %}
|
||||||
|
{%set action="author" %}
|
||||||
|
{% else %}
|
||||||
|
{%set action="title" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if not subdirectory is empty %}
|
||||||
|
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'subdirectory':subdirectory,'sort':action }) }}" type="button" class="btn btn-primary">
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ path('cadoles_portal_'~access~'_frame_only',{'directory':directory,'clear':true,'sort':action }) }}" type="button" class="btn btn-primary">
|
||||||
|
{% endif %}
|
||||||
|
{% if sort=="title" %}
|
||||||
|
<i class="fas fa-long-arrow-alt-down"></i> Nom
|
||||||
|
{% elseif sort=="updated" %}
|
||||||
|
<i class="fas fa-long-arrow-alt-down"></i> Date
|
||||||
|
{% else %}
|
||||||
|
<i class="fas fa-long-arrow-alt-down"></i> Utilisateur
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -83,7 +107,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
<div class="grid-item-title">
|
||||||
<h2>{{ folder.info.title }}</h2>
|
<h2>{{ folder.info.title }}</h2>{% if view=="list" %}<small>le {{ folder.updatedformat }} par {{ folder.author }}</small>{%endif%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -105,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-item-title">
|
<div class="grid-item-title">
|
||||||
<h2>{{ file.title }}</h2>
|
<h2>{{ file.title }}</h2>{% if view=="list" %}<small>le {{ file.updatedformat }} par {{ file.author }}</small>{%endif%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -158,6 +182,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".grid-item-title > h2").css("color",color);
|
$(".grid-item-title > h2").css("color",color);
|
||||||
|
$(".grid-item-title > small").css("color",color);
|
||||||
$("#onlytasks").css("color",color);
|
$("#onlytasks").css("color",color);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue