From e3b5dd2d680254cc3a80f13b9b00dfe8bc810db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 18 Apr 2018 19:59:37 +0200 Subject: [PATCH] Fix downgraded help text component --- app/views/attribute_help_texts/_tab.html.erb | 8 ++++---- frontend/app/angular4-modules.ts | 3 +++ .../common/help-texts/attribute-help-text.component.ts | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/attribute_help_texts/_tab.html.erb b/app/views/attribute_help_texts/_tab.html.erb index 27f2457c21..e1c3fa62a6 100644 --- a/app/views/attribute_help_texts/_tab.html.erb +++ b/app/views/attribute_help_texts/_tab.html.erb @@ -72,10 +72,10 @@ See docs/COPYRIGHT.rdoc for more details. + [help-text-id]="<%= attribute_help_text.id %>" + [attribute]="'<%= attribute_help_text.attribute_name %>'" + [attribute-scope]="'<%= attribute_help_text.attribute_scope %>'" + [additional-label]="'<%= t(:'attribute_help_texts.show_preview') %>'"> diff --git a/frontend/app/angular4-modules.ts b/frontend/app/angular4-modules.ts index 517d390c6b..f34535821e 100644 --- a/frontend/app/angular4-modules.ts +++ b/frontend/app/angular4-modules.ts @@ -501,6 +501,9 @@ import {UploadProgressComponent} from 'core-components/common/notifications/uplo // Notifications NotificationsContainerComponent, OpDateTimeComponent, + + // Entries for ng1 downgraded components + AttributeHelpTextComponent, ] }) export class OpenProjectModule { diff --git a/frontend/app/components/common/help-texts/attribute-help-text.component.ts b/frontend/app/components/common/help-texts/attribute-help-text.component.ts index 91159cbff8..670bb011f8 100644 --- a/frontend/app/components/common/help-texts/attribute-help-text.component.ts +++ b/frontend/app/components/common/help-texts/attribute-help-text.component.ts @@ -92,4 +92,7 @@ export class AttributeHelpTextComponent implements OnInit { } } -opUiComponentsModule.component('attributeHelpText', downgradeComponent({ component: AttributeHelpTextComponent })); +opUiComponentsModule.directive( + 'attributeHelpText', + downgradeComponent({ component: AttributeHelpTextComponent }) +);