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 ...@@ -40,6 +40,7 @@ class Search_CoursesController extends AuthenticatedController
public function index_action() public function index_action()
{ {
$nodeClass = ''; $nodeClass = '';
$title = _('Vorlesungsverzeichnis');
if (Request::option('type', 'semtree') === 'semtree') { if (Request::option('type', 'semtree') === 'semtree') {
Navigation::activateItem('/search/courses/semtree'); Navigation::activateItem('/search/courses/semtree');
$nodeClass = StudipStudyArea::class; $nodeClass = StudipStudyArea::class;
...@@ -52,10 +53,12 @@ class Search_CoursesController extends AuthenticatedController ...@@ -52,10 +53,12 @@ class Search_CoursesController extends AuthenticatedController
$this->treeTitle = _('Einrichtungen'); $this->treeTitle = _('Einrichtungen');
$this->breadcrumbIcon = 'institute'; $this->breadcrumbIcon = 'institute';
$this->editUrl = $this->url_for('rangetree/edit'); $this->editUrl = $this->url_for('rangetree/edit');
$title = _('Einrichtungsverzeichnis');
} }
$this->startId = Request::option('node_id', $nodeClass . '_root'); $this->startId = Request::option('node_id', $nodeClass . '_root');
$this->setupSidebar(); $this->setupSidebar();
PageLayout::setTitle($title);
} }
public function export_results_action() public function export_results_action()
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<script> <script>
import axios from 'axios'; import axios from 'axios';
import { TreeMixin } from '../../mixins/TreeMixin'; import { TreeMixin } from '../../mixins/TreeMixin';
import PageLayout from '../../../assets/javascripts/lib/page_layout';
import StudipProgressIndicator from '../StudipProgressIndicator.vue'; import StudipProgressIndicator from '../StudipProgressIndicator.vue';
import SearchWidget from '../SearchWidget.vue'; import SearchWidget from '../SearchWidget.vue';
import StudipTreeViewWidget from './StudipTreeViewWidget.vue'; import StudipTreeViewWidget from './StudipTreeViewWidget.vue';
...@@ -176,7 +177,8 @@ export default { ...@@ -176,7 +177,8 @@ export default {
showStructuralNavigation: false, showStructuralNavigation: false,
searchConfig: {}, searchConfig: {},
isSearching: false, isSearching: false,
viewConfig: null viewConfig: null,
pageTitle: document.title
} }
}, },
methods: { methods: {
...@@ -188,6 +190,7 @@ export default { ...@@ -188,6 +190,7 @@ export default {
semester: this.semester, semester: this.semester,
semClass: this.semClass semClass: this.semClass
}; };
this.setPageTitle(this.currentNode.attributes.name);
this.$nextTick(() => { this.$nextTick(() => {
document.getElementById('tree-breadcrumb-' + node.attributes.id)?.focus(); document.getElementById('tree-breadcrumb-' + node.attributes.id)?.focus();
}); });
...@@ -206,6 +209,10 @@ export default { ...@@ -206,6 +209,10 @@ export default {
form.appendChild(input); form.appendChild(input);
} }
input.setAttribute('value', searchterm); input.setAttribute('value', searchterm);
},
setPageTitle(nodeTitle) {
const title = this.pageTitle.split('-');
PageLayout.title = title.slice(0, -1).join('-') + '/ ' + nodeTitle + ' -' + title[title.length - 1];
} }
}, },
mounted() { mounted() {
...@@ -231,6 +238,7 @@ export default { ...@@ -231,6 +238,7 @@ export default {
semester: this.semester, semester: this.semester,
semClass: this.semClass semClass: this.semClass
}; };
this.setPageTitle(this.currentNode.attributes.name);
}); });
axios.interceptors.request.eject(loadingIndicator); axios.interceptors.request.eject(loadingIndicator);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment