Abstract visualization

111 views
Skip to first unread message

Agustín Alfieri

unread,
Feb 15, 2024, 6:56:26 AM2/15/24
to DSpace Technical Support
Hi, 

I'm using Dspace 7.6 and I have to minor problems with the way the abstract of the items is displayed. 
First, I would like there to be a separation between different abstracts. For example, when having an English and a Spanish abstract, a line break between them would really improve readability.
Also, In some of the items a bunch of line breaks appear without reason within the abstract (I tested uploading items myself just to be sure and it kept happening). I don't know why this happens is to edit manually the item and remove the line breaks.
Does anyone have any insight on this?

Agustín.
Abstract.png

Michael Plate

unread,
Feb 15, 2024, 7:30:58 AM2/15/24
to dspac...@googlegroups.com

Hi Agustín,

Am 15.02.24 um 12:56 schrieb 'Agustín Alfieri' via DSpace Technical Support:
Hi, 

I'm using Dspace 7.6 and I have to minor problems with the way the abstract of the items is displayed. 
First, I would like there to be a separation between different abstracts. For example, when having an English and a Spanish abstract, a line break between them would really improve readability.

we have a tabbed version to save space:

https://kobra.uni-kassel.de/handle/123456789/2008112425214

(this is a DSpace 5, but it is really easy to do in DSpace 7)

I can give a code-snippet for DSpace 7, if you like, but you have to have some basic knowledge how to put it in then theme…


CU

Michael


Agustín Alfieri

unread,
Feb 19, 2024, 8:13:13 AM2/19/24
to DSpace Technical Support
Hi Michael, 

I like your solution. If the change for Dspace 7 is mainly made in Angular I should be able to set it up.

Thanks,
Agustín

Michael Plate

unread,
Mar 1, 2024, 11:57:59 AM3/1/24
to dspac...@googlegroups.com

Hi Agustín,

Am 19.02.24 um 14:13 schrieb 'Agustín Alfieri' via DSpace Technical Support:
Hi Michael, 

I like your solution. If the change for Dspace 7 is mainly made in Angular I should be able to set it up.

[…]

sorry for the long delay.

We also have done this into a component, so this here is a bit old and[…] limited.

This uses the ng-bootstrap NgbCollapse, so you need to include it in your themes' eager-theme.module.ts:



import { NgbCollapseModule} from '@ng-bootstrap/ng-bootstrap';

[…]

@NgModule({
 imports: [
[…]

 NgbCollapseModule
]


Look if it transpiles flawlessly.

In the theme

<theme-path>/app/item-page/simple/item-types/untyped-item/untyped-item.component.html

add the following code:

    <!-- UBKS dcterms.abstract -->
   <div>
       <ng-container *ngIf="object.metadata['dcterms.abstract']">
         <nav ngbNav #nav="ngbNav" class="nav-tabs">
           <ng-container *ngFor="let abstract of object.metadata['dcterms.abstract']| keyvalue">
             <ng-container ngbNavItem>
                     <a ngbNavLink><span> {{ abstract.value.language }}</span></a>
               <ng-template ngbNavContent>
                 <div style="height:30vh;overflow-y:scroll;padding:1em;">
                 {{ abstract.value.value }}
               </div>
               </ng-template>
             </ng-container>
           </ng-container>
         </nav>
       <div [ngbNavOutlet]="nav" ></div>
     </ng-container>
   </div>
    <!-- UBKS-->

Beware our metadate for abstracts is dcterms.abstract , so change it in the above code. For flags instead of text a bit more work is needed…

CU

Michael






Reply all
Reply to author
Forward
0 new messages