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

[43905] Tooltip messages broken in include projects (#11228)

Behrokh Satarnejad88a665a73a95
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 946ac0abbb5..45a3197b294 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -1284,7 +1284,7 @@ en:
search_placeholder: 'Search project...'
include_subprojects: 'Include all sub-projects'
tooltip:
- include_all_selected: 'Include all sub-projects is currently selected.'
+ include_all_selected: 'Project already included since Include all sub-projects is enabled.'
current_project: 'This is the current project you are in.'
does_not_match_search: 'Project does not match the search criteria.'
no_results: 'No project matches your search criteria.'
diff --git a/frontend/src/app/shared/components/project-include/list/project-include-list.component.html b/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
index 284095f243f..b03130b396e 100644
--- a/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
+++ b/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
@@ -42,9 +42,14 @@
slot="body"
class="spot-body-small"
>
- <span *ngIf="project.disabled">{{ text.does_not_match_search }}</span>
- <span *ngIf="includeSubprojects && parentChecked">{{ text.include_all_selected }}</span>
- <span *ngIf="project.href === currentProjectHref">{{ text.current_project }}</span>
+ <span *ngIf="project.href === currentProjectHref else otherMessages">{{ text.current_project }}</span>
+
+ <ng-template #otherMessages>
+ <span *ngIf="includeSubprojects && parentChecked else searchMatch">{{ text.include_all_selected }}</span>
+ <ng-template #searchMatch>
+ <span *ngIf="project.disabled">{{ text.does_not_match_search }}</span>
+ </ng-template>
+ </ng-template>
</p>
</spot-tooltip>
</label>
diff --git a/frontend/src/app/spot/styles/sass/components/tooltip.sass b/frontend/src/app/spot/styles/sass/components/tooltip.sass
index b70d29846ff..eef0ecd09d6 100644
--- a/frontend/src/app/spot/styles/sass/components/tooltip.sass
+++ b/frontend/src/app/spot/styles/sass/components/tooltip.sass
@@ -10,7 +10,7 @@
opacity: 0
position: absolute
- min-width: $spot-spacing-10 + $spot-spacing-2
+ min-width: $spot-spacing-10 + $spot-spacing-10
max-width: 90vw
height: auto