aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/admin/tree.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-07-04 13:31:50 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-07-04 13:31:50 +0000
commita9c40e363b3e13223bb771105c190be9475021a5 (patch)
treee2bb7cd2aea0ac45cc2b17076b88f8ddca519f78 /app/controllers/admin/tree.php
parentda240ca9af9136e52b125ed16ac9a31a396321fa (diff)
introduce [data-vue-app], fixes #4294
Closes #4294, #4295, #4297, #4298, #4301, #4304, and #4306 Merge request studip/studip!3109
Diffstat (limited to 'app/controllers/admin/tree.php')
-rw-r--r--app/controllers/admin/tree.php42
1 files changed, 40 insertions, 2 deletions
diff --git a/app/controllers/admin/tree.php b/app/controllers/admin/tree.php
index c8f2a8f..ec35368 100644
--- a/app/controllers/admin/tree.php
+++ b/app/controllers/admin/tree.php
@@ -7,10 +7,28 @@ class Admin_TreeController extends AuthenticatedController
$GLOBALS['perm']->check('root');
Navigation::activateItem('/admin/locations/range_tree');
PageLayout::setTitle(_('Einrichtungshierarchie bearbeiten'));
- $this->startId = Request::get('node_id', 'RangeTreeNode_root');
+
$this->semester = Request::option('semester', Semester::findCurrent()->id);
$this->classname = RangeTreeNode::class;
$this->setupSidebar();
+
+ $this->render_vue_app(
+ Studip\VueApp::create('tree/StudipTree')
+ ->withProps([
+ 'breadcrumb-icon' => 'institute',
+ 'create-url' => $this->createURL(),
+ 'delete-url' => $this->deleteURL(),
+ 'edit-url' => $this->editURL(),
+ 'editable' => true,
+ 'semester' => $this->semester,
+ 'show-structure-as-navigation' => true,
+ 'start-id' => Request::get('node_id', 'RangeTreeNode_root'),
+ 'title' => _('Einrichtungshierarchie bearbeiten'),
+ 'view-type' => 'table',
+ 'visible-children-only' => false,
+ 'with-courses' => true,
+ ])
+ );
}
public function semtree_action()
@@ -18,10 +36,30 @@ class Admin_TreeController extends AuthenticatedController
$GLOBALS['perm']->check('root');
Navigation::activateItem('/admin/locations/sem_tree');
PageLayout::setTitle(_('Veranstaltungshierarchie bearbeiten'));
- $this->startId = Request::get('node_id', 'StudipStudyArea_root');
+
+
$this->semester = Request::option('semester', Semester::findCurrent()->id);
$this->classname = StudipStudyArea::class;
$this->setupSidebar();
+
+ $this->render_vue_app(
+ Studip\VueApp::create('tree/StudipTree')
+ ->withProps([
+ 'breadcrumb-icon' => 'literature',
+ 'create-url' => $this->createURL(),
+ 'delete-url' => $this->deleteURL(),
+ 'edit-url' => $this->editURL(),
+ 'editable' => true,
+ 'semester' => $this->semester,
+ 'show-structure-as-navigation' => true,
+ 'start-id' => Request::get('node_id', 'StudipStudyArea_root'),
+ 'title' => _('Veranstaltungshierarchie bearbeiten'),
+ 'view-type' => 'table',
+ 'visible-children-only' => false,
+ 'with-course-assign' => true,
+ 'with-courses' => true,
+ ])
+ );
}
/**