explorer de fichier
This commit is contained in:
parent
8f69cb0bc9
commit
2aff9d641b
|
@ -25,6 +25,7 @@ class FileController extends Controller
|
||||||
$subdirectory=$request->get("subdirectory");
|
$subdirectory=$request->get("subdirectory");
|
||||||
$clear=$request->get("clear");
|
$clear=$request->get("clear");
|
||||||
$view=$request->get("view");
|
$view=$request->get("view");
|
||||||
|
$defaultview=$request->get("defaultview");
|
||||||
|
|
||||||
// Récupérer en session le dernier subdirectory visité
|
// Récupérer en session le dernier subdirectory visité
|
||||||
$sessionsubdirectory = $this->get('session')->get('sessionsubdirectory');
|
$sessionsubdirectory = $this->get('session')->get('sessionsubdirectory');
|
||||||
|
@ -46,7 +47,7 @@ class FileController extends Controller
|
||||||
|
|
||||||
// Récupérer en session le mode de visualisation
|
// Récupérer en session le mode de visualisation
|
||||||
$sessionviewdirectory = $this->get('session')->get('sessionviewdirectory');
|
$sessionviewdirectory = $this->get('session')->get('sessionviewdirectory');
|
||||||
if(!is_array($sessionviewdirectory)) $sessionviewdirectory=[$directory=>"small"];
|
if(!is_array($sessionviewdirectory)) $sessionviewdirectory=[$directory=>$defaultview];
|
||||||
if($view) {
|
if($view) {
|
||||||
$sessionviewdirectory[$directory] = $view;
|
$sessionviewdirectory[$directory] = $view;
|
||||||
$this->get('session')->set('sessionviewdirectory',$sessionviewdirectory);
|
$this->get('session')->set('sessionviewdirectory',$sessionviewdirectory);
|
||||||
|
|
|
@ -1117,7 +1117,7 @@ class InitDataCommand extends ContainerAwareCommand
|
||||||
$entityWidget->setBorder(true);
|
$entityWidget->setBorder(true);
|
||||||
$entityWidget->setOpened(true);
|
$entityWidget->setOpened(true);
|
||||||
$entityWidget->setAccess(["config","user","group"]);
|
$entityWidget->setAccess(["config","user","group"]);
|
||||||
$parameter = json_decode('{"fields": []}');
|
$parameter = json_decode('{"fields": [{"id": "modelist", "loc": "col1", "type": "modelist", "label": "Mode Affichage", "value": "0", "mandatory": "true"}]}');
|
||||||
$entityWidget->setParameter($parameter);
|
$entityWidget->setParameter($parameter);
|
||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
|
|
|
@ -1606,6 +1606,15 @@ class PagewidgetController extends Controller
|
||||||
]);
|
]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Parametres
|
||||||
|
$view="small";
|
||||||
|
foreach($entity->getParameter()["fields"] as $parameter) {
|
||||||
|
switch($parameter["id"]) {
|
||||||
|
case "modelist":
|
||||||
|
$view=($parameter["value"]==0?"small":"list");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewfile.html.twig', [
|
return $this->render($this->labelentity.':viewfile.html.twig', [
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
|
@ -1613,6 +1622,7 @@ class PagewidgetController extends Controller
|
||||||
'canupdate' => $canupdate,
|
'canupdate' => $canupdate,
|
||||||
'access' => $access,
|
'access' => $access,
|
||||||
'directory' => "widget-".$id,
|
'directory' => "widget-".$id,
|
||||||
|
'view' => $view,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||||
|
|
||||||
<iframe id="frame-{{directory}}" src="{{ path("cadoles_core_"~access~"_file_list",{'directory':directory}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
<iframe id="frame-{{directory}}" src="{{ path("cadoles_core_"~access~"_file_list",{'directory':directory,'defaultview':view}) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue