forked from hazza/dspace-angular
62741: Journal-types grid elements & grid thumbnail fix/improvement
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<ds-truncatable [id]="dso.id">
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<ds-item-type-badge [object]="object"></ds-item-type-badge>
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="3" type="h4">
|
||||
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
|
||||
</ds-truncatable-part>
|
||||
<p class="item-date card-text text-muted">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="1">
|
||||
<span [innerHTML]="firstMetadataValue('journalissue.issuedate')"></span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<p class="item-journal-title card-text">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="1">
|
||||
<span [innerHTML]="firstMetadataValue('journal.title')"></span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<div class="text-center">
|
||||
<a [routerLink]="['/items/' + dso.id]"
|
||||
class="lead btn btn-primary viewButton">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ds-truncatable>
|
@@ -0,0 +1,14 @@
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { Component } from '@angular/core';
|
||||
import { focusShadow } from '../../../../shared/animations/focus';
|
||||
import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
|
||||
|
||||
@rendersItemType('JournalIssue', ItemViewMode.Card)
|
||||
@Component({
|
||||
selector: 'ds-journal-issue-grid-element',
|
||||
styleUrls: ['./journal-issue-grid-element.component.scss'],
|
||||
templateUrl: './journal-issue-grid-element.component.html',
|
||||
animations: [focusShadow]
|
||||
})
|
||||
export class JournalIssueGridElementComponent extends TypedItemSearchResultGridElementComponent {
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
<ds-truncatable [id]="dso.id">
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<ds-item-type-badge [object]="object"></ds-item-type-badge>
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="3" type="h4">
|
||||
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
|
||||
</ds-truncatable-part>
|
||||
<p class="item-date card-text text-muted">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="1">
|
||||
<span [innerHTML]="firstMetadataValue('journalvolume.issuedate')"></span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<p class="item-description card-text">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="2">
|
||||
<span [innerHTML]="firstMetadataValue('journalvolume.identifier.description')"></span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<div class="text-center">
|
||||
<a [routerLink]="['/items/' + dso.id]"
|
||||
class="lead btn btn-primary viewButton">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ds-truncatable>
|
@@ -0,0 +1,14 @@
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { Component } from '@angular/core';
|
||||
import { focusShadow } from '../../../../shared/animations/focus';
|
||||
import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
|
||||
|
||||
@rendersItemType('JournalVolume', ItemViewMode.Card)
|
||||
@Component({
|
||||
selector: 'ds-journal-volume-grid-element',
|
||||
styleUrls: ['./journal-volume-grid-element.component.scss'],
|
||||
templateUrl: './journal-volume-grid-element.component.html',
|
||||
animations: [focusShadow]
|
||||
})
|
||||
export class JournalVolumeGridElementComponent extends TypedItemSearchResultGridElementComponent {
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<ds-truncatable [id]="dso.id">
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-body">
|
||||
<ds-item-type-badge [object]="object"></ds-item-type-badge>
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="3" type="h4">
|
||||
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
|
||||
</ds-truncatable-part>
|
||||
<p *ngIf="dso.hasMetadata('journal.contributor.editor')"
|
||||
class="item-publisher card-text text-muted">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="1">
|
||||
<span *ngIf="dso.hasMetadata('journal.contributor.editor')" class="item-date">{{dso.firstMetadataValue('journal.contributor.editor')}}</span>
|
||||
<span>, </span>
|
||||
<span *ngIf="dso.hasMetadata('journal.publisher')" class="item-date">{{dso.firstMetadataValue('journal.publisher')}}</span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<p class="item-description card-text">
|
||||
<ds-truncatable-part [fixedHeight]="true" [id]="dso.id" [minLines]="3">
|
||||
<span [innerHTML]="firstMetadataValue('journal.identifier.description')"></span>
|
||||
</ds-truncatable-part>
|
||||
</p>
|
||||
<div class="text-center">
|
||||
<a [routerLink]="['/items/' + dso.id]"
|
||||
class="lead btn btn-primary viewButton">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ds-truncatable>
|
@@ -0,0 +1,14 @@
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { Component } from '@angular/core';
|
||||
import { focusShadow } from '../../../../shared/animations/focus';
|
||||
import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
|
||||
|
||||
@rendersItemType('Journal', ItemViewMode.Card)
|
||||
@Component({
|
||||
selector: 'ds-journal-grid-element',
|
||||
styleUrls: ['./journal-grid-element.component.scss'],
|
||||
templateUrl: './journal-grid-element.component.html',
|
||||
animations: [focusShadow]
|
||||
})
|
||||
export class JournalGridElementComponent extends TypedItemSearchResultGridElementComponent {
|
||||
}
|
@@ -9,6 +9,9 @@ import { JournalListElementComponent } from './item-list-elements/journal/journa
|
||||
import { JournalIssueListElementComponent } from './item-list-elements/journal-issue/journal-issue-list-element.component';
|
||||
import { JournalVolumeListElementComponent } from './item-list-elements/journal-volume/journal-volume-list-element.component';
|
||||
import { TooltipModule } from 'ngx-bootstrap';
|
||||
import { JournalIssueGridElementComponent } from './item-grid-elements/journal-issue/journal-issue-grid-element.component';
|
||||
import { JournalVolumeGridElementComponent } from './item-grid-elements/journal-volume/journal-volume-grid-element.component';
|
||||
import { JournalGridElementComponent } from './item-grid-elements/journal/journal-grid-element.component';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
JournalComponent,
|
||||
@@ -16,7 +19,10 @@ const ENTRY_COMPONENTS = [
|
||||
JournalVolumeComponent,
|
||||
JournalListElementComponent,
|
||||
JournalIssueListElementComponent,
|
||||
JournalVolumeListElementComponent
|
||||
JournalVolumeListElementComponent,
|
||||
JournalIssueGridElementComponent,
|
||||
JournalVolumeGridElementComponent,
|
||||
JournalGridElementComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="dso.getThumbnail()" [defaultImage]="'assets/images/orgunit-placeholder.svg'">
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async" [defaultImage]="'assets/images/orgunit-placeholder.svg'">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="dso.getThumbnail()" [defaultImage]="'assets/images/person-placeholder.svg'">
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async" [defaultImage]="'assets/images/person-placeholder.svg'">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="dso.getThumbnail()" [defaultImage]="'assets/images/project-placeholder.svg'">
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async" [defaultImage]="'assets/images/project-placeholder.svg'">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="card" [@focusShadow]="(isCollapsed() | async)?'blur':'focus'">
|
||||
<a [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
|
||||
<div>
|
||||
<ds-grid-thumbnail [thumbnail]="dso.getThumbnail()">
|
||||
<ds-grid-thumbnail [thumbnail]="this.item.getThumbnail() | async">
|
||||
</ds-grid-thumbnail>
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -7,6 +7,11 @@ ds-wrapper-grid-element ::ng-deep {
|
||||
div.thumbnail > img {
|
||||
height: $card-thumbnail-height;
|
||||
width: 100%;
|
||||
display: block;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: 50% 15%;
|
||||
}
|
||||
div.card {
|
||||
margin-top: $ds-wrapper-grid-spacing;
|
||||
|
Reference in New Issue
Block a user