mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
117287: Fixed various layout issues
- The unthemed home news didn't stick to the header like the dspace theme - Impersonate user button has additional margin - Submission form loading icon is not translatable - Create resource policy page doesn't have the correct heading
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (canImpersonate$ | async) {
|
@if (canImpersonate$ | async) {
|
||||||
<div between class="btn-group ms-1">
|
<div between class="btn-group">
|
||||||
@if (!isImpersonated) {
|
@if (!isImpersonated) {
|
||||||
<button class="btn btn-primary" type="button" (click)="impersonate()">
|
<button class="btn btn-primary" type="button" (click)="impersonate()">
|
||||||
<i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.impersonate' | translate}}
|
<i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.impersonate' | translate}}
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
import {
|
import { AsyncPipe } from '@angular/common';
|
||||||
AsyncPipe,
|
|
||||||
NgClass,
|
|
||||||
} from '@angular/common';
|
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
@@ -84,7 +81,6 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
|||||||
FormComponent,
|
FormComponent,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgClass,
|
|
||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
PaginationComponent,
|
PaginationComponent,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="jumbotron py-4 px-2 py-sm-5 px-sm-0 mt-0 mb-4">
|
<div class="jumbotron py-4 px-2 py-sm-5 px-sm-0 mt-ncs mb-4">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex flex-wrap">
|
<div class="d-flex flex-wrap">
|
||||||
<div>
|
<div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h4 class="mb-3">{{'resource-policies.create.page.heading' | translate}} {{targetResourceName}}</h4>
|
<h1 class="mb-3">{{'resource-policies.create.page.heading' | translate}} {{targetResourceName}}</h1>
|
||||||
|
|
||||||
<ds-resource-policy-form [isProcessing]="isProcessing()"
|
<ds-resource-policy-form [isProcessing]="isProcessing()"
|
||||||
(reset)="redirectToAuthorizationsPage()"
|
(reset)="redirectToAuthorizationsPage()"
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="submission-form-content">
|
<div class="submission-form-content">
|
||||||
@if ((isLoading$ | async)) {
|
@if (isLoading$ | async) {
|
||||||
<ds-loading message="Loading..."></ds-loading>
|
<ds-loading [message]="'form.loading' | translate"></ds-loading>
|
||||||
}
|
}
|
||||||
@for (object of $any(submissionSections | async); track object) {
|
@for (object of $any(submissionSections | async); track object) {
|
||||||
<ds-submission-section-container [collectionId]="collectionId"
|
<ds-submission-section-container [collectionId]="collectionId"
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
NO_ERRORS_SCHEMA,
|
|
||||||
SimpleChange,
|
SimpleChange,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
@@ -10,6 +9,7 @@ import {
|
|||||||
TestBed,
|
TestBed,
|
||||||
waitForAsync,
|
waitForAsync,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import {
|
import {
|
||||||
cold,
|
cold,
|
||||||
getTestScheduler,
|
getTestScheduler,
|
||||||
@@ -31,12 +31,10 @@ import {
|
|||||||
mockSubmissionSelfUrl,
|
mockSubmissionSelfUrl,
|
||||||
mockSubmissionState,
|
mockSubmissionState,
|
||||||
} from '../../shared/mocks/submission.mock';
|
} from '../../shared/mocks/submission.mock';
|
||||||
import { getMockThemeService } from '../../shared/mocks/theme-service.mock';
|
|
||||||
import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
||||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||||
import { SubmissionServiceStub } from '../../shared/testing/submission-service.stub';
|
import { SubmissionServiceStub } from '../../shared/testing/submission-service.stub';
|
||||||
import { createTestComponent } from '../../shared/testing/utils.test';
|
import { createTestComponent } from '../../shared/testing/utils.test';
|
||||||
import { ThemeService } from '../../shared/theme-support/theme.service';
|
|
||||||
import { SubmissionSectionContainerComponent } from '../sections/container/section-container.component';
|
import { SubmissionSectionContainerComponent } from '../sections/container/section-container.component';
|
||||||
import { SectionsService } from '../sections/sections.service';
|
import { SectionsService } from '../sections/sections.service';
|
||||||
import { VisibilityType } from '../sections/visibility-type';
|
import { VisibilityType } from '../sections/visibility-type';
|
||||||
@@ -47,7 +45,7 @@ import { SubmissionFormSectionAddComponent } from './section-add/submission-form
|
|||||||
import { SubmissionFormComponent } from './submission-form.component';
|
import { SubmissionFormComponent } from './submission-form.component';
|
||||||
import { ThemedSubmissionUploadFilesComponent } from './submission-upload-files/themed-submission-upload-files.component';
|
import { ThemedSubmissionUploadFilesComponent } from './submission-upload-files/themed-submission-upload-files.component';
|
||||||
|
|
||||||
describe('SubmissionFormComponent Component', () => {
|
describe('SubmissionFormComponent', () => {
|
||||||
|
|
||||||
let comp: SubmissionFormComponent;
|
let comp: SubmissionFormComponent;
|
||||||
let compAsAny: any;
|
let compAsAny: any;
|
||||||
@@ -67,18 +65,19 @@ describe('SubmissionFormComponent Component', () => {
|
|||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [SubmissionFormComponent, TestComponent,
|
imports: [
|
||||||
|
SubmissionFormComponent,
|
||||||
|
TestComponent,
|
||||||
|
TranslateModule.forRoot(),
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AuthService, useClass: AuthServiceStub },
|
{ provide: AuthService, useClass: AuthServiceStub },
|
||||||
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
{ provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') },
|
||||||
{ provide: SubmissionService, useValue: submissionServiceStub },
|
{ provide: SubmissionService, useValue: submissionServiceStub },
|
||||||
{ provide: SectionsService, useValue: { isSectionTypeAvailable: () => observableOf(true) } },
|
{ provide: SectionsService, useValue: { isSectionTypeAvailable: () => observableOf(true) } },
|
||||||
{ provide: ThemeService, useValue: getMockThemeService() },
|
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
SubmissionFormComponent,
|
SubmissionFormComponent,
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
|
||||||
})
|
})
|
||||||
.overrideComponent(SubmissionFormComponent, {
|
.overrideComponent(SubmissionFormComponent, {
|
||||||
remove: {
|
remove: {
|
||||||
|
@@ -7,6 +7,7 @@ import {
|
|||||||
OnDestroy,
|
OnDestroy,
|
||||||
SimpleChanges,
|
SimpleChanges,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
import { TranslatePipe } from '@ngx-translate/core';
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
import {
|
import {
|
||||||
Observable,
|
Observable,
|
||||||
@@ -64,6 +65,7 @@ import { ThemedSubmissionUploadFilesComponent } from './submission-upload-files/
|
|||||||
ThemedSubmissionUploadFilesComponent,
|
ThemedSubmissionUploadFilesComponent,
|
||||||
SubmissionFormCollectionComponent,
|
SubmissionFormCollectionComponent,
|
||||||
SubmissionFormSectionAddComponent,
|
SubmissionFormSectionAddComponent,
|
||||||
|
TranslatePipe,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user