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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Use correct labels and extract path to PathHelper
Henriette Darge06921dcbec06
diff --git a/app/forms/work_packages/share/invitee.rb b/app/forms/work_packages/share/invitee.rbindex 1a0a9c586fd..c91eeac669d 100644--- a/app/forms/work_packages/share/invitee.rb+++ b/app/forms/work_packages/share/invitee.rb@@ -34,6 +34,7 @@ module WorkPackages::Sharevisually_hide_label: true,autocomplete_options: {id: "op-share-wp-user-autocomplete",+ placeholder: I18n.t('work_package.sharing.label_search_placeholder'),data: {'test-selector': 'op-share-wp-user-autocomplete'},diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 61888ccf629..adfa627cc6c 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -3155,6 +3155,7 @@ en:other: "%{count} members"invite: "Invite"label_search: "Search for users to invite"+ label_search_placeholder: "Search by user, group or email address"permissions:comment: "Comment"denied: "You don't have permissions to share work packages."diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 69de2035dde..d031b7d082e 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -1096,6 +1096,7 @@ en:is_switched_from_manual_to_automatic: "The dates of this work package may need to be recalculated after switching from manual to automatic scheduling due to relationships with other work packages."sharing:share: 'Share'+ title: "Share work package"table:configure_button: 'Configure work package table'summary: "Table with rows of work package and columns of work package attributes."diff --git a/frontend/src/app/core/path-helper/path-helper.service.ts b/frontend/src/app/core/path-helper/path-helper.service.tsindex a0f37d67581..973a969382d 100644--- a/frontend/src/app/core/path-helper/path-helper.service.ts+++ b/frontend/src/app/core/path-helper/path-helper.service.ts@@ -260,6 +260,10 @@ export class PathHelperService {return `${this.projectWorkPackagesPath(projectIdentifier)}/details/${workPackageId}/copy`;}+ public workPackageSharePath(workPackageId:string|number) {+ return `${this.workPackagePath(workPackageId)}/shares`;+ }+// Work Package Bulk pathspublic workPackagesBulkEditPath() {diff --git a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.htmlindex e4dc68762a8..17f3c7dd2a4 100644--- a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html+++ b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html@@ -3,7 +3,9 @@><divclass="spot-modal--header"- >TODO</div>+ [textContent]="this.text.title"+ >+ </div><div class="spot-modal--body spot-container"><turbo-frame id="work_package_share_list" src="{{this.frameSrc}}">diff --git a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.tsindex 3d303c13969..c7fc0b86dde 100644--- a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts+++ b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.ts@@ -11,6 +11,7 @@ import { OpModalComponent } from 'core-app/shared/components/modal/modal.componeimport { OpModalLocalsToken } from 'core-app/shared/components/modal/modal.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';+import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';@Component({templateUrl: './wp-share.modal.html',@@ -20,17 +21,21 @@ export class WorkPackageShareModalComponent extends OpModalComponent implementsprivate workPackage:WorkPackageResource;public frameSrc:string;+ text = {+ title: this.I18n.t('js.work_packages.sharing.title'),+ };+constructor(@Inject(OpModalLocalsToken) public locals:OpModalLocalsMap,readonly cdRef:ChangeDetectorRef,readonly I18n:I18nService,readonly elementRef:ElementRef,+ protected pathHelper:PathHelperService,) {super(locals, cdRef, elementRef);this.workPackage = this.locals.workPackage as WorkPackageResource;- // TODO: put into path helper- this.frameSrc = `/work_packages/${this.workPackage.id as string}/shares`;+ this.frameSrc = this.pathHelper.workPackageSharePath(this.workPackage.id as string);}ngOnInit() {