From d446cb936687d1f33fe4f541a9ca8f5a70d68c75 Mon Sep 17 00:00:00 2001 From: Inga Mai Date: Fri, 17 Jan 2020 15:44:15 +0100 Subject: [PATCH] Fix bugs in types and custom fields --- app/helpers/types_helper.rb | 4 ++-- app/views/types/edit.html.erb | 4 +--- .../src/app/modules/admin/tabs/content-tabs.component.ts | 6 ++++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/types_helper.rb b/app/helpers/types_helper.rb index 1616ddd059..28b121681b 100644 --- a/app/helpers/types_helper.rb +++ b/app/helpers/types_helper.rb @@ -28,9 +28,9 @@ #++ module ::TypesHelper - def types_tabs(type) + def types_tabs [ - { name: 'settings', partial: 'types/form/settings',path: edit_type_tab_path(id: @type.id, tab: :settings), label: 'types.edit.settings' }, + { name: 'settings', partial: 'types/form/settings', path: edit_type_tab_path(id: @type.id, tab: :settings), label: 'types.edit.settings' }, { name: 'form_configuration', partial: 'types/form/form_configuration', path: edit_type_tab_path(id: @type.id, tab: :form_configuration), label: 'types.edit.form_configuration' }, { name: 'projects', partial: 'types/form/projects', path: edit_type_tab_path(id: @type.id, tab: :projects), label: 'types.edit.projects' } ] diff --git a/app/views/types/edit.html.erb b/app/views/types/edit.html.erb index 3a1ecebeb4..d03ac00f3b 100644 --- a/app/views/types/edit.html.erb +++ b/app/views/types/edit.html.erb @@ -36,8 +36,6 @@ See docs/COPYRIGHT.rdoc for more details. <%= breadcrumb_toolbar @type.name %> -<%= render_tabs types_tabs(@type) %> +<%= render_tabs types_tabs %> <%= error_messages_for 'type' %> - -<%= render partial: "types/form/#{@tab}" %> diff --git a/frontend/src/app/modules/admin/tabs/content-tabs.component.ts b/frontend/src/app/modules/admin/tabs/content-tabs.component.ts index 0229f224ec..6d00e877a3 100644 --- a/frontend/src/app/modules/admin/tabs/content-tabs.component.ts +++ b/frontend/src/app/modules/admin/tabs/content-tabs.component.ts @@ -30,7 +30,8 @@ import { Component, OnDestroy, Input, - ElementRef + ElementRef, + ChangeDetectionStrategy } from '@angular/core'; import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; import {GonService} from "core-app/modules/common/gon/gon.service"; @@ -50,7 +51,8 @@ interface GonTab { @Component({ selector: contentTabsSelector, - templateUrl: '/app/modules/common/tabs/scrollable-tabs.component.html' + templateUrl: '/app/modules/common/tabs/scrollable-tabs.component.html', + changeDetection: ChangeDetectionStrategy.OnPush }) export class ContentTabsComponent extends ScrollableTabsComponent {