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 working2 #2

Merged
merged 1 commit into from
Nov 17, 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
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
4 changes: 2 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,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 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
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: 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
105 changes: 7 additions & 98 deletions src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,93 +1,6 @@
<footer class="text-lg-start">
<div *ngIf="showTopFooter" class="top-footer">
<!-- Grid container -->
<div class=" container p-4">
<!--Grid row-->
<div class="row">

<!--Grid column-->
<div class="col-lg-4 col-md-6 mb-4 mb-lg-0">
<h5 class="text-uppercase">Footer Content</h5>

<ul class="list-unstyled mb-0">
<li>
<a routerLink="./" class="">Lorem ipsum</a>
</li>
<li>
<a routerLink="./" class="">Ut facilisis</a>
</li>
<li>
<a routerLink="./" class="">Aenean sit</a>
</li>
</ul>
</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-lg-4 col-md-6 mb-4 mb-lg-0">
<h5 class="text-uppercase">Footer Content</h5>

<ul class="list-unstyled mb-0">
<li>
<a routerLink="./" class="">Suspendisse potenti</a>
</li>
</ul>
</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-lg-4 col-md-12 mb-4 mb-md-0">
<h5 class="text-uppercase">Footer Content</h5>

<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iste atque ea quis
molestias. Fugiat pariatur maxime quis culpa corporis vitae repudiandae aliquam
voluptatem veniam, est atque cumque eum delectus sint!
</p>
</div>
<!--Grid column-->
</div>
<!--Grid row-->
</div>
</div>
<!-- Grid container -->

<!-- Copyright -->
<div class="bottom-footer p-1 d-flex justify-content-center align-items-center text-white">
<div class="content-container">
<p class="m-0">
<a class="text-white"
href="http://www.dspace.org/">{{ 'footer.link.dspace' | translate}}</a>
{{ 'footer.copyright' | translate:{year: dateObj | date:'y'} }}
<a class="text-white"
href="https://www.lyrasis.org/">{{ 'footer.link.lyrasis' | translate}}</a>
</p>
<ul class="footer-info list-unstyled small d-flex justify-content-center mb-0">
<li>
<a class="text-white" href="javascript:void(0);"
(click)="showCookieSettings()">{{ 'footer.link.cookies' | translate}}</a>
</li>
<li *ngIf="showPrivacyPolicy">
<a class="text-white"
routerLink="info/privacy">{{ 'footer.link.privacy-policy' | translate}}</a>
</li>
<li *ngIf="showEndUserAgreement">
<a class="text-white"
routerLink="info/end-user-agreement">{{ 'footer.link.end-user-agreement' | translate}}</a>
</li>
<li *ngIf="showSendFeedback$ | async">
<a class="text-white"
routerLink="info/feedback">{{ 'footer.link.feedback' | translate}}</a>
</li>
</ul>
</div>
</div>




<div class="text-white">
<div class="text-white">
<footer class="page-footer">
<div class="viewport-container">
<div class="page-footer__content">
<section>
<h2>University of Michigan Library</h2>
<ul>
Expand All @@ -110,7 +23,7 @@ <h2>About Deep Blue Documents</h2>
<a href="https://www.lib.umich.edu/collections/deep-blue-repositories">Deep Blue Repositories</a>
</li>
<li>
<a href="info/feedback">Contact Us</a>
<a href="https://teamdynamix.umich.edu/TDClient/88/Portal/Requests/TicketRequests/NewForm?ID=7Az64AR5TqI_&RequestorType=Service">Contact Us</a>
</li>
<li>
<a href="assets/static/about/deepbluefaq.html">Frequently Asked Questions</a>
Expand All @@ -127,14 +40,10 @@ <h2>Privacy and copyright</h2>
</section>
</div>
</div>
<div class="text-white">
<div class="text-white">
<p>©XXXXX Regents of the University of Michigan. Built with <a href="http://www.dspace.org/">DSpace</a></p>
<div class="page-footer__disclaimer ">
<div class="viewport-container">
<p>©2023 Regents of the University of Michigan. Built with <a href="http://www.dspace.org/">DSpace</a></p>
</div>
</div>




<!-- Copyright -->
</footer>
Loading
Loading