aboutsummaryrefslogtreecommitdiff
path: root/app/views/files/flat.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2024-06-11 22:31:40 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-07-04 15:37:55 +0200
commite9765e298b4972ae1066348bdb4b4299e081d026 (patch)
treea3315b8f9215c8057f809a54618f45a2404f6643 /app/views/files/flat.php
parenta9c40e363b3e13223bb771105c190be9475021a5 (diff)
files wiptic-4299
Diffstat (limited to 'app/views/files/flat.php')
-rw-r--r--app/views/files/flat.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/app/views/files/flat.php b/app/views/files/flat.php
index 1440117..6033822 100644
--- a/app/views/files/flat.php
+++ b/app/views/files/flat.php
@@ -43,22 +43,18 @@ foreach ($topFolder->getAdditionalActionButtons() as $button) {
$vue_topFolder['buttons'] .= $button;
}
?>
-<form id="files_table_form"
- method="post"
- action="<?= htmlReady($form_action ?? '') ?>"
- data-files="<?= htmlReady(json_encode($vue_files)) ?>"
- data-topfolder="<?= htmlReady(json_encode((array) $vue_topFolder)) ?>">
+<form method="post" action="<?= htmlReady($form_action ?? '') ?>">
<?= CSRFProtection::tokenTag() ?>
- <files-table :showdownloads="<?= $show_downloads ? "true" : "false" ?>"
- :breadcrumbs="breadcrumbs"
- :files="files"
- :folders="folders"
- :topfolder="topfolder"
- :allow_filter="<?= json_encode(!empty($enable_table_filter)) ?>"
- table_title="<?= htmlReady($table_title ?? '') ?>"
- pagination="<?= htmlReady($pagination_html ?? '') ?>"
- :initial_sort="{sortedBy:'chdate',sortDirection:'desc'}"
- ></files-table>
+ <?= Studip\VueApp::create('FilesTable')
+ ->withProps([
+ 'allow_filter' => !empty($enable_table_filter),
+ 'files' => $vue_files,
+ 'initial_sort' => ['sortedBy' => 'chdate', 'sortDirection' => 'desc'],
+ 'pagination' => $pagination_html ?? '',
+ 'showdownloads' => $show_downloads,
+ 'table_title' => $table_title ?? '',
+ 'topfolder' => $vue_topFolder,
+ ]) ?>
</form>
<?
if (!empty($show_default_sidebar)) {