Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue working #3

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/docker-compose-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ services:
environment:
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto
platform: linux/amd64
networks:
dspacenet:
ports:
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/admin-sidebar/admin-sidebar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="sidebar-section">
<div href="javascript:void(0);" class="nav-item d-flex flex-row flex-nowrap py-0">
<div class="shortcut-icon navbar-brand logo-wrapper">
<img class="admin-logo" src="assets/images/dspace-logo-mini.svg"
<img class="admin-logo" src="assets/dspace/images/favicons/favicon.ico"
[alt]="('menu.header.image.logo') | translate">
</div>
<div class="sidebar-collapsible navbar-brand">
Expand Down
10 changes: 8 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { EndUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-
import { SiteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard';
import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component';
import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component';
//import { StaticPageComponent } from './static-page/static-page.component';

import {
GroupAdministratorGuard
} from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard';
Expand All @@ -52,15 +54,15 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
canActivateChild: [ServerCheckGuard],
resolve: [MenuResolver],
children: [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: '', redirectTo: '/documents', pathMatch: 'full' },
{
path: 'reload/:rnd',
component: ThemedPageNotFoundComponent,
pathMatch: 'full',
canActivate: [ReloadGuard]
},
{
path: 'home',
path: 'documents',
loadChildren: () => import('./home-page/home-page.module')
.then((m) => m.HomePageModule),
data: { showBreadcrumbs: false },
Expand All @@ -72,6 +74,10 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
.then((m) => m.CommunityListPageModule),
canActivate: [EndUserAgreementCurrentUserGuard]
},


//{path:"static", component: StaticPageComponent},

{
path: 'id',
loadChildren: () => import('./lookup-by-id/lookup-by-id.module')
Expand Down
5 changes: 3 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APP_BASE_HREF, CommonModule, DOCUMENT } from '@angular/common';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
Expand Down Expand Up @@ -128,7 +128,8 @@ const EXPORTS = [
exports: [
...EXPORTS,
...DECLARATIONS,
]
],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class AppModule {

Expand Down
2 changes: 1 addition & 1 deletion src/app/breadcrumbs/breadcrumbs.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<nav *ngIf="(showBreadcrumbs$ | async)" aria-label="breadcrumb" class="nav-breadcrumb">
<ol class="container breadcrumb">
<ng-container
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/'}"></ng-container>
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/documents'}"></ng-container>
<ng-container *ngFor="let bc of breadcrumbs; let last = last;">
<ng-container *ngTemplateOutlet="!last ? breadcrumb : activeBreadcrumb; context: bc"></ng-container>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ <h2>{{'collection.edit.item-mapper.head' | translate}}</h2>
</div>

<div *ngIf="performedSearch">
{{'collection.edit.item-mapper.checkall-desc' | translate}}
<div class="checkbox">
<input name="checkall" type="checkbox" value="onclick=checkUncheckAll(this);" (click)="checkUncheckAll(this)">
</div>

<ds-item-select class="mt-2"
[key]="'map'"
[dsoRD$]="mappedItemsRD$"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,31 @@
});
}

/**
* This was a javascript function I brought over from 6.3
*/
checkUncheckAll (form) {

var defaultedElements = document.getElementsByTagName("input");

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 291 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote
var mapButton = document.getElementsByClassName("item-confirm");

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Strings must use singlequote

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 292 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Strings must use singlequote
var theElement;

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Trailing spaces not allowed

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Trailing spaces not allowed

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Trailing spaces not allowed

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Trailing spaces not allowed

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Trailing spaces not allowed

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 293 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Trailing spaces not allowed
var event = new Event('change');

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 294 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

for (var i=0; i != defaultedElements.length; i++){

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Expected '!==' and instead saw '!='

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Expected '!==' and instead saw '!='

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Expected '!==' and instead saw '!='

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Expected '!==' and instead saw '!='

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Expected '!==' and instead saw '!='

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unexpected var, use let or const instead

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Operator '=' must be spaced

Check failure on line 296 in src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Expected '!==' and instead saw '!='
if ( defaultedElements[i].name == 'checkall'){
theElement = defaultedElements[i];
}
}

for (var i=0; i != defaultedElements.length; i++){
if (defaultedElements[i].type == 'checkbox'){
defaultedElements[i].checked=theElement.checked;
defaultedElements[i].setAttribute("ng-reflect-model", theElement.checked);
(mapButton[0] as HTMLButtonElement).disabled= !theElement.checked;

defaultedElements[i].dispatchEvent(event);
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { EditComColPageComponent } from '../../shared/comcol/comcol-forms/edit-c
import { Collection } from '../../core/shared/collection.model';
import { getCollectionPageRoute } from '../collection-page-routing-paths';

import { HttpClient} from '@angular/common/http';

/**
* Component that represents the page where a user can edit an existing Collection
*/
Expand All @@ -15,10 +17,11 @@ export class EditCollectionPageComponent extends EditComColPageComponent<Collect
type = 'collection';

public constructor(
protected http: HttpClient,
protected router: Router,
protected route: ActivatedRoute
) {
super(router, route);
super(http, router, route);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { ActivatedRoute, Router } from '@angular/router';
import { EditComColPageComponent } from '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component';
import { getCommunityPageRoute } from '../community-page-routing-paths';

import { HttpClient} from '@angular/common/http';

/**
* Component that represents the page where a user can edit an existing Community
*/
Expand All @@ -15,10 +17,11 @@ export class EditCommunityPageComponent extends EditComColPageComponent<Communit
type = 'community';

public constructor(
protected http: HttpClient,
protected router: Router,
protected route: ActivatedRoute
) {
super(router, route);
super(http, router, route);
}

/**
Expand Down
81 changes: 81 additions & 0 deletions src/app/core/breadcrumbs/dso-name.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DSpaceObject } from '../shared/dspace-object.model';
import { TranslateService } from '@ngx-translate/core';
import { Metadata } from '../shared/metadata.utils';


/**
* Returns a name for a {@link DSpaceObject} based
* on its render types.
Expand Down Expand Up @@ -83,6 +84,86 @@ export class DSONameService {
}
}

// UM Change
getIconForFile(dso: DSpaceObject | undefined): string {
if (dso) {
const types = dso.getRenderTypes();

const match = types
.filter((type) => typeof type === 'string')
.find((type: string) => Object.keys(this.factories).includes(type)) as string;

let name;
if (hasValue(match)) {
name = this.factories[match](dso);
}
if (isEmpty(name)) {
name = this.factories.Default(dso);
}

if ( name.endsWith(".pdf") )
{
return "<img alt='PDF file' src='/assets/dspace/images/doc_icons/pdf_icon-18x18.png' title='PDF file'/>";
}
else if ( (name.endsWith(".txt") ) || (name.endsWith(".asc") ) )
{
return "<img alt='TXT file' src='/assets/dspace/images/doc_icons/text_icon-18x18.png' title='TXT file'/>";
}
else if ( (name.endsWith(".doc") ) || (name.endsWith(".docx") ) )
{
return "<img alt='MS Word file' src='/assets/dspace/images/doc_icons/word_icon-18x18.png' title='MS Word file'/>";
}
else if ( (name.endsWith(".pptx") ) || (name.endsWith(".ppt") ) )
{
return "<img alt='MS Powerpoint file' src='/assets/dspace/images/doc_icons/powerpoint_icon-18x18.png' title='MS Powerpoint file'/>";
}
else if ( (name.endsWith(".xlsx") ) || (name.endsWith(".xls") ) )
{
return "<img alt='MS Excel file' src='/assets/dspace/images/doc_icons/excel_icon-18x18.png' title='MS Excel file'/>";
}
else if ( (name.endsWith(".jpeg") ) || (name.endsWith(".jpg") ) )
{
return "<img alt='JPEG file' src='/assets/dspace/images/doc_icons/jpeg_icon-18x18.png' title='JPEG file'/>";
}
else if ( (name.endsWith(".tiff") ) || (name.endsWith(".tif") ) )
{
return "<img alt='TIFF file' src='/assets/dspace/images/doc_icons/tiff_icon-18x18.png' title='TIFF file'/>";
}
else if ( (name.endsWith(".gif") ) || (name.endsWith(".png") ) || (name.endsWith(".jp2") ) || (name.endsWith(".pcd") ) )
{
return "<img alt='Image file' src='/assets/dspace/images/doc_icons/generic_image_icon-18x18.png' title='Image ile'/>";
}
else if ( (name.endsWith(".mov") ) || (name.endsWith(".qt") ) )
{
return "<img alt='Video file' src='/assets/dspace/images/doc_icons/video_icon18x18.png' title='Video file'/>";
}
else if ( name.endsWith(".zip") )
{
return "<img alt='Zip file' src='/assets/dspace/images/doc_icons/zip_icon-18x18.png' title='Zipfile'/>";
}
else if ( (name.endsWith(".htm") ) || (name.endsWith(".html") ) )
{
return "<img alt='HTML file' src='/assets/dspace/images/doc_icons/html_icon-18x18.PNG' title='HTML file'/>";;
}
else if ( (name.endsWith(".wav") ) || (name.endsWith(".aiff") ) ||
(name.endsWith(".aif") ) || (name.endsWith(".au") ) ||
(name.endsWith(".aifc") ) || (name.endsWith(".snd") ) ||
(name.endsWith(".ra") ) || (name.endsWith(".ram") ) ||
(name.endsWith(".mpa") ) || (name.endsWith(".abs") ) ||
(name.endsWith(".mpga") ) || (name.endsWith(".mp3") ) ||
(name.endsWith(".ma4") ) )
{
return "<img alt='Audio file' src='/assets/dspace/images/doc_icons/audio_icon18x18.png' title='Audio file'/>";
}
else
{
return "<img alt='Unidentified file format' src='/assets/dspace/images/doc_icons/generic_bitstream18x18.png' title='Unidentified file format'/>";
}
} else {
return '';
}
}

/**
* Gets the Hit highlight
*
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import { ItemType } from './shared/item-relationships/item-type.model';
import { RelationshipType } from './shared/item-relationships/relationship-type.model';
import { Relationship } from './shared/item-relationships/relationship.model';
import { Item } from './shared/item.model';

import { License } from './shared/license.model';
import { ResourcePolicy } from './resource-policy/models/resource-policy.model';
import { SearchConfigurationService } from './shared/search/search-configuration.service';
Expand Down Expand Up @@ -318,6 +319,7 @@ export const models =
Bitstream,
BitstreamFormat,
Item,
ItemRequest,
Site,
Collection,
Community,
Expand Down
6 changes: 4 additions & 2 deletions src/app/core/data/item-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ export abstract class BaseItemDataService extends IdentifiableDataService<Item>
* @param item
* @param withdrawn
*/
public setWithDrawn(item: Item, withdrawn: boolean): Observable<RemoteData<Item>> {

//////
public setWithDrawn(item: Item, withdrawn: boolean, reason: string): Observable<RemoteData<Item>> {

const patchOperation = {
op: 'replace', path: '/withdrawn', value: withdrawn
op: 'replace', path: '/withdrawn', value: withdrawn, reason: reason
} as Operation;
this.requestService.removeByHrefSubstring('/discover');

Expand Down
24 changes: 24 additions & 0 deletions src/app/core/metadata/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ export class MetadataService {
this.setCitationDissertationNameTag();
}

this.setRightsTag();

// this.setCitationJournalTitleTag();
// this.setCitationVolumeTag();
// this.setCitationIssueTag();
Expand Down Expand Up @@ -210,6 +212,28 @@ export class MetadataService {
this.addMetaTag('citation_title', value);
}

private setRightsTag(): void {
const value = this.getMetaTagValue('dc.rights.robot');

let rights: string
if ( value === undefined )
{
rights = "index,nofollow";
}
else
{
if ( value === "IndexNoFollow" )
{
rights = "index,nofollow";
}
if ( value === "NoIndexNoFollow" )
{
rights = "noindex,nofollow";
}
}
this.addMetaTag('rights', rights);
}

/**
* Add <meta name="citation_author" ... > to the <head>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/reload/reload.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ReloadGuard implements CanActivate {
: route.queryParams.redirect;
return this.router.parseUrl(url);
} else {
return this.router.createUrlTree(['home']);
return this.router.createUrlTree(['documents']);
}
}
}
8 changes: 8 additions & 0 deletions src/app/core/shared/bitstream.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ export class Bitstream extends DSpaceObject implements ChildHALResource {
@autoserialize
sizeBytes: number;

// UM Change - For hidden file
@autoserialize
formatId: number;

@autoserialize
sequenceId: number;
// End UM Change

/**
* The description of this Bitstream
*/
Expand Down
13 changes: 13 additions & 0 deletions src/app/core/shared/item.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ export class Item extends DSpaceObject implements ChildHALResource, HandleObject
@link(BITSTREAM, false, 'thumbnail')
thumbnail?: Observable<RemoteData<Bitstream>>;

get withdrawReason(): string {
let reason : string;
reason = this.firstMetadataValue('dc.description.withdrawalreason');
if ( reason )
{
return reason;
}
else
{
return '';
}
}

/**
* The access status for this Item
* Will be undefined unless the access status {@link HALLink} has been resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { TruncatableService } from '../../../../../shared/truncatable/truncatabl
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface';

import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service';

@listableObjectComponent('PersonSearchResult', ViewMode.ListElement)
@Component({
selector: 'ds-person-search-result-list-element',
Expand All @@ -24,9 +26,10 @@ export class PersonSearchResultListElementComponent extends ItemSearchResultList
public constructor(
protected truncatableService: TruncatableService,
public dsoNameService: DSONameService,
public bitstreamDataService: BitstreamDataService,
@Inject(APP_CONFIG) protected appConfig: AppConfig
) {
super(truncatableService, dsoNameService, appConfig);
super(truncatableService, dsoNameService, bitstreamDataService, appConfig);
}

/**
Expand Down
Loading
Loading