Skip to content
Snippets Groups Projects
Commit c1de8c5a authored by Thomas Hackl's avatar Thomas Hackl
Browse files

Resolve "Beim Navigieren durch das Vorlesungsverzeichnis aktualisiert sich der Seitentitel nicht"

Closes #4035

Merge request studip/studip!2890
parent 38451e87
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment