svg
This commit is contained in:
@ -18,8 +18,8 @@ class FileController extends AbstractController
|
||||
$this->fileService = $fileService;
|
||||
}
|
||||
|
||||
#[Route('/user/file/{domain}/{id}', name: 'app_files', methods: ['GET'])]
|
||||
public function browse(string $domain, int $id, Request $request): Response
|
||||
#[Route('/user/file/{domain}/{id}/{editable}', name: 'app_files', methods: ['GET'])]
|
||||
public function browse(string $domain, int $id, int $editable, Request $request): Response
|
||||
{
|
||||
$relativePath = $request->query->get('path', '');
|
||||
|
||||
@ -31,15 +31,16 @@ class FileController extends AbstractController
|
||||
'id' => $id,
|
||||
'files' => $files,
|
||||
'path' => $relativePath,
|
||||
'editable' => true,
|
||||
'editable' => $editable,
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
$this->addFlash('danger', $e->getMessage());
|
||||
dd($e->getMessage());
|
||||
|
||||
return $this->redirectToRoute('app_files', [
|
||||
'domain' => $domain,
|
||||
'id' => $id,
|
||||
'editable' => true,
|
||||
'editable' => $editable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
class="file-browser"
|
||||
data-domain="{{ domain }}"
|
||||
data-id="{{ id }}"
|
||||
data-base-path="{{ path('app_files', { domain: domain, id: id }) }}"
|
||||
data-base-path="{{ path('app_files', { domain: domain, id: id, editable: editable }) }}"
|
||||
data-current-path="{{ path }}">
|
||||
|
||||
<div class="card mt-3">
|
||||
|
@ -5,10 +5,8 @@
|
||||
<div class='d-flex' style='justify-content: center'>
|
||||
{% for project in projects %}
|
||||
<div class='card'>
|
||||
<a href='{{ path('app_project_view',{id:project.id})}}' class='d-flex' style='flex-direction: column; text-align: center'>
|
||||
<img src='{{asset(project.logo)}}' style='width:250px'>
|
||||
<h5>{{project.title}}</h5>
|
||||
</a>
|
||||
<h5>{{project.title}}</h5>
|
||||
{{ render(path("app_files",{domain:'project',id:project.id, editable:0})) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
|
||||
{% if mode=="update" %}
|
||||
{{ render(path("app_files",{domain:'project',id:project.id})) }}
|
||||
{{ render(path("app_files",{domain:'project',id:project.id, editable:1})) }}
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
|
||||
|
Reference in New Issue
Block a user