mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
59695: Browse-by-date style finetuning + navigation + parsing service fix for empty pages
This commit is contained in:
@@ -282,6 +282,7 @@
|
||||
"browse": {
|
||||
"title": "Browsing {{ collection }} by {{ field }} {{ value }}",
|
||||
"startsWith": {
|
||||
"jump": "Jump to a point in the index:",
|
||||
"choose_year": "(Choose year)",
|
||||
"type_year": "Or type in a year:",
|
||||
"submit": "Go"
|
||||
@@ -296,6 +297,7 @@
|
||||
"head": "Browse",
|
||||
"by": {
|
||||
"title": "By Title",
|
||||
"dateissued": "By Issue Date",
|
||||
"author": "By Author",
|
||||
"subject": "By Subject"
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { GLOBAL_CONFIG } from '../../../config';
|
||||
import { GlobalConfig } from '../../../config/global-config.interface';
|
||||
import { isNotEmpty } from '../../shared/empty.util';
|
||||
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import {
|
||||
ErrorResponse,
|
||||
@@ -45,6 +45,8 @@ export class BrowseItemsResponseParsingService extends BaseResponseParsingServic
|
||||
const serializer = new DSpaceRESTv2Serializer(DSpaceObject);
|
||||
const items = serializer.deserializeArray(data.payload._embedded[Object.keys(data.payload._embedded)[0]]);
|
||||
return new GenericSuccessResponse(items, data.statusCode, this.processPageInfo(data.payload));
|
||||
} else if (hasValue(data.payload) && hasValue(data.payload.page) && data.payload.page.totalElements === 0) {
|
||||
return new GenericSuccessResponse([], data.statusCode, this.processPageInfo(data.payload));
|
||||
} else {
|
||||
return new ErrorResponse(
|
||||
Object.assign(
|
||||
|
@@ -73,6 +73,17 @@ export class NavbarComponent extends MenuComponent implements OnInit {
|
||||
link: '/browse/title'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
{
|
||||
id: 'browse_global_global_by_issue_date',
|
||||
parentID: 'browse_global',
|
||||
active: false,
|
||||
visible: true,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.browse_global_by_issue_date',
|
||||
link: '/browse/dateissued'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
{
|
||||
id: 'browse_global_by_author',
|
||||
parentID: 'browse_global',
|
||||
|
@@ -1,7 +1,10 @@
|
||||
<form class="w-100" [formGroup]="formData" (ngSubmit)="submitForm(formData.value)">
|
||||
<div class="container">
|
||||
<div class="row mb-2">
|
||||
<select class="form-control col-xs-5 col-sm-3" (change)="setStartsWith($event)">
|
||||
<div class="row">
|
||||
<span class="col-12 font-weight-bold mb-1">
|
||||
{{'browse.startsWith.jump' | translate}}
|
||||
</span>
|
||||
<div class="col-5 col-md-3">
|
||||
<select class="form-control" (change)="setStartsWith($event)">
|
||||
<option [value]="-1" [selected]="!startsWith">
|
||||
{{'browse.startsWith.choose_year' | translate}}
|
||||
</option>
|
||||
@@ -11,12 +14,12 @@
|
||||
{{option}}
|
||||
</option>
|
||||
</select>
|
||||
<div class="form-group input-group col-xs-7 col-sm-6">
|
||||
<input class="form-control" placeholder="{{'browse.startsWith.type_year' | translate}}" type="number" name="startsWith" formControlName="startsWith" [value]="+startsWith" />
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary" type="submit">{{'browse.startsWith.submit' | translate}}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group col-7 col-md-6">
|
||||
<input class="form-control" placeholder="{{'browse.startsWith.type_year' | translate}}" type="number" name="startsWith" formControlName="startsWith" [value]="+startsWith" />
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary" type="submit">{{'browse.startsWith.submit' | translate}}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<h3>{{'browse.comcol.head' | translate}}</h3>
|
||||
<ul>
|
||||
<li><a [routerLink]="['/browse/title']" [queryParams]="{scope: id}">{{'browse.comcol.by.title' | translate}}</a></li>
|
||||
<li><a [routerLink]="['/browse/dateissued']" [queryParams]="{scope: id}">{{'browse.comcol.by.dateissued' | translate}}</a></li>
|
||||
<li><a [routerLink]="['/browse/author']" [queryParams]="{scope: id}">{{'browse.comcol.by.author' | translate}}</a></li>
|
||||
<li><a [routerLink]="['/browse/subject']" [queryParams]="{scope: id}">{{'browse.comcol.by.subject' | translate}}</a></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user