Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix project name not being present in my page documents

Oliver Günthereb3f15b12d90
diff --git a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
index 44db5a56e58..22eee4ea2e0 100644
--- a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
@@ -1,22 +1,25 @@
<widget-header
- [name]="widgetName"
- [editable]="isEditable">
+ [name]="widgetName"
+ [editable]="isEditable">
<widget-menu
- slot="menu"
- [resource]="resource">
+ slot="menu"
+ [resource]="resource">
</widget-menu>
</widget-header>
<div class="grid--widget-content">
<op-no-results *ngIf="noEntries"
- [title]="text.noResults">
+ [title]="text.noResults">
</op-no-results>
<ng-container *ngFor="let document of entries">
<h4 class="document-category-elements--header">
<a [href]="documentPath(document)"
[textContent]="document.title">
</a>
+ <span *ngIf="!currentProject.identifier">
+ ({{ text.project }}: {{ document.project.name }})
+ </span>
</h4>
<p class="document-category-elements--date">
<em [textContent]="documentCreated(document)"></em>
diff --git a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.ts b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.ts
index 9fd942e22d1..6c4dd95fb3d 100644
--- a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.ts
+++ b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.ts
@@ -24,6 +24,7 @@ import { DocumentResource } from '../../../../../../../../modules/documents/fron
export class WidgetDocumentsComponent extends AbstractWidgetComponent implements OnInit {
public text = {
noResults: this.i18n.t('js.grid.widgets.documents.no_results'),
+ project: this.i18n.t('js.label_project'),
};
public entries:DocumentResource[] = [];