diff --git a/app/controllers/search/courses.php b/app/controllers/search/courses.php index eaf660bea95653eaefb50e21157f3b1a05974a9c..e068cf7f3dfcbf303be60c9c2f8526747a335af9 100644 --- a/app/controllers/search/courses.php +++ b/app/controllers/search/courses.php @@ -40,6 +40,7 @@ class Search_CoursesController extends AuthenticatedController public function index_action() { $nodeClass = ''; + $title = _('Vorlesungsverzeichnis'); if (Request::option('type', 'semtree') === 'semtree') { Navigation::activateItem('/search/courses/semtree'); $nodeClass = StudipStudyArea::class; @@ -52,10 +53,12 @@ class Search_CoursesController extends AuthenticatedController $this->treeTitle = _('Einrichtungen'); $this->breadcrumbIcon = 'institute'; $this->editUrl = $this->url_for('rangetree/edit'); + $title = _('Einrichtungsverzeichnis'); } $this->startId = Request::option('node_id', $nodeClass . '_root'); $this->setupSidebar(); + PageLayout::setTitle($title); } public function export_results_action() diff --git a/resources/vue/components/tree/StudipTree.vue b/resources/vue/components/tree/StudipTree.vue index 167822500cceeb3f53f493f3335440ba2cda6c69..fc6dc41dd57ad267163aa6265a1f037ab6c1b41f 100644 --- a/resources/vue/components/tree/StudipTree.vue +++ b/resources/vue/components/tree/StudipTree.vue @@ -44,6 +44,7 @@ <script> import axios from 'axios'; import { TreeMixin } from '../../mixins/TreeMixin'; +import PageLayout from '../../../assets/javascripts/lib/page_layout'; import StudipProgressIndicator from '../StudipProgressIndicator.vue'; import SearchWidget from '../SearchWidget.vue'; import StudipTreeViewWidget from './StudipTreeViewWidget.vue'; @@ -176,7 +177,8 @@ export default { showStructuralNavigation: false, searchConfig: {}, isSearching: false, - viewConfig: null + viewConfig: null, + pageTitle: document.title } }, methods: { @@ -188,6 +190,7 @@ export default { semester: this.semester, semClass: this.semClass }; + this.setPageTitle(this.currentNode.attributes.name); this.$nextTick(() => { document.getElementById('tree-breadcrumb-' + node.attributes.id)?.focus(); }); @@ -206,6 +209,10 @@ export default { form.appendChild(input); } input.setAttribute('value', searchterm); + }, + setPageTitle(nodeTitle) { + const title = this.pageTitle.split('-'); + PageLayout.title = title.slice(0, -1).join('-') + '/ ' + nodeTitle + ' -' + title[title.length - 1]; } }, mounted() { @@ -231,6 +238,7 @@ export default { semester: this.semester, semClass: this.semClass }; + this.setPageTitle(this.currentNode.attributes.name); }); axios.interceptors.request.eject(loadingIndicator);