explorer de fichier
This commit is contained in:
parent
8f69cb0bc9
commit
2aff9d641b
@ -25,6 +25,7 @@ class FileController extends Controller
|
||||
$subdirectory=$request->get("subdirectory");
|
||||
$clear=$request->get("clear");
|
||||
$view=$request->get("view");
|
||||
$defaultview=$request->get("defaultview");
|
||||
|
||||
// Récupérer en session le dernier subdirectory visité
|
||||
$sessionsubdirectory = $this->get('session')->get('sessionsubdirectory');
|
||||
@ -46,7 +47,7 @@ class FileController extends Controller
|
||||
|
||||
// Récupérer en session le mode de visualisation
|
||||
$sessionviewdirectory = $this->get('session')->get('sessionviewdirectory');
|
||||
if(!is_array($sessionviewdirectory)) $sessionviewdirectory=[$directory=>"small"];
|
||||
if(!is_array($sessionviewdirectory)) $sessionviewdirectory=[$directory=>$defaultview];
|
||||
if($view) {
|
||||
$sessionviewdirectory[$directory] = $view;
|
||||
$this->get('session')->set('sessionviewdirectory',$sessionviewdirectory);
|
||||
|
@ -1117,7 +1117,7 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$entityWidget->setBorder(true);
|
||||
$entityWidget->setOpened(true);
|
||||
$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);
|
||||
$em->persist($entityWidget);
|
||||
|
||||
|
@ -1606,13 +1606,23 @@ 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', [
|
||||
'entity' => $entity,
|
||||
'canadd' => $canupdate,
|
||||
'canupdate' => $canupdate,
|
||||
'access' => $access,
|
||||
'directory' => "widget-".$id,
|
||||
'view' => $view,
|
||||
]);
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user