Skip to content
Snippets Groups Projects
Commit 23e4925b authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

align owner and editor definition, fixes #1614

Closes #1614

Merge request studip/studip!1039
parent b6a6ced9
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
}" }"
> >
<div v-if="structuralElementLoaded" class="cw-companion-box-wrapper"> <div v-if="structuralElementLoaded" class="cw-companion-box-wrapper">
<courseware-companion-box <courseware-companion-box
v-if="blockedByAnotherUser" v-if="blockedByAnotherUser"
:msgCompanion="$gettextInterpolate('Die Einstellungen dieser Seite werden im Moment von %{blockingUserName} bearbeitet', {blockingUserName: blockingUserName})" :msgCompanion="$gettextInterpolate('Die Einstellungen dieser Seite werden im Moment von %{blockingUserName} bearbeitet', {blockingUserName: blockingUserName})"
mood="pointing" mood="pointing"
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
</tr> </tr>
<tr> <tr>
<td><translate>Zuletzt bearbeitet von</translate>:</td> <td><translate>Zuletzt bearbeitet von</translate>:</td>
<td>{{ editor }}</td> <td>{{ editorName }}</td>
</tr> </tr>
<tr> <tr>
<td><translate>Zuletzt bearbeitet am</translate>:</td> <td><translate>Zuletzt bearbeitet am</translate>:</td>
...@@ -948,8 +948,13 @@ export default { ...@@ -948,8 +948,13 @@ export default {
relationship: 'editor', relationship: 'editor',
}); });
return editor?.attributes['formatted-name'] ?? ''; return editor ?? null;
},
editorName() {
return this.editor?.attributes['formatted-name'] ?? '?';
}, },
menuItems() { menuItems() {
let menu = [ let menu = [
{ id: 4, label: this.$gettext('Informationen anzeigen'), icon: 'info', emit: 'showInfo' }, { id: 4, label: this.$gettext('Informationen anzeigen'), icon: 'info', emit: 'showInfo' },
...@@ -971,7 +976,7 @@ export default { ...@@ -971,7 +976,7 @@ export default {
icon: 'arr_1sort', icon: 'arr_1sort',
emit: 'sortContainers', emit: 'sortContainers',
}); });
} }
if (this.blocked && this.blockedByAnotherUser && this.userIsTeacher) { if (this.blocked && this.blockedByAnotherUser && this.userIsTeacher) {
menu.push({ menu.push({
id: 1, id: 1,
...@@ -1278,10 +1283,10 @@ export default { ...@@ -1278,10 +1283,10 @@ export default {
parent: { type: this.structuralElement.type, id: this.structuralElement.id }, parent: { type: this.structuralElement.type, id: this.structuralElement.id },
relationship: 'owner' relationship: 'owner'
}); });
return user ? user : null; return user ?? null;
}, },
ownerName() { ownerName() {
return this.owner ? this.owner.attributes['formatted-name'] : '?'; return this.owner?.attributes['formatted-name'] ?? '?';
}, },
}, },
......
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