mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Fix minor accessibility issue in Search results grid view. No accessible test found for link. Moved text to i18n as well.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<a *ngIf="linkType != linkTypes.None"
|
<a *ngIf="linkType != linkTypes.None"
|
||||||
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
[target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
|
||||||
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top">
|
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
|
||||||
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
</a>
|
</a>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<h4 class="card-title">{{object.name}}</h4>
|
<h4 class="card-title">{{object.name}}</h4>
|
||||||
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
|
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
|
||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">View</a>
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
let collectionGridElementComponent: CollectionGridElementComponent;
|
let collectionGridElementComponent: CollectionGridElementComponent;
|
||||||
let fixture: ComponentFixture<CollectionGridElementComponent>;
|
let fixture: ComponentFixture<CollectionGridElementComponent>;
|
||||||
@@ -37,6 +38,9 @@ const linkService = jasmine.createSpyObj('linkService', {
|
|||||||
describe('CollectionGridElementComponent', () => {
|
describe('CollectionGridElementComponent', () => {
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
imports: [
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
declarations: [CollectionGridElementComponent],
|
declarations: [CollectionGridElementComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) },
|
{ provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) },
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="card-img-top">
|
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
|
||||||
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
</a>
|
</a>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<h4 class="card-title">{{object.name}}</h4>
|
<h4 class="card-title">{{object.name}}</h4>
|
||||||
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
|
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
|
||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="lead btn btn-primary viewButton">View</a>
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', object.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Community } from '../../../core/shared/community.model';
|
import { Community } from '../../../core/shared/community.model';
|
||||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
let communityGridElementComponent: CommunityGridElementComponent;
|
let communityGridElementComponent: CommunityGridElementComponent;
|
||||||
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
||||||
@@ -37,6 +38,9 @@ const linkService = jasmine.createSpyObj('linkService', {
|
|||||||
describe('CommunityGridElementComponent', () => {
|
describe('CommunityGridElementComponent', () => {
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
imports: [
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
declarations: [CommunityGridElementComponent],
|
declarations: [CommunityGridElementComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) },
|
{ provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) },
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="card-img-top">
|
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
|
||||||
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
</a>
|
</a>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<h4 class="card-title">{{dso.name}}</h4>
|
<h4 class="card-title">{{dso.name}}</h4>
|
||||||
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
|
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
|
||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="lead btn btn-primary viewButton">View</a>
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', dso.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
|
@@ -20,6 +20,7 @@ import { TruncatePipe } from '../../../utils/truncate.pipe';
|
|||||||
import { CollectionSearchResultGridElementComponent } from './collection-search-result-grid-element.component';
|
import { CollectionSearchResultGridElementComponent } from './collection-search-result-grid-element.component';
|
||||||
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
||||||
import { LinkService } from '../../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../../core/cache/builders/link.service';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
let collectionSearchResultGridElementComponent: CollectionSearchResultGridElementComponent;
|
let collectionSearchResultGridElementComponent: CollectionSearchResultGridElementComponent;
|
||||||
let fixture: ComponentFixture<CollectionSearchResultGridElementComponent>;
|
let fixture: ComponentFixture<CollectionSearchResultGridElementComponent>;
|
||||||
@@ -60,6 +61,9 @@ const linkService = jasmine.createSpyObj('linkService', {
|
|||||||
describe('CollectionSearchResultGridElementComponent', () => {
|
describe('CollectionSearchResultGridElementComponent', () => {
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
imports: [
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
declarations: [CollectionSearchResultGridElementComponent, TruncatePipe],
|
declarations: [CollectionSearchResultGridElementComponent, TruncatePipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="card-img-top">
|
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
|
||||||
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="(dso.logo | async)?.payload" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
</a>
|
</a>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<h4 class="card-title">{{dso.name}}</h4>
|
<h4 class="card-title">{{dso.name}}</h4>
|
||||||
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
|
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
|
||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="lead btn btn-primary viewButton">View</a>
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/communities/', dso.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
|
@@ -20,6 +20,7 @@ import { TruncatePipe } from '../../../utils/truncate.pipe';
|
|||||||
import { CommunitySearchResultGridElementComponent } from './community-search-result-grid-element.component';
|
import { CommunitySearchResultGridElementComponent } from './community-search-result-grid-element.component';
|
||||||
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
|
||||||
import { LinkService } from '../../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../../core/cache/builders/link.service';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
let communitySearchResultGridElementComponent: CommunitySearchResultGridElementComponent;
|
let communitySearchResultGridElementComponent: CommunitySearchResultGridElementComponent;
|
||||||
let fixture: ComponentFixture<CommunitySearchResultGridElementComponent>;
|
let fixture: ComponentFixture<CommunitySearchResultGridElementComponent>;
|
||||||
@@ -60,6 +61,9 @@ const linkService = jasmine.createSpyObj('linkService', {
|
|||||||
describe('CommunitySearchResultGridElementComponent', () => {
|
describe('CommunitySearchResultGridElementComponent', () => {
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
imports: [
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
declarations: [CommunitySearchResultGridElementComponent, TruncatePipe],
|
declarations: [CommunitySearchResultGridElementComponent, TruncatePipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="card-img-top full-width">
|
class="card-img-top full-width" [attr.title]="'search.results.view-result' | translate">
|
||||||
<div>
|
<div>
|
||||||
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="false">
|
||||||
</ds-thumbnail>
|
</ds-thumbnail>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="[itemPageRoute]"
|
||||||
class="lead btn btn-primary viewButton">View</a>
|
class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -4,6 +4,7 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { Observable, of as observableOf } from 'rxjs';
|
import { Observable, of as observableOf } from 'rxjs';
|
||||||
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
||||||
import { ObjectCacheService } from '../../../../../core/cache/object-cache.service';
|
import { ObjectCacheService } from '../../../../../core/cache/object-cache.service';
|
||||||
@@ -99,7 +100,10 @@ export function getEntityGridElementTestComponent(component, searchResultWithMet
|
|||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopAnimationsModule],
|
imports: [
|
||||||
|
NoopAnimationsModule,
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
declarations: [component, TruncatePipe],
|
declarations: [component, TruncatePipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
||||||
|
@@ -3408,6 +3408,8 @@
|
|||||||
|
|
||||||
"search.results.empty": "Your search returned no results.",
|
"search.results.empty": "Your search returned no results.",
|
||||||
|
|
||||||
|
"search.results.view-result": "View",
|
||||||
|
|
||||||
|
|
||||||
"default.search.results.head": "Search Results",
|
"default.search.results.head": "Search Results",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user