forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11008 backup primera versión vista del ítem
- Loading branch information
Showing
38 changed files
with
1,481 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
<div class="simple-view-element" [class.d-none]="hideIfNoTextContent && content.textContent.trim().length === 0"> | ||
<!-- <div class="simple-view-element" [class.d-none]="hideIfNoTextContent && content.textContent.trim().length === 0"> | ||
<h2 class="simple-view-element-header" *ngIf="label">{{ label }}</h2> | ||
<div #content class="simple-view-element-body"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> --> | ||
|
||
<div class="simple-view-element" [ngClass]="{'not-inline-label': !inlineLabel }" [class.d-none]="hideIfNoTextContent && content.textContent.trim().length === 0"> | ||
<h6 class="simple-view-element-header" *ngIf="label">{{ label }}</h6> | ||
<div #content> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> |
25 changes: 20 additions & 5 deletions
25
src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
:host { | ||
.simple-view-element { | ||
margin-bottom: 15px; | ||
.simple-view-element { | ||
h6 { | ||
display: inline; | ||
margin-right: 0.5em; | ||
} | ||
.simple-view-element-header { | ||
font-size: 1.25rem; | ||
div { | ||
display: inline; | ||
} | ||
} | ||
|
||
.simple-view-element-header { | ||
font-weight: bold; | ||
} | ||
|
||
.not-inline-label { | ||
h6 { | ||
display: block; | ||
margin-right: 0; | ||
} | ||
div { | ||
display: block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...m-page/simple/field-components/badge-metadata-values/badge-metadata-values.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<ds-metadata-field-wrapper [label]="label | translate" [inlineLabel]="false"> | ||
<a href="{{ badgeUrl }}" target="_blank" *ngIf="badgeUrl else badge"> | ||
<ng-container *ngTemplateOutlet="badge"></ng-container> | ||
</a> | ||
</ds-metadata-field-wrapper> | ||
|
||
<ng-template #badge> | ||
<div class="badge-group" [ngClass]="{'group-inline-block': badgeLabel}" *ngFor="let mdValue of mdValues"> | ||
<span class="badge badge-label" [ngClass]="badgeLabelType" *ngIf="badgeLabel"> | ||
{{badgeLabel}} | ||
</span> | ||
<span class="badge {{badgeType}}" [ngClass]="{'badge-content': badgeLabel}"> | ||
{{mdValue.value}} | ||
<ng-container *ngIf="copyToClipboardButton"> | ||
<span class="d-none" #elementContentToCopy>{{mdValue.value}}</span> | ||
<i id="copyButton-{{mdValue.value}}" class="copyButton fa fa-copy" aria-hidden="true" (click)="copyToClipboard(elementContentToCopy, 'copyButton-' + mdValue.value )"></i> | ||
</ng-container> | ||
</span> | ||
</div> | ||
</ng-template> | ||
|
41 changes: 41 additions & 0 deletions
41
...m-page/simple/field-components/badge-metadata-values/badge-metadata-values.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.badge-label { | ||
border-top-right-radius: unset; | ||
border-bottom-right-radius: unset; | ||
display: inline-block; | ||
} | ||
|
||
.badge-content { | ||
border-top-left-radius: unset; | ||
border-bottom-left-radius: unset; | ||
display: inline-block; | ||
} | ||
|
||
.badge-group { | ||
display: inline-block; | ||
} | ||
|
||
.badge-group::after { | ||
white-space: pre; | ||
content: " "; | ||
} | ||
|
||
.badge-identifier { | ||
color: #505050; | ||
background-color: #c3c3c3; | ||
font-weight: inherit; | ||
} | ||
|
||
.group-inline-block { | ||
display: inline-block; | ||
} | ||
|
||
::ng-deep .badge-group span { | ||
padding: 0.4em; | ||
padding-right: 0.5em; | ||
} | ||
|
||
.copyButton { | ||
color: #fff; | ||
cursor: pointer; | ||
margin-left: 5px; | ||
} |
37 changes: 37 additions & 0 deletions
37
...tem-page/simple/field-components/badge-metadata-values/badge-metadata-values.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { MetadataValuesComponent } from 'src/app/item-page/field-components/metadata-values/metadata-values.component'; | ||
import { MetadataFieldWrapperComponent } from 'src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component'; | ||
|
||
@Component({ | ||
selector: 'ds-badge-metadata-values', | ||
standalone: true, | ||
templateUrl: './badge-metadata-values.component.html', | ||
styleUrls: ['./badge-metadata-values.component.scss'], | ||
imports: [CommonModule, MetadataFieldWrapperComponent, TranslateModule], | ||
}) | ||
export class BadgeMetadataValuesComponent extends MetadataValuesComponent { | ||
@Input() badgeType: string; | ||
@Input() badgeUrl: string; | ||
@Input() badgeLabel: string; | ||
@Input() badgeLabelType: string; | ||
@Input() copyToClipboardButton: boolean = false; | ||
|
||
copyToClipboard(el: HTMLDivElement, id: string) { | ||
if (navigator.clipboard) { | ||
navigator.clipboard.writeText(el.innerText).then(() => { | ||
document.getElementById(id).classList.remove('fa-copy'); | ||
document.getElementById(id).classList.add('fa-check'); | ||
setTimeout(() => { | ||
document.getElementById(id).classList.remove('fa-check'); | ||
document.getElementById(id).classList.add('fa-copy'); | ||
}, 1000); | ||
}, (error) => { | ||
console.log(error); | ||
}); | ||
} else { | ||
console.log('Browser do not support Clipboard API'); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...e/simple/field-components/date-metadata-values/sedici-date-metadata-values.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<ds-metadata-field-wrapper [inlineLabel]="inlineLabel" [label]="label | translate"> | ||
<span class="dont-break-out">{{ dateString }}</span> | ||
</ds-metadata-field-wrapper> |
36 changes: 36 additions & 0 deletions
36
...age/simple/field-components/date-metadata-values/sedici-date-metadata-values.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { MetadataValuesComponent } from 'src/app/item-page/field-components/metadata-values/metadata-values.component'; | ||
import { MetadataFieldWrapperComponent } from 'src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
/** | ||
* This component renders the configured 'values' into the ds-metadata-field-wrapper component. | ||
* It puts the given 'separator' between each two values. | ||
*/ | ||
@Component({ | ||
selector: 'ds-sedici-date-metadata-values', | ||
templateUrl: './sedici-date-metadata-values.component.html', | ||
standalone: true, | ||
imports: [ | ||
TranslateModule, | ||
MetadataValuesComponent, | ||
MetadataFieldWrapperComponent, | ||
], | ||
}) | ||
export class SediciDateMetadataValuesComponent extends MetadataValuesComponent implements OnInit { | ||
@Input() inlineLabel: boolean; | ||
dateString: string; | ||
|
||
ngOnInit(): void { | ||
const date = this.mdValues?.[0]?.value; | ||
if (date !== undefined) { | ||
if (date.length === 10) { | ||
this.dateString = new Date(date).toLocaleDateString('es-AR',{ year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' }); | ||
} else if (date.length === 7) { | ||
this.dateString = new Date(date).toLocaleDateString('es-AR',{ year: 'numeric', month: 'long', timeZone: 'UTC' }); | ||
} else { | ||
this.dateString = date; | ||
} | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
.../field-components/language-metadata-values/sedici-language-metadata-values.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<ds-metadata-field-wrapper [inlineLabel]="inlineLabel" [label]="label | translate"> | ||
<span class="dont-break-out">{{ languageString }}</span> | ||
</ds-metadata-field-wrapper> |
34 changes: 34 additions & 0 deletions
34
...le/field-components/language-metadata-values/sedici-language-metadata-values.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { MetadataValuesComponent } from 'src/app/item-page/field-components/metadata-values/metadata-values.component'; | ||
import { MetadataFieldWrapperComponent } from 'src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
/** | ||
* This component renders the configured 'values' into the ds-metadata-field-wrapper component. | ||
* It puts the given 'separator' between each two values. | ||
*/ | ||
@Component({ | ||
selector: 'ds-sedici-language-metadata-values', | ||
templateUrl: './sedici-language-metadata-values.component.html', | ||
standalone: true, | ||
imports: [ | ||
TranslateModule, | ||
MetadataValuesComponent, | ||
MetadataFieldWrapperComponent, | ||
], | ||
}) | ||
export class SediciLanguageMetadataValuesComponent extends MetadataValuesComponent implements OnInit { | ||
@Input() inlineLabel: boolean; | ||
languageString: string; | ||
|
||
ngOnInit(): void { | ||
const language = this.mdValues?.[0]?.value; | ||
if (language === 'es') { | ||
this.languageString = 'Español'; | ||
} else if (language === 'en') { | ||
this.languageString = 'Inlgés'; | ||
} else if (language === 'pt') { | ||
this.languageString = 'Portugués'; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/themes/custom/app/item-page/simple/item-types/untyped-item/apa-citation.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="apa-citation-container" [class.expanded]="isExpanded"> | ||
<div class="toggle-button-container" *ngIf="showToggleButton"> | ||
<i class="toggleButton fa" [ngClass]="{'fa-chevron-down': !isExpanded, 'fa-chevron-up': isExpanded}" (click)="toggleExpand()"></i> | ||
</div> | ||
<div class="apa-citation" #elementContentToCopy> | ||
{{ citation }} | ||
</div> | ||
</div> | ||
<div class="copy-button-container"> | ||
<span class="copy-text">Copiar al portapapeles</span> | ||
<i id="copyButton" class="copyButton fa fa-copy" aria-hidden="true" (click)="copyToClipboard(elementContentToCopy, 'copyButton')"></i> | ||
</div> |
Oops, something went wrong.