mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-07 23:32:15 +00:00
feat: update components
This commit is contained in:
@@ -17,11 +17,10 @@ module.exports = {
|
||||
...require('@openstapps/prettier-config'),
|
||||
overrides: [
|
||||
{
|
||||
files: 'src/**/*.html',
|
||||
files: ['*.html'],
|
||||
options: {
|
||||
parser: 'angular',
|
||||
},
|
||||
},
|
||||
],
|
||||
ignorePath: ['.prettierignore', '../../.gitignore'],
|
||||
};
|
||||
|
||||
@@ -184,7 +184,6 @@
|
||||
"typescript": "5.2.2",
|
||||
"webpack-bundle-analyzer": "4.7.0"
|
||||
},
|
||||
"prettier": "@openstapps/prettier-config",
|
||||
"cordova": {
|
||||
"plugins": {},
|
||||
"platforms": [
|
||||
|
||||
@@ -49,7 +49,10 @@ export class SharedAxisChoreographer<T> {
|
||||
*/
|
||||
currentValue: T;
|
||||
|
||||
constructor(initialValue: T, readonly pages?: T[]) {
|
||||
constructor(
|
||||
initialValue: T,
|
||||
readonly pages?: T[],
|
||||
) {
|
||||
this.currentValue = initialValue;
|
||||
this.expectedValue = initialValue;
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
-->
|
||||
|
||||
<div [ngSwitch]="content.type">
|
||||
<markdown [data]="'value' | translateSimple : content" *ngSwitchCase="'markdown'"></markdown>
|
||||
<markdown [data]="'value' | translateSimple: content" *ngSwitchCase="'markdown'"></markdown>
|
||||
<div *ngSwitchCase="'section'">
|
||||
<ion-card *ngIf="content.card; else noCard">
|
||||
<ion-card-header>
|
||||
<ion-card-title>{{ 'title' | translateSimple : content }}</ion-card-title>
|
||||
<ion-card-title>{{ 'title' | translateSimple: content }}</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<about-page-content [content]="content.content"></about-page-content>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ng-template #noCard>
|
||||
<h2>{{ 'title' | translateSimple : content }}</h2>
|
||||
<h2>{{ 'title' | translateSimple: content }}</h2>
|
||||
<about-page-content [content]="content.content"></about-page-content>
|
||||
</ng-template>
|
||||
</div>
|
||||
@@ -38,6 +38,6 @@
|
||||
</ion-grid>
|
||||
<ion-item *ngSwitchCase="'router link'" [routerLink]="content.link">
|
||||
<ion-icon *ngIf="content.icon" [name]="content.icon" slot="start"></ion-icon>
|
||||
<ion-label>{{ 'title' | translateSimple : content }}</ion-label>
|
||||
<ion-label>{{ 'title' | translateSimple: content }}</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,10 @@ export class AboutPageComponent implements OnInit {
|
||||
|
||||
version = packageJson.version;
|
||||
|
||||
constructor(private readonly route: ActivatedRoute, private readonly configProvider: ConfigProvider) {}
|
||||
constructor(
|
||||
private readonly route: ActivatedRoute,
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title *ngIf="content; else titleLoading">{{ 'title' | translateSimple : content }}</ion-title>
|
||||
<ion-title *ngIf="content; else titleLoading">{{ 'title' | translateSimple: content }}</ion-title>
|
||||
<ng-template #titleLoading>
|
||||
<ion-title><ion-skeleton-text animated="true"></ion-skeleton-text></ion-title>
|
||||
</ng-template>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
class="ion-text-wrap"
|
||||
*ngIf="assessments[key].courseOfStudy | async as course; else defaultLabel"
|
||||
>
|
||||
{{ 'name' | thingTranslate : course }} ({{ 'academicDegree' | thingTranslate : course }})
|
||||
{{ 'name' | thingTranslate: course }} ({{ 'academicDegree' | thingTranslate: course }})
|
||||
</ion-label>
|
||||
</div>
|
||||
<ng-template #defaultLabel>
|
||||
|
||||
@@ -14,8 +14,12 @@
|
||||
-->
|
||||
|
||||
<ion-label [color]="passed ? undefined : 'danger'"
|
||||
>{{ (_item.grade | isNumeric) ? (_item.grade | numberLocalized :
|
||||
'minimumFractionDigits:1,maximumFractionDigits:1') : '' }} {{ 'status' | thingTranslate : _item | titlecase
|
||||
}}, {{ 'attempt' | propertyNameTranslate : _item }} {{ _item.attempt }}
|
||||
>{{
|
||||
(_item.grade | isNumeric)
|
||||
? (_item.grade | numberLocalized: 'minimumFractionDigits:1,maximumFractionDigits:1')
|
||||
: ''
|
||||
}}
|
||||
{{ 'status' | thingTranslate: _item | titlecase }}, {{ 'attempt' | propertyNameTranslate: _item }}
|
||||
{{ _item.attempt }}
|
||||
</ion-label>
|
||||
<ion-note> {{ _item.ects }} {{ 'ects' | propertyNameTranslate : _item }}</ion-note>
|
||||
<ion-note> {{ _item.ects }} {{ 'ects' | propertyNameTranslate: _item }}</ion-note>
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
<ion-card>
|
||||
<ion-card-content>
|
||||
<ion-note *ngIf="item.courseOfStudy as courseOfStudy">
|
||||
{{ $any('courseOfStudy' | propertyNameTranslate : item) | titlecase }}: {{ 'name' | thingTranslate :
|
||||
$any(courseOfStudy) }} ({{ 'academicDegree' | thingTranslate : $any(courseOfStudy) }})
|
||||
{{ $any('courseOfStudy' | propertyNameTranslate: item) | titlecase }}:
|
||||
{{ 'name' | thingTranslate: $any(courseOfStudy) }} ({{
|
||||
'academicDegree' | thingTranslate: $any(courseOfStudy)
|
||||
}})
|
||||
</ion-note>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<h2 class="name">{{ 'name' | thingTranslate : item }} {{ item.date ? (item.date | amDateFormat) : '' }}</h2>
|
||||
<h2 class="name">{{ 'name' | thingTranslate: item }} {{ item.date ? (item.date | amDateFormat) : '' }}</h2>
|
||||
<assessment-base-info [item]="item"></assessment-base-info>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,10 @@ import {AuthHelperService} from './auth-helper.service';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuardService implements CanActivate {
|
||||
constructor(private authHelper: AuthHelperService, private router: Router) {}
|
||||
constructor(
|
||||
private authHelper: AuthHelperService,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
public async canActivate(route: ActivatedProtectedRouteSnapshot, _state: RouterStateSnapshot) {
|
||||
if (route.queryParamMap.get('token')) {
|
||||
|
||||
@@ -134,9 +134,9 @@ export class ScheduleSyncService {
|
||||
private formatChanges(changes: ChangesOf<SCDateSeries, DateSeriesRelevantData>): string[] {
|
||||
return changes.changes.map(
|
||||
change =>
|
||||
`${
|
||||
this.translator.translator.translatedPropertyNames<SCDateSeries>(SCThingType.DateSeries)?.[change]
|
||||
}: ${formatRelevantKeys[change](
|
||||
`${this.translator.translator.translatedPropertyNames<SCDateSeries>(SCThingType.DateSeries)?.[
|
||||
change
|
||||
]}: ${formatRelevantKeys[change](
|
||||
changes.new[change] as never,
|
||||
this.dateFormatPipe,
|
||||
this.durationFormatPipe,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<s *ngIf="iCalEvent.cancelled; else date"
|
||||
><ng-container [ngTemplateOutlet]="date"></ng-container>
|
||||
</s>
|
||||
<ng-template #date> {{ moment(iCalEvent.start) | amDateFormat : 'll, HH:mm' }} </ng-template>
|
||||
<ng-template #date> {{ moment(iCalEvent.start) | amDateFormat: 'll, HH:mm' }} </ng-template>
|
||||
</ion-label>
|
||||
<ion-note *ngIf="iCalEvent.rrule">
|
||||
{{ iCalEvent.rrule.interval }} {{ iCalEvent.rrule.freq | sentencecase }}
|
||||
@@ -47,9 +47,9 @@
|
||||
|
||||
<div class="horizontal-flex">
|
||||
<ion-item lines="none">
|
||||
<ion-checkbox [(ngModel)]="includeCancelled"
|
||||
>{{ 'schedule.toCalendar.reviewModal.INCLUDE_CANCELLED' | translate }}</ion-checkbox
|
||||
>
|
||||
<ion-checkbox [(ngModel)]="includeCancelled">{{
|
||||
'schedule.toCalendar.reviewModal.INCLUDE_CANCELLED' | translate
|
||||
}}</ion-checkbox>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="horizontal-flex">
|
||||
|
||||
@@ -38,7 +38,10 @@ export class CalendarService {
|
||||
calendarName = 'StApps';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
constructor(readonly calendar: Calendar, private readonly configProvider: ConfigProvider) {
|
||||
constructor(
|
||||
readonly calendar: Calendar,
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {
|
||||
this.calendarName = (this.configProvider.getValue('name') as string) ?? 'StApps';
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<ion-label>
|
||||
{{
|
||||
nextEvent
|
||||
? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm')
|
||||
? (nextEvent!.dates | nextDateInList | amDateFormat: 'll, HH:mm')
|
||||
: ('dashboard.schedule.noEvent' | translate)
|
||||
}}
|
||||
</ion-label>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<ng-container *ngIf="items | async as items">
|
||||
<ng-container *ngIf="items.length !== 0; else nothingSelected">
|
||||
<ng-container *ngFor="let item of items">
|
||||
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate : item">
|
||||
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate: item">
|
||||
<ion-button slot="button-end" fill="clear" color="medium" (click)="favoritesService.delete(item)">
|
||||
<ion-icon slot="icon-only" name="delete" size="24"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
@@ -42,8 +42,8 @@ export class ActionChipListComponent {
|
||||
const maybeCoords = isInPlace
|
||||
? item?.inPlace?.geo.point.coordinates
|
||||
: hasDirectGeo
|
||||
? item.geo.point.coordinates
|
||||
: undefined;
|
||||
? item.geo.point.coordinates
|
||||
: undefined;
|
||||
const isNullIsland = maybeCoords ? maybeCoords[0] === 0 && maybeCoords[1] === 0 : false;
|
||||
this.applicable = {
|
||||
locate: false, // TODO: reimplement this at a later date
|
||||
|
||||
@@ -13,7 +13,18 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, DestroyRef, inject, Input, ViewChild} from '@angular/core';
|
||||
import {IonRouterOutlet, ModalController} from '@ionic/angular/standalone';
|
||||
import {
|
||||
IonButton,
|
||||
IonChip,
|
||||
IonContent,
|
||||
IonFooter,
|
||||
IonIcon,
|
||||
IonLabel,
|
||||
IonRouterOutlet,
|
||||
IonSkeletonText,
|
||||
IonToolbar,
|
||||
ModalController,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {SCDateSeries, SCThing, SCThingType, SCUuid} from '@openstapps/core';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {ScheduleProvider} from '../../../calendar/schedule.provider';
|
||||
@@ -26,6 +37,11 @@ import {AddEventStates, AddEventStatesMap} from './add-event-action-chip.config'
|
||||
import {EditEventSelectionComponent} from '../edit-event-selection.component';
|
||||
import {AddEventReviewModalComponent} from '../../../calendar/add-event-review-modal.component';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {AsyncPipe, NgIf, TitleCasePipe} from '@angular/common';
|
||||
import {DataModule} from '../../data.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {EditModalComponent} from '../../../../util/edit-modal.component';
|
||||
import {IonContentParallaxDirective} from '../../../../util/ion-content-parallax.directive';
|
||||
|
||||
/**
|
||||
* Shows a horizontal list of action chips
|
||||
@@ -33,8 +49,26 @@ import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
@Component({
|
||||
selector: 'stapps-add-event-action-chip',
|
||||
templateUrl: 'add-event-action-chip.html',
|
||||
styleUrls: ['add-event-action-chip.scss'],
|
||||
styleUrl: 'add-event-action-chip.scss',
|
||||
animations: [chipSkeletonTransition, chipTransition],
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonChip,
|
||||
AsyncPipe,
|
||||
NgIf,
|
||||
DataModule,
|
||||
IonContent,
|
||||
IonIcon,
|
||||
IonLabel,
|
||||
TranslateModule,
|
||||
EditModalComponent,
|
||||
IonFooter,
|
||||
IonToolbar,
|
||||
IonButton,
|
||||
IonSkeletonText,
|
||||
TitleCasePipe,
|
||||
IonContentParallaxDirective,
|
||||
],
|
||||
})
|
||||
export class AddEventActionChipComponent {
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IonChip, IonIcon} from '@ionic/angular/standalone';
|
||||
import {SCThing} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
@@ -22,6 +23,8 @@ import {SCThing} from '@openstapps/core';
|
||||
@Component({
|
||||
selector: 'stapps-locate-action-chip',
|
||||
templateUrl: 'locate-action-chip.html',
|
||||
standalone: true,
|
||||
imports: [IonChip, IonIcon],
|
||||
})
|
||||
export class LocateActionChipComponent {
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,8 @@ import {SCPlaceWithoutReferences, SCThings} from '@openstapps/core';
|
||||
@Component({
|
||||
selector: 'stapps-navigate-action-chip',
|
||||
templateUrl: 'navigate-action-chip.html',
|
||||
styleUrls: ['navigate-action-chip.scss'],
|
||||
styleUrl: 'navigate-action-chip.scss',
|
||||
standalone: true,
|
||||
})
|
||||
export class NavigateActionChipComponent {
|
||||
place: SCPlaceWithoutReferences;
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
-->
|
||||
<ion-chip [color]="'primary'" [outline]="true" [geoNavigation]="place">
|
||||
<ion-icon name="directions"></ion-icon>
|
||||
<ion-label>{{'map.directions.TITLE' | translate}}</ion-label>
|
||||
<ion-label>{{ 'map.directions.TITLE' | translate }}</ion-label>
|
||||
</ion-chip>
|
||||
|
||||
@@ -31,9 +31,11 @@
|
||||
(ionChange)="modified.emit(); frequency.click()"
|
||||
>
|
||||
<ion-list-header>
|
||||
{{ frequency.children[0].item.repeatFrequency ? (frequency.children[0].item.repeatFrequency |
|
||||
durationLocalized: true | sentencecase) : ('data.chips.add_events.popover.SINGLE' | translate |
|
||||
titlecase) }}
|
||||
{{
|
||||
frequency.children[0].item.repeatFrequency
|
||||
? (frequency.children[0].item.repeatFrequency | durationLocalized: true | sentencecase)
|
||||
: ('data.chips.add_events.popover.SINGLE' | translate | titlecase)
|
||||
}}
|
||||
</ion-list-header>
|
||||
</ion-checkbox>
|
||||
</ion-item>
|
||||
@@ -44,13 +46,13 @@
|
||||
>
|
||||
<ng-container *ngIf="date.item.dates.length > 1; else single_event">
|
||||
<ion-text>
|
||||
{{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} - {{ date.item.dates[0] | amAdd:
|
||||
date.item.duration | amDateFormat: 'LT' }}
|
||||
{{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} -
|
||||
{{ date.item.dates[0] | amAdd: date.item.duration | amDateFormat: 'LT' }}
|
||||
</ion-text>
|
||||
<br />
|
||||
<ion-text>
|
||||
{{ date.item.dates[0] | amDateFormat: 'LL' }} - {{ date.item.dates[date.item.dates.length - 1] |
|
||||
amDateFormat: 'LL' }}
|
||||
{{ date.item.dates[0] | amDateFormat: 'LL' }} -
|
||||
{{ date.item.dates[date.item.dates.length - 1] | amDateFormat: 'LL' }}
|
||||
</ion-text>
|
||||
</ng-container>
|
||||
<ng-template #single_event>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<ion-chip [class.active]="active" (click)="emitToggle(value)">
|
||||
@if (active) {
|
||||
<ion-icon class="ion-color" name="check_circle" fill="true"></ion-icon>
|
||||
<ion-icon class="ion-color" name="check_circle" fill="true"></ion-icon>
|
||||
}
|
||||
<ion-label>{{ displayValue }}</ion-label>
|
||||
</ion-chip>
|
||||
|
||||
@@ -44,7 +44,10 @@ export class TreeNode<T extends TreeNode<any> | SelectionValue> {
|
||||
*/
|
||||
parent?: TreeNode<TreeNode<T>>;
|
||||
|
||||
constructor(readonly children: T[], readonly ref: ChangeDetectorRef) {
|
||||
constructor(
|
||||
readonly children: T[],
|
||||
readonly ref: ChangeDetectorRef,
|
||||
) {
|
||||
this.updateParents();
|
||||
this.accumulateApplyValues();
|
||||
}
|
||||
@@ -58,11 +61,11 @@ export class TreeNode<T extends TreeNode<any> | SelectionValue> {
|
||||
? it.checked
|
||||
? Selection.ON
|
||||
: it.indeterminate
|
||||
? Selection.PARTIAL
|
||||
: Selection.OFF
|
||||
? Selection.PARTIAL
|
||||
: Selection.OFF
|
||||
: (it as SelectionValue).selected
|
||||
? Selection.ON
|
||||
: Selection.OFF,
|
||||
? Selection.ON
|
||||
: Selection.OFF,
|
||||
);
|
||||
|
||||
this.checked = selections.every(it => it === Selection.ON);
|
||||
|
||||
@@ -29,10 +29,13 @@ async function delay(ms: number): Promise<void> {
|
||||
* ['a', 'b', 'c'] => {0: 'a', 1: 'b', 2: 'c'}
|
||||
*/
|
||||
export function arrayToIndexMap<T>(array: T[]): Record<number, T> {
|
||||
return array.reduce((previous, current, index) => {
|
||||
previous[index] = current;
|
||||
return previous;
|
||||
}, {} as Record<number, T>);
|
||||
return array.reduce(
|
||||
(previous, current, index) => {
|
||||
previous[index] = current;
|
||||
return previous;
|
||||
},
|
||||
{} as Record<number, T>,
|
||||
);
|
||||
}
|
||||
|
||||
interface OngoingQuery {
|
||||
|
||||
@@ -231,6 +231,7 @@ import {VideoListItemComponent} from './types/video/video-list-item.component';
|
||||
BookDetailContentComponent,
|
||||
PeriodicalDetailContentComponent,
|
||||
TitleCardComponent,
|
||||
EditEventSelectionComponent,
|
||||
],
|
||||
})
|
||||
export class DataModule {}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<ion-header *ngIf="showModalHeader" translucent>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-title>{{ 'name' | thingTranslate : item }}</ion-title>
|
||||
<ion-title>{{ 'name' | thingTranslate: item }}</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="modalController.dismiss()">{{ 'app.ui.CLOSE' | translate }}</ion-button>
|
||||
</ion-buttons>
|
||||
@@ -97,8 +97,8 @@
|
||||
</ion-item>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.description"
|
||||
[title]="$any('description' | propertyNameTranslate : item) | titlecase"
|
||||
[content]="'description' | thingTranslate : item"
|
||||
[title]="$any('description' | propertyNameTranslate: item) | titlecase"
|
||||
[content]="'description' | thingTranslate: item"
|
||||
></stapps-simple-card>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
stack.length === 1
|
||||
? '100%'
|
||||
: stack.length === 2
|
||||
? '40vw'
|
||||
: ($width | async) >= 768
|
||||
? '30vw'
|
||||
: 'calc(100vw - 120px)'
|
||||
? '40vw'
|
||||
: ($width | async) >= 768
|
||||
? '30vw'
|
||||
: 'calc(100vw - 120px)'
|
||||
"
|
||||
class="crumb-label"
|
||||
>{{ 'name' | thingTranslate : $any(fragment) }}</ion-label
|
||||
>{{ 'name' | thingTranslate: $any(fragment) }}</ion-label
|
||||
>
|
||||
</ion-breadcrumb>
|
||||
</ion-breadcrumbs>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
-->
|
||||
|
||||
<span class="ion-hide-sm-up">
|
||||
{{ text | slice : 0 : size }}
|
||||
{{ text | slice: 0 : size }}
|
||||
<span *ngIf="text.length > size" class="ion-hide-sm-up">…</span>
|
||||
</span>
|
||||
<span class="ion-hide-sm-down ion-hide-md-up">
|
||||
{{ text | slice : 0 : size * 2 }}
|
||||
{{ text | slice: 0 : size * 2 }}
|
||||
<span *ngIf="text.length > size * 2" class="ion-hide-sm-down ion-hide-md-up"> … </span>
|
||||
</span>
|
||||
<span class="ion-hide-md-down">
|
||||
{{ text | slice : 0 : size * 3 }}
|
||||
{{ text | slice: 0 : size * 3 }}
|
||||
<span *ngIf="text.length > size * 3" class="ion-hide-md-down">…</span>
|
||||
</span>
|
||||
|
||||
@@ -12,24 +12,48 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCAcademicPriceGroup, SCThingThatCanBeOfferedOffer} from '@openstapps/core';
|
||||
import {
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonCardHeader,
|
||||
IonCol,
|
||||
IonGrid,
|
||||
IonIcon,
|
||||
IonRow,
|
||||
IonText,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {ThingTranslateModule} from '../../../translation/thing-translate.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {CurrencyPipe, KeyValuePipe, TitleCasePipe} from '@angular/common';
|
||||
import {FormatPipeModule, ParseIsoPipeModule} from 'ngx-date-fns';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-offers-detail',
|
||||
templateUrl: 'offers-detail.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardContent,
|
||||
IonGrid,
|
||||
IonRow,
|
||||
IonCol,
|
||||
IonIcon,
|
||||
RouterLink,
|
||||
ThingTranslateModule,
|
||||
TranslateModule,
|
||||
TitleCasePipe,
|
||||
ParseIsoPipeModule,
|
||||
FormatPipeModule,
|
||||
IonText,
|
||||
CurrencyPipe,
|
||||
KeyValuePipe,
|
||||
],
|
||||
})
|
||||
export class OffersDetailComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
objectKeys = Object.keys;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() offers: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>;
|
||||
}
|
||||
|
||||
@@ -16,43 +16,51 @@
|
||||
<ion-card>
|
||||
<ion-card-header>{{ 'data.detail.offers.TITLE' | translate | titlecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<div *ngFor="let offer of offers">
|
||||
@for (offer of offers; track $index) {
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', offer.inPlace.uid]">
|
||||
{{ 'name' | thingTranslate : offer.inPlace }}
|
||||
{{ 'name' | thingTranslate: offer.inPlace }}
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<span
|
||||
*ngIf="offer.availabilityRange.gt ? offer.availabilityRange.gt : offer.availabilityRange.gte"
|
||||
>
|
||||
{{ (offer.availabilityRange.gt ? offer.availabilityRange.gt : offer.availabilityRange.gte) |
|
||||
amDateFormat : 'll' }}
|
||||
</span>
|
||||
@if (offer.availabilityRange.gt ? offer.availabilityRange.gt : offer.availabilityRange.gt) {
|
||||
{{
|
||||
(offer.availabilityRange.gt ? offer.availabilityRange.gt : offer.availabilityRange.gte)
|
||||
| dfnsParseIso
|
||||
| dfnsFormat: 'PP'
|
||||
}}
|
||||
}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<ion-grid *ngIf="offer.prices && offer.availability !== 'out of stock'">
|
||||
<ion-row *ngFor="let group of objectKeys(offer.prices)">
|
||||
<ion-col *ngIf="group !== 'default'">{{ 'data.detail.offers.' + group | translate }} </ion-col>
|
||||
<ion-col *ngIf="group !== 'default'" width-20 text-right>
|
||||
<p>{{ offer.prices[group] | currency : 'EUR' : 'symbol' : undefined : 'de' }}</p>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<ion-grid *ngIf="offer.availability === 'out of stock'">
|
||||
<ion-row>
|
||||
<ion-col></ion-col>
|
||||
<ion-col width-20 text-right>
|
||||
<ion-text color="danger">
|
||||
<p>{{ 'data.detail.offers.sold_out' | translate }}</p>
|
||||
</ion-text>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
@if (offer.availability === 'out of stock') {
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col></ion-col>
|
||||
<ion-col width-20 text-right>
|
||||
<ion-text color="danger">
|
||||
<p>{{ 'data.detail.offers.sold_out' | translate }}</p>
|
||||
</ion-text>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
} @else if (offer.prices) {
|
||||
<ion-grid>
|
||||
@for (group of offer.prices | keyvalue) {
|
||||
<ion-row>
|
||||
@if (group[0] !== 'default') {
|
||||
<ion-col>{{ 'data.detail.offers.' + group[0] | translate }} </ion-col>
|
||||
<ion-col width-20 text-right>
|
||||
<p>{{ offer.prices[group[0]] | currency: 'EUR' : 'symbol' : '' : 'de' }}</p>
|
||||
</ion-col>
|
||||
}
|
||||
</ion-row>
|
||||
}
|
||||
</ion-grid>
|
||||
}
|
||||
}
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -12,21 +12,21 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCAcademicPriceGroup, SCThingThatCanBeOfferedOffer} from '@openstapps/core';
|
||||
import {SettingsProvider} from '../../settings/settings.provider';
|
||||
import {IonIcon, IonText} from '@ionic/angular/standalone';
|
||||
import {CurrencyPipe} from '@angular/common';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-offers-in-list',
|
||||
templateUrl: 'offers-in-list.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonText, CurrencyPipe, TranslateModule, IonIcon],
|
||||
})
|
||||
export class OffersInListComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() set offers(it: Array<SCThingThatCanBeOfferedOffer<SCAcademicPriceGroup>>) {
|
||||
this._offers = it;
|
||||
this.price = it[0].prices?.default;
|
||||
|
||||
@@ -14,15 +14,24 @@
|
||||
-->
|
||||
|
||||
<div>
|
||||
<ion-text *ngIf="price && !soldOut" style="white-space: nowrap">
|
||||
<h2>{{ price | currency : 'EUR' : 'symbol' : undefined : 'de' }}</h2>
|
||||
</ion-text>
|
||||
<ion-text *ngIf="soldOut" color="danger" class="sold-out" style="white-space: nowrap">
|
||||
<h2>{{ 'data.detail.offers.sold_out' | translate }}</h2>
|
||||
</ion-text>
|
||||
<p *ngIf="_offers[0].inPlace && !soldOut" class="place" style="white-space: nowrap">
|
||||
<ion-icon name="pin_drop"></ion-icon>{{ _offers[0].inPlace.name }}<span *ngIf="_offers.length > 1"
|
||||
>...</span
|
||||
>
|
||||
</p>
|
||||
@if (soldOut) {
|
||||
<ion-text color="danger" class="sold-out" [style.white-space]="'nowrap'">
|
||||
<h2>{{ 'data.detail.offers.sold_out' | translate }}</h2>
|
||||
</ion-text>
|
||||
} @else {
|
||||
@if (price) {
|
||||
<ion-text [style.white-space]="'nowrap'">
|
||||
<h2>{{ price | currency: 'EUR' : 'symbol' : '' : 'de' }}</h2>
|
||||
</ion-text>
|
||||
}
|
||||
@if (_offers[0].inPlace) {
|
||||
<p class="place" style="white-space: nowrap">
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
{{ _offers[0].inPlace.name }}
|
||||
@if (_offers.length > 1) {
|
||||
...
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -12,19 +12,30 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {SCThingOrigin} from '@openstapps/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCThingRemoteOrigin, SCThingUserOrigin} from '@openstapps/core';
|
||||
import {IonCard, IonCardContent, IonCardHeader} from '@ionic/angular/standalone';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
import {FormatPipeModule, ParseIsoPipeModule} from 'ngx-date-fns';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-origin-detail',
|
||||
templateUrl: 'origin-detail.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardContent,
|
||||
RouterLink,
|
||||
TranslateModule,
|
||||
TitleCasePipe,
|
||||
ParseIsoPipeModule,
|
||||
FormatPipeModule,
|
||||
],
|
||||
})
|
||||
export class OriginDetailComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() origin: SCThingOrigin;
|
||||
@Input() origin: SCThingUserOrigin | SCThingRemoteOrigin;
|
||||
}
|
||||
|
||||
@@ -13,54 +13,74 @@
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="origin.type === 'user'">
|
||||
<ion-card-header
|
||||
>{{ 'data.types.origin.TITLE' | translate | titlecase }}: {{ 'data.types.origin.USER' | translate |
|
||||
titlecase }}</ion-card-header
|
||||
>
|
||||
<ion-card-content>
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.CREATED' | translate | titlecase }}: {{ origin.created | amDateFormat :
|
||||
'll' }}
|
||||
</p>
|
||||
<p *ngIf="origin.updated">
|
||||
{{ 'data.types.origin.detail.UPDATED' | translate | titlecase }}: {{ origin.updated | amDateFormat :
|
||||
'll' }}
|
||||
</p>
|
||||
<p *ngIf="origin.modified">
|
||||
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}: {{ origin.modified | amDateFormat :
|
||||
'll' }}
|
||||
</p>
|
||||
<p *ngIf="origin.name">{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
|
||||
<p *ngIf="origin.maintainer">
|
||||
{{ 'data.types.origin.detail.MAINTAINER' | translate }}:
|
||||
<a [routerLink]="['/data-detail', origin.maintainer.uid]">{{ origin.maintainer.name }}</a>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card *ngIf="origin.type === 'remote'">
|
||||
<ion-card-header
|
||||
>{{ 'data.types.origin.TITLE' | translate | titlecase }}: {{ 'data.types.origin.REMOTE' | translate |
|
||||
titlecase }}</ion-card-header
|
||||
>
|
||||
<ion-card-content>
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.INDEXED' | translate | titlecase }}: {{ origin.indexed | amDateFormat :
|
||||
'll' }}
|
||||
</p>
|
||||
<p *ngIf="origin.modified">
|
||||
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}: {{ origin.modified | amDateFormat :
|
||||
'll' }}
|
||||
</p>
|
||||
<p *ngIf="origin.name">{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
|
||||
<p *ngIf="origin.maintainer">
|
||||
{{ 'data.types.origin.detail.MAINTAINER' | translate | titlecase }}:
|
||||
<a [routerLink]="['/data-detail', origin.maintainer.uid]">{{ origin.maintainer.name }}</a>
|
||||
</p>
|
||||
<p *ngIf="origin.responsibleEntity">
|
||||
{{ 'data.types.origin.detail.RESPONSIBLE' | translate | titlecase }}:
|
||||
<a [routerLink]="['/data-detail', origin.responsibleEntity.uid]">{{ origin.responsibleEntity.name }}</a>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
@if (origin.type === 'user') {
|
||||
<ion-card>
|
||||
<ion-card-header
|
||||
>{{ 'data.types.origin.TITLE' | translate | titlecase }}:
|
||||
{{ 'data.types.origin.USER' | translate | titlecase }}</ion-card-header
|
||||
>
|
||||
<ion-card-content>
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.CREATED' | translate | titlecase }}:
|
||||
{{ origin.created | dfnsParseIso | dfnsFormat: 'PP' }}
|
||||
</p>
|
||||
@if (origin.updated) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.UPDATED' | translate | titlecase }}:
|
||||
{{ origin.updated | dfnsParseIso | dfnsFormat: 'PP' }}
|
||||
</p>
|
||||
}
|
||||
@if (origin.modified) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
|
||||
{{ origin.modified | dfnsParseIso | dfnsFormat: 'PP' }}
|
||||
</p>
|
||||
}
|
||||
@if (origin.name) {
|
||||
<p>{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
|
||||
}
|
||||
@if (origin.maintainer) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.MAINTAINER' | translate }}:
|
||||
<a [routerLink]="['/data-detail', origin.maintainer.uid]">{{ origin.maintainer.name }}</a>
|
||||
</p>
|
||||
}
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
} @else if (origin.type === 'remote') {
|
||||
<ion-card>
|
||||
<ion-card-header
|
||||
>{{ 'data.types.origin.TITLE' | translate | titlecase }}:
|
||||
{{ 'data.types.origin.REMOTE' | translate | titlecase }}</ion-card-header
|
||||
>
|
||||
<ion-card-content>
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.INDEXED' | translate | titlecase }}:
|
||||
{{ origin.indexed | dfnsParseIso | dfnsFormat: 'PP' }}
|
||||
</p>
|
||||
@if (origin.modified) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
|
||||
{{ origin.modified | dfnsParseIso | dfnsFormat: 'PP' }}
|
||||
</p>
|
||||
}
|
||||
@if (origin.name) {
|
||||
<p>{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
|
||||
}
|
||||
@if (origin.maintainer) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.MAINTAINER' | translate | titlecase }}:
|
||||
<a [routerLink]="['/data-detail', origin.maintainer.uid]">{{ origin.maintainer.name }}</a>
|
||||
</p>
|
||||
}
|
||||
@if (origin.responsibleEntity) {
|
||||
<p>
|
||||
{{ 'data.types.origin.detail.RESPONSIBLE' | translate | titlecase }}:
|
||||
<a [routerLink]="['/data-detail', origin.responsibleEntity.uid]">{{
|
||||
origin.responsibleEntity.name
|
||||
}}</a>
|
||||
</p>
|
||||
}
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
}
|
||||
|
||||
@@ -12,19 +12,17 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {SCThingOrigin} from '@openstapps/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCThingRemoteOrigin, SCThingUserOrigin} from '@openstapps/core';
|
||||
import {ThingTranslateModule} from '../../../translation/thing-translate.module';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-origin-in-list',
|
||||
templateUrl: 'origin-in-list.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [ThingTranslateModule],
|
||||
})
|
||||
export class OriginInListComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() origin: SCThingOrigin;
|
||||
@Input() origin: SCThingUserOrigin | SCThingRemoteOrigin;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div *ngIf="origin.type === 'user'">
|
||||
<p>{{ origin.created | dateFormat }}</p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="origin.type === 'remote'">
|
||||
<p>{{ origin.indexed | dateFormat }}</p>
|
||||
</div>
|
||||
<p>
|
||||
@if (origin.type === 'user') {
|
||||
{{ origin.created | dateFormat }}
|
||||
} @else if (origin.type === 'remote') {
|
||||
{{ origin.indexed | dateFormat }}
|
||||
}
|
||||
</p>
|
||||
|
||||
@@ -51,7 +51,10 @@ export class StappsRatingComponent {
|
||||
this.dish.next(value);
|
||||
}
|
||||
|
||||
constructor(readonly elementRef: ElementRef, readonly ratingProvider: RatingProvider) {}
|
||||
constructor(
|
||||
readonly elementRef: ElementRef,
|
||||
readonly ratingProvider: RatingProvider,
|
||||
) {}
|
||||
|
||||
@HostListener('document:mousedown', ['$event'])
|
||||
clickOutside(event: MouseEvent) {
|
||||
|
||||
@@ -12,49 +12,33 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCThingWithoutReferences} from '@openstapps/core';
|
||||
import {IonCard, IonCardContent, IonCardHeader} from '@ionic/angular/standalone';
|
||||
import {MarkdownComponent} from 'ngx-markdown';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {ThingTranslateModule} from '../../../translation/thing-translate.module';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-simple-card',
|
||||
templateUrl: 'simple-card.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonCard, IonCardHeader, IonCardContent, MarkdownComponent, RouterLink, ThingTranslateModule],
|
||||
})
|
||||
export class SimpleCardComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
areThings = false;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() content: string | string[] | SCThingWithoutReferences[];
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() isMarkdown = false;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Input() title: string;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
isString(data: unknown): data is string {
|
||||
return typeof data === 'string';
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
isThing(something: unknown): something is SCThingWithoutReferences {
|
||||
// bypass the 'type' field check because of translated values
|
||||
return typeof something === 'object';
|
||||
|
||||
@@ -16,25 +16,25 @@
|
||||
<ion-card>
|
||||
<ion-card-header>{{ title }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ng-container *ngIf="isString(content); then text; else list"> </ng-container>
|
||||
<ng-template #text>
|
||||
<ng-container *ngIf="isMarkdown; else plainText">
|
||||
@if (isString(content)) {
|
||||
@if (isMarkdown) {
|
||||
<markdown [data]="content"></markdown>
|
||||
</ng-container>
|
||||
<ng-template #plainText>
|
||||
} @else {
|
||||
<p>{{ content }}</p>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<ng-template #list>
|
||||
<ng-container *ngIf="isThing(content[0]); then thingList; else textList"> </ng-container>
|
||||
<ng-template #thingList>
|
||||
<a [routerLink]="['/data-detail', thing.uid]" *ngFor="let thing of content">
|
||||
<p>{{ 'name' | thingTranslate : thing }}</p>
|
||||
</a>
|
||||
</ng-template>
|
||||
<ng-template #textList>
|
||||
<p *ngFor="let text of content">{{ text }}</p>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
}
|
||||
} @else {
|
||||
@if (isThing(content[0])) {
|
||||
@for (thing of content; track thing) {
|
||||
<a [routerLink]="['/data-detail', thing.uid]">
|
||||
<p>{{ 'name' | thingTranslate: thing }}</p>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
}
|
||||
@else {
|
||||
@for (text of content; track text) {
|
||||
<p>{{ text }}</p>
|
||||
}
|
||||
}
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -12,7 +12,16 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {
|
||||
IonCol,
|
||||
IonGrid,
|
||||
IonItem,
|
||||
IonNote,
|
||||
IonRow,
|
||||
IonSkeletonText,
|
||||
IonThumbnail,
|
||||
} from '@ionic/angular/standalone';
|
||||
|
||||
/**
|
||||
* A placeholder to show when a list item is being loaded
|
||||
@@ -20,7 +29,9 @@ import {Component, Input} from '@angular/core';
|
||||
@Component({
|
||||
selector: 'stapps-skeleton-list-item',
|
||||
templateUrl: 'skeleton-list-item.html',
|
||||
styleUrls: ['skeleton-list-item.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonItem, IonThumbnail, IonSkeletonText, IonGrid, IonRow, IonCol, IonNote],
|
||||
})
|
||||
export class SkeletonListItemComponent {
|
||||
@Input() hideThumbnail = false;
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<ion-item>
|
||||
<ion-thumbnail *ngIf="!hideThumbnail" slot="start" class="ion-margin-end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
@if (!hideThumbnail) {
|
||||
<ion-thumbnail slot="start" class="ion-margin-end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
}
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2 class="name">
|
||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated [style.width.%]="80"></ion-skeleton-text>
|
||||
</h2>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated [style.width.%]="80"></ion-skeleton-text>
|
||||
</p>
|
||||
<ion-note>
|
||||
<ion-skeleton-text animated style="width: 20%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated [style.width.%]="80"></ion-skeleton-text>
|
||||
</ion-note>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
||||
import {IonSegmentButton, IonSkeletonText} from '@ionic/angular/standalone';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -20,5 +21,8 @@ import {Component} from '@angular/core';
|
||||
@Component({
|
||||
selector: 'stapps-skeleton-segment-button',
|
||||
templateUrl: 'skeleton-segment-button.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonSegmentButton, IonSkeletonText],
|
||||
})
|
||||
export class SkeletonSegmentComponent {}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<ion-segment-button>
|
||||
<ion-skeleton-text animated style="width: 85%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated [style.width.%]="85"></ion-skeleton-text>
|
||||
</ion-segment-button>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {IonCard, IonCardContent, IonCardHeader, IonSkeletonText} from '@ionic/angular/standalone';
|
||||
|
||||
/**
|
||||
* A placeholder to show when a simple card is being loaded
|
||||
@@ -20,6 +21,9 @@ import {Component, Input} from '@angular/core';
|
||||
@Component({
|
||||
selector: 'stapps-skeleton-simple-card',
|
||||
templateUrl: 'skeleton-simple-card.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonCard, IonCardHeader, IonSkeletonText, IonCardContent],
|
||||
})
|
||||
export class SkeletonSimpleCardComponent {
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<ion-card>
|
||||
<ion-card-header *ngIf="title">
|
||||
<ion-skeleton-text animated style="width: 15%"></ion-skeleton-text>
|
||||
</ion-card-header>
|
||||
@if (title) {
|
||||
<ion-card-header>
|
||||
<ion-skeleton-text animated [style.width.%]="15"></ion-skeleton-text>
|
||||
</ion-card-header>
|
||||
}
|
||||
<ion-card-content>
|
||||
<p>
|
||||
<ion-skeleton-text
|
||||
*ngFor="let line of [].constructor(lines)"
|
||||
animated
|
||||
style="width: 85%"
|
||||
></ion-skeleton-text>
|
||||
@for (line of [].constructor(lines); track line) {
|
||||
<ion-skeleton-text animated [style.width.%]="85"></ion-skeleton-text>
|
||||
}
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -13,9 +13,28 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Component, ElementRef, HostListener, Input, OnChanges, OnInit, ViewChild} from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {SCThings} from '@openstapps/core';
|
||||
import {SCIcon} from '../../../util/ion-icon/icon';
|
||||
import {
|
||||
IonButton,
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonCardHeader,
|
||||
IonCardTitle,
|
||||
IonIcon,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {OpeningHoursComponent} from '../../../util/opening-hours.component';
|
||||
import {ThingTranslateModule} from '../../../translation/thing-translate.module';
|
||||
|
||||
const AccordionButtonState = {
|
||||
collapsed: SCIcon`expand_more`,
|
||||
@@ -24,8 +43,20 @@ const AccordionButtonState = {
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-title-card',
|
||||
templateUrl: './title-card.component.html',
|
||||
styleUrls: ['./title-card.component.scss'],
|
||||
templateUrl: 'title-card.html',
|
||||
styleUrl: 'title-card.scss',
|
||||
changeDetection: ChangeDetectionStrategy.Default,
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardTitle,
|
||||
IonCardContent,
|
||||
OpeningHoursComponent,
|
||||
IonButton,
|
||||
IonIcon,
|
||||
ThingTranslateModule,
|
||||
],
|
||||
})
|
||||
export class TitleCardComponent implements OnInit, OnChanges {
|
||||
/**
|
||||
|
||||
@@ -16,34 +16,35 @@
|
||||
<ion-card-header>
|
||||
<ion-card-title>
|
||||
<h1>
|
||||
<ng-container *ngIf="$any(item).honorificPrefix">{{
|
||||
'honorificPrefix' | thingTranslate : item
|
||||
}}</ng-container>
|
||||
{{ 'name' | thingTranslate : item }}
|
||||
<ng-container *ngIf="$any(item).honorificSuffix">{{
|
||||
'honorificSuffix' | thingTranslate : item
|
||||
}}</ng-container>
|
||||
@if (item.honorificPrefix) {
|
||||
{{ 'honorificPrefix' | thingTranslate: item }}
|
||||
}
|
||||
{{ 'name' | thingTranslate: item }}
|
||||
@if (item.honorificSuffix) {
|
||||
{{ 'honorificSuffix' | thingTranslate: item }}
|
||||
}
|
||||
</h1>
|
||||
</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<div *ngIf="$any(item).openingHours" class="opening-hours">
|
||||
<stapps-opening-hours [openingHours]="item.openingHours"></stapps-opening-hours>
|
||||
</div>
|
||||
<!-- TODO obviously this is bad style. Tbd where to put the differentiation. Job Postings always have a description, but it's going to be shown in `stapps-job-posting-detail-content` anyways, no need to repeat here. For this view, I would use other fields of the schema.org JobPosting like the `ThingWithCategory.category` -->
|
||||
<div *ngIf="item.description && item.type !== 'job posting'" class="description">
|
||||
<div class="text-accordion" [style.-webkit-line-clamp]="descriptionLinesToDisplay" #accordionTextArea>
|
||||
{{ 'description' | thingTranslate : item }}
|
||||
@if (item.openingHours) {
|
||||
<div class="opening-hours">
|
||||
<stapps-opening-hours [openingHours]="item.openingHours"></stapps-opening-hours>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- TODO obviously this is bad style. Tbd where to put the differentiation. Job Postings always have a description, but it's going to be shown in `stapps-job-posting-detail-content` anyways, no need to repeat here. For this view, I would use other fields of the schema.org JobPosting like the `ThingWithCategory.category` -->
|
||||
@if (item.description && item.type !== 'job posting') {
|
||||
<div class="description">
|
||||
<div class="text-accordion" [style.-webkit-line-clamp]="descriptionLinesToDisplay" #accordionTextArea>
|
||||
{{ 'description' | thingTranslate: item }}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- TODO see above -->
|
||||
<ion-button
|
||||
expand="full"
|
||||
fill="clear"
|
||||
*ngIf="item.description && item.type !== 'job posting' && buttonShown"
|
||||
(click)="toggleDescriptionAccordion()"
|
||||
>
|
||||
<ion-icon [name]="buttonState" size="large"></ion-icon>
|
||||
</ion-button>
|
||||
@if (item.description && item.type !== 'job posting' && buttonShown) {
|
||||
<ion-button expand="full" fill="clear" (click)="toggleDescriptionAccordion()">
|
||||
<ion-icon [name]="buttonState" size="large"></ion-icon>
|
||||
</ion-button>
|
||||
}
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
@@ -13,10 +13,10 @@
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<h2>{{ 'name' | thingTranslate : item }}</h2>
|
||||
<h2>{{ 'name' | thingTranslate: item }}</h2>
|
||||
<p *ngIf="item.description">
|
||||
<stapps-long-inline-text
|
||||
[text]="'description' | thingTranslate : item"
|
||||
[text]="'description' | thingTranslate: item"
|
||||
[size]="80"
|
||||
></stapps-long-inline-text>
|
||||
</p>
|
||||
|
||||
@@ -53,7 +53,10 @@ export class SimpleDataListComponent implements OnInit {
|
||||
|
||||
destroy$ = inject(DestroyRef);
|
||||
|
||||
constructor(protected router: Router, private readonly dataRoutingService: DataRoutingService) {}
|
||||
constructor(
|
||||
protected router: Router,
|
||||
private readonly dataRoutingService: DataRoutingService,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (!this.autoRouting) return;
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
></ng-container>
|
||||
</ng-container>
|
||||
</ion-list>
|
||||
<ion-label class="empty-list-message" *ngIf="emptyListMessage && items.length === 0"
|
||||
>{{ emptyListMessage }}</ion-label
|
||||
>
|
||||
<ion-label class="empty-list-message" *ngIf="emptyListMessage && items.length === 0">{{
|
||||
emptyListMessage
|
||||
}}</ion-label>
|
||||
</ng-container>
|
||||
<ng-template #loading>
|
||||
<ion-list>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCArticle} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
@@ -21,6 +21,8 @@ import {SCArticle} from '@openstapps/core';
|
||||
@Component({
|
||||
selector: 'stapps-article-content',
|
||||
templateUrl: 'article-content.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
})
|
||||
export class ArticleContentComponent {
|
||||
/**
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
|
||||
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="!item.sameAs"
|
||||
[title]="'name' | propertyNameTranslate : item | sentencecase"
|
||||
[content]="'name' | thingTranslate : item"
|
||||
[title]="'name' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="'name' | thingTranslate: item"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.sourceOrganization"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.sourceOrganization"
|
||||
></stapps-simple-card>
|
||||
|
||||
<ion-card *ngIf="item.authors && item.authors.length > 0">
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -56,37 +56,37 @@
|
||||
<stapps-simple-card
|
||||
*ngIf="item.firstPublished && item.lastPublished"
|
||||
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
<ion-card *ngIf="item.publications">
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p *ngFor="let publication of item.publications">
|
||||
{{ publication.locations | join : ', ' }} {{ publication.locations && publication.publisher ? ':' : ''
|
||||
}} {{ publication.publisher }}
|
||||
{{ publication.locations | join: ', ' }}
|
||||
{{ publication.locations && publication.publisher ? ':' : '' }} {{ publication.publisher }}
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.reference"
|
||||
[title]="'reference' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'reference' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.reference"
|
||||
></stapps-simple-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.isPartOf"
|
||||
[title]="'isPartOf' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'isPartOf' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.isPartOf.name"
|
||||
></stapps-simple-card>
|
||||
<ion-card *ngIf="item.categories">
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCArticle} from '@openstapps/core';
|
||||
import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -22,8 +21,10 @@ import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
@Component({
|
||||
selector: 'stapps-article-item',
|
||||
templateUrl: 'article-list-item.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
})
|
||||
export class ArticleListItemComponent extends DataListItemComponent {
|
||||
export class ArticleListItemComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
|
||||
@@ -16,20 +16,20 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2 class="name">{{ 'name' | thingTranslate : item }}</h2>
|
||||
<h2 class="name">{{ 'name' | thingTranslate: item }}</h2>
|
||||
<p>
|
||||
<ng-container *ngFor="let author of item.authors">
|
||||
{{ 'name' | thingTranslate : author }}</ng-container
|
||||
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
|
||||
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">, </ng-container>
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange"
|
||||
>{{ item.firstPublished }}</ng-container
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
|
||||
item.firstPublished
|
||||
}}</ng-container
|
||||
><ng-template #dateRange
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished"
|
||||
>{{ [item.firstPublished, item.lastPublished] | join : ' - ' }}</ng-container
|
||||
></ng-template
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
|
||||
[item.firstPublished, item.lastPublished] | join: ' - '
|
||||
}}</ng-container></ng-template
|
||||
>
|
||||
</p>
|
||||
<ion-note> {{ 'categories' | thingTranslate : item }} </ion-note>
|
||||
<ion-note> {{ 'categories' | thingTranslate: item }} </ion-note>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCBook} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
@@ -21,6 +21,8 @@ import {SCBook} from '@openstapps/core';
|
||||
@Component({
|
||||
selector: 'stapps-book-detail-content',
|
||||
templateUrl: 'book-detail-content.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
})
|
||||
export class BookDetailContentComponent {
|
||||
/**
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
|
||||
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="!item.sameAs"
|
||||
[title]="'name' | propertyNameTranslate : item | sentencecase"
|
||||
[content]="'name' | thingTranslate : item"
|
||||
[title]="'name' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="'name' | thingTranslate: item"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.edition"
|
||||
[title]="'edition' | propertyNameTranslate : item | sentencecase"
|
||||
[content]="'edition' | thingTranslate : item"
|
||||
[title]="'edition' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="'edition' | thingTranslate: item"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
@@ -42,20 +42,20 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.sourceOrganization"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.sourceOrganization"
|
||||
></stapps-simple-card>
|
||||
|
||||
<ion-card *ngIf="item.authors && item.authors.length > 0">
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.ISBNs"
|
||||
[title]="'ISBNs' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'ISBNs' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.ISBNs"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
@@ -68,24 +68,24 @@
|
||||
<stapps-simple-card
|
||||
*ngIf="item.firstPublished && item.lastPublished"
|
||||
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
<ion-card *ngIf="item.publications">
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p *ngFor="let publication of item.publications">
|
||||
{{ publication.locations | join : ', ' }} {{ publication.locations && publication.publisher ? ':' : ''
|
||||
}} {{ publication.publisher }}
|
||||
{{ publication.locations | join: ', ' }}
|
||||
{{ publication.locations && publication.publisher ? ':' : '' }} {{ publication.publisher }}
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card *ngIf="item.categories">
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCBook} from '@openstapps/core';
|
||||
import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -22,8 +21,10 @@ import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
@Component({
|
||||
selector: 'stapps-book-list-item',
|
||||
templateUrl: 'book-list-item.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
})
|
||||
export class BookListItemComponent extends DataListItemComponent {
|
||||
export class BookListItemComponent {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
|
||||
@@ -16,20 +16,20 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2 class="name">{{ 'name' | thingTranslate : item }}</h2>
|
||||
<h2 class="name">{{ 'name' | thingTranslate: item }}</h2>
|
||||
<p>
|
||||
<ng-container *ngFor="let author of item.authors">
|
||||
{{ 'name' | thingTranslate : author }}</ng-container
|
||||
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
|
||||
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">, </ng-container>
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange"
|
||||
>{{ item.firstPublished }}</ng-container
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
|
||||
item.firstPublished
|
||||
}}</ng-container
|
||||
><ng-template #dateRange
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished"
|
||||
>{{ [item.firstPublished, item.lastPublished] | join : ' - ' }}</ng-container
|
||||
></ng-template
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
|
||||
[item.firstPublished, item.lastPublished] | join: ' - '
|
||||
}}</ng-container></ng-template
|
||||
>
|
||||
</p>
|
||||
<ion-note> {{ 'categories' | thingTranslate : item }} </ion-note>
|
||||
<ion-note> {{ 'categories' | thingTranslate: item }} </ion-note>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -12,19 +12,18 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
|
||||
import {SCCatalog, SCThings} from '@openstapps/core';
|
||||
import {DataProvider} from '../../data.provider';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-catalog-detail-content',
|
||||
templateUrl: 'catalog-detail-content.html',
|
||||
styleUrls: ['catalog-detail-content.scss'],
|
||||
styleUrl: 'catalog-detail-content.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
})
|
||||
export class CatalogDetailContentComponent implements OnInit {
|
||||
/**
|
||||
* SCCatalog to display
|
||||
*/
|
||||
@Input() item: SCCatalog;
|
||||
|
||||
items: Promise<SCThings[]>;
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
id="simple-data-list"
|
||||
[items]="items"
|
||||
[singleType]="true"
|
||||
[listHeader]="'type' | thingTranslate : item | titlecase"
|
||||
[listHeader]="'type' | thingTranslate: item | titlecase"
|
||||
[emptyListMessage]="'catalog.detail.EMPTY_CATALOG' | translate"
|
||||
></stapps-simple-data-list>
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCCatalog} from '@openstapps/core';
|
||||
import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
import {IonCol, IonGrid, IonLabel, IonRow} from '@ionic/angular/standalone';
|
||||
import {ThingTranslateModule} from '../../../../translation/thing-translate.module';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -22,6 +24,9 @@ import {DataListItemComponent} from '../../list/data-list-item.component';
|
||||
@Component({
|
||||
selector: 'stapps-catalog-list-item',
|
||||
templateUrl: 'catalog-list-item.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonGrid, IonRow, IonCol, IonLabel, ThingTranslateModule],
|
||||
})
|
||||
export class CatalogListItemComponent extends DataListItemComponent {
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title"> {{ 'name' | thingTranslate : item }} </ion-label>
|
||||
<p *ngIf="item.academicTerm" class="title-sub">{{ item.academicTerm.name }}</p>
|
||||
<ion-label class="title"> {{ 'name' | thingTranslate: item }}</ion-label>
|
||||
@if (item.academicTerm) {
|
||||
<p class="title-sub">{{ item.academicTerm.name }}</p>
|
||||
}
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -20,11 +20,32 @@ import {map} from 'rxjs/operators';
|
||||
import {DataRoutingService} from '../../data-routing.service';
|
||||
import {Router} from '@angular/router';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {AsyncPipe, TitleCasePipe} from '@angular/common';
|
||||
import {IonCard, IonCardContent, IonCardHeader, IonChip, IonIcon, IonLabel} from '@ionic/angular/standalone';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ThingTranslateModule} from '../../../../translation/thing-translate.module';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {MapWidgetComponent} from '../../../map/widget/map-widget.component';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-date-series-detail-content',
|
||||
templateUrl: 'date-series-detail-content.html',
|
||||
styleUrls: ['date-series-detail-content.scss'],
|
||||
styleUrl: 'date-series-detail-content.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
AsyncPipe,
|
||||
IonChip,
|
||||
IonIcon,
|
||||
IonLabel,
|
||||
TranslateModule,
|
||||
ThingTranslateModule,
|
||||
TitleCasePipe,
|
||||
MomentModule,
|
||||
MapWidgetComponent,
|
||||
IonCardHeader,
|
||||
IonCardContent,
|
||||
IonCard,
|
||||
],
|
||||
})
|
||||
export class DateSeriesDetailContentComponent implements OnInit {
|
||||
@Input() item: SCDateSeries;
|
||||
|
||||
@@ -15,52 +15,54 @@
|
||||
<ng-container *ngIf="isInCalendar | async; else add">
|
||||
<ion-chip outline="true" color="success" (click)="removeFromCalendar()">
|
||||
<ion-icon name="event_available" fill="true"></ion-icon>
|
||||
<ion-label>{{'chips.addEvent.addedToEvents' | translate}}</ion-label>
|
||||
<ion-label>{{ 'chips.addEvent.addedToEvents' | translate }}</ion-label>
|
||||
</ion-chip>
|
||||
</ng-container>
|
||||
<ng-template #add>
|
||||
<ion-chip outline="true" color="primary" (click)="addToCalendar()">
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
<ion-label>{{'chips.addEvent.addEvent' | translate}}</ion-label>
|
||||
<ion-label>{{ 'chips.addEvent.addEvent' | translate }}</ion-label>
|
||||
</ion-chip>
|
||||
</ng-template>
|
||||
<stapps-simple-card
|
||||
title="{{ 'duration' | propertyNameTranslate : item | titlecase }}"
|
||||
[content]="[item.duration | amDuration : 'minutes']"
|
||||
title="{{ 'duration' | propertyNameTranslate: item | titlecase }}"
|
||||
[content]="[item.duration | amDuration: 'minutes']"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.dates.length > 1; else single_event"
|
||||
title="{{ 'dates' | propertyNameTranslate : item | titlecase }}"
|
||||
title="{{ 'dates' | propertyNameTranslate: item | titlecase }}"
|
||||
content="{{ 'data.chips.add_events.popover.AT' | translate | titlecase }} {{
|
||||
item.dates[0] | amDateFormat : 'HH:mm ddd'
|
||||
item.dates[0] | amDateFormat: 'HH:mm ddd'
|
||||
}} {{ 'data.chips.add_events.popover.UNTIL' | translate }} {{
|
||||
item.dates[item.dates.length - 1] | amDateFormat : 'll'
|
||||
item.dates[item.dates.length - 1] | amDateFormat: 'll'
|
||||
}}"
|
||||
></stapps-simple-card>
|
||||
<ng-template #single_event>
|
||||
<stapps-simple-card
|
||||
title="{{ 'dates' | propertyNameTranslate : item | titlecase }}"
|
||||
title="{{ 'dates' | propertyNameTranslate: item | titlecase }}"
|
||||
content="{{ 'data.chips.add_events.popover.AT' | translate | titlecase }} {{
|
||||
item.dates[item.dates.length - 1] | amDateFormat : 'll, HH:mm'
|
||||
item.dates[item.dates.length - 1] | amDateFormat: 'll, HH:mm'
|
||||
}}"
|
||||
></stapps-simple-card>
|
||||
</ng-template>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.performers"
|
||||
[title]="'performers' | propertyNameTranslate : item.performers | titlecase"
|
||||
[title]="'performers' | propertyNameTranslate: item.performers | titlecase"
|
||||
[content]="item.performers"
|
||||
></stapps-simple-card>
|
||||
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
||||
<ion-card>
|
||||
<ion-card-header> {{ 'event' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||
<ion-card-header> {{ 'event' | propertyNameTranslate: item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-data-list-item [item]="$any(item.event)"></stapps-data-list-item>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card *ngIf="item.inPlace">
|
||||
<ion-card-header> {{ 'inPlace' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-data-list-item [item]="$any(item.inPlace)"></stapps-data-list-item>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
@if (item.inPlace) {
|
||||
<ion-card>
|
||||
<ion-card-header> {{ 'inPlace' | propertyNameTranslate: item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-data-list-item [item]="$any(item.inPlace)"></stapps-data-list-item>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
}
|
||||
<stapps-map-widget *ngIf="item.inPlace?.geo" [place]="item.inPlace"></stapps-map-widget>
|
||||
|
||||
@@ -17,22 +17,22 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'event.name' | thingTranslate : item }}</ion-label>
|
||||
<ion-label class="title">{{ 'event.name' | thingTranslate: item }}</ion-label>
|
||||
<p>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
<span *ngIf="item.dates[0] && item.dates[item.dates.length - 1]">
|
||||
<span *ngIf="item.repeatFrequency">
|
||||
{{ item.repeatFrequency | durationLocalized : true | sentencecase }}, {{ item.dates[0] |
|
||||
dateFormat : 'weekday:long' }}
|
||||
{{ item.repeatFrequency | durationLocalized: true | sentencecase }},
|
||||
{{ item.dates[0] | dateFormat: 'weekday:long' }}
|
||||
</span>
|
||||
<span>
|
||||
({{ item.dates[0] | dateFormat }} - {{ item.dates[item.dates.length - 1] | dateFormat }})
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
<ion-note *ngIf="item.event.type === 'academic event'"
|
||||
>{{ 'categories' | thingTranslate : item.event | join : ', ' }}</ion-note
|
||||
>
|
||||
<ion-note *ngIf="item.event.type === 'academic event'">{{
|
||||
'categories' | thingTranslate: item.event | join: ', '
|
||||
}}</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col width-20 text-right>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.type === 'academic event' && item.categories"
|
||||
[title]="'categories' | propertyNameTranslate : item | titlecase"
|
||||
[content]="'categories' | thingTranslate : item"
|
||||
[title]="'categories' | propertyNameTranslate: item | titlecase"
|
||||
[content]="'categories' | thingTranslate: item"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
@@ -25,23 +25,23 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.performers"
|
||||
[title]="'performers' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'performers' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.performers"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.organizers"
|
||||
[title]="'organizers' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'organizers' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.organizers"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.type === 'academic event' && item.majors | titlecase"
|
||||
[title]="'majors' | propertyNameTranslate : item"
|
||||
[title]="'majors' | propertyNameTranslate: item"
|
||||
[content]="item.majors"
|
||||
></stapps-simple-card>
|
||||
<ion-card *ngIf="item.catalogs">
|
||||
<ion-card-header
|
||||
>{{ $any('superCatalogs' | propertyNameTranslate : 'catalog') | titlecase }}</ion-card-header
|
||||
>
|
||||
<ion-card-header>{{
|
||||
$any('superCatalogs' | propertyNameTranslate: 'catalog') | titlecase
|
||||
}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<event-route-path
|
||||
*ngFor="let item of item.catalogs"
|
||||
@@ -49,7 +49,7 @@
|
||||
[itemsAfterCollapse]="1"
|
||||
[itemsBeforeCollapse]="0"
|
||||
[items]="[undefined, item]"
|
||||
[more]="item.uid | lazyThing : 'superCatalogs'"
|
||||
[more]="item.uid | lazyThing: 'superCatalogs'"
|
||||
>
|
||||
</event-route-path>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
[itemsBeforeCollapse]="itemsBeforeCollapse"
|
||||
>
|
||||
<ion-breadcrumb *ngFor="let item of items">
|
||||
<ion-label class="crumb-label" *ngIf="item" [routerLink]="['/data-detail', item.uid]"
|
||||
>{{ 'name' | thingTranslate : $any(item) }}</ion-label
|
||||
>
|
||||
<ion-label class="crumb-label" *ngIf="item" [routerLink]="['/data-detail', item.uid]">{{
|
||||
'name' | thingTranslate: $any(item)
|
||||
}}</ion-label>
|
||||
</ion-breadcrumb>
|
||||
</ion-breadcrumbs>
|
||||
<ion-popover #popover>
|
||||
@@ -55,6 +55,6 @@
|
||||
|
||||
<ng-template #popoverItem let-item="item">
|
||||
<ion-item *ngIf="item" [routerLink]="['/data-detail', item.uid]" (click)="popover.dismiss()">
|
||||
{{ 'name' | thingTranslate : $any(item) }}
|
||||
{{ 'name' | thingTranslate: $any(item) }}
|
||||
</ion-item>
|
||||
</ng-template>
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">
|
||||
{{ 'name' | thingTranslate : item }}: {{ 'name' | thingTranslate : item.data }}
|
||||
{{ 'name' | thingTranslate: item }}: {{ 'name' | thingTranslate: item.data }}
|
||||
</ion-label>
|
||||
<p *ngIf="item.data.description" class="title-sub">
|
||||
<stapps-long-inline-text
|
||||
[text]="'description' | thingTranslate : item.data"
|
||||
[text]="'description' | thingTranslate: item.data"
|
||||
[size]="80"
|
||||
></stapps-long-inline-text>
|
||||
</p>
|
||||
<ion-note>{{ 'type' | thingTranslate : item }} ({{ 'type' | thingTranslate : item.data }})</ion-note>
|
||||
<ion-note>{{ 'type' | thingTranslate: item }} ({{ 'type' | thingTranslate: item.data }})</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col width-20 text-right>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ion-card-content [innerHtml]="item.description"> </ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header> {{ 'sameAs' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||
<ion-card-header> {{ 'sameAs' | propertyNameTranslate: item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-external-link [link]="item.sameAs" [text]="item.name"></stapps-external-link>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
|
||||
<div *ngIf="!item.categories.includes('news'); else news">
|
||||
<stapps-simple-card
|
||||
[title]="'messageBody' | propertyNameTranslate : item | titlecase"
|
||||
[content]="'messageBody' | thingTranslate : item"
|
||||
[title]="'messageBody' | propertyNameTranslate: item | titlecase"
|
||||
[content]="'messageBody' | thingTranslate: item"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
[title]="'audiences' | propertyNameTranslate : item | titlecase"
|
||||
[content]="'audiences' | thingTranslate : item"
|
||||
[title]="'audiences' | propertyNameTranslate: item | titlecase"
|
||||
[content]="'audiences' | thingTranslate: item"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.datePublished"
|
||||
[title]="'datePublished' | propertyNameTranslate : item | titlecase"
|
||||
[content]="item.datePublished | amDateFormat : 'll'"
|
||||
[title]="'datePublished' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.datePublished | amDateFormat: 'll'"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.authors"
|
||||
[title]="'authors' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'authors' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.authors"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.publishers"
|
||||
[title]="'publishers' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'publishers' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.publishers"
|
||||
></stapps-simple-card>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card content="{{ item.messageBody }}"></stapps-simple-card>
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header> {{ 'sameAs' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||
<ion-card-header> {{ 'sameAs' | propertyNameTranslate: item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-external-link [link]="item.sameAs" [text]="item.name"></stapps-external-link>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p *ngIf="item.messageBody">
|
||||
<stapps-long-inline-text [text]="item.messageBody" [size]="80"></stapps-long-inline-text>
|
||||
</p>
|
||||
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
|
||||
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.inPlace">
|
||||
<ion-card-header> {{ 'inPlace' | propertyNameTranslate : item | titlecase }} </ion-card-header>
|
||||
<ion-card-header> {{ 'inPlace' | propertyNameTranslate: item | titlecase }} </ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate : item.inPlace }}</a>
|
||||
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate: item.inPlace }}</a>
|
||||
<stapps-address-detail
|
||||
*ngIf="item.inPlace.address"
|
||||
[address]="item.inPlace.address"
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
|
||||
<p *ngIf="item.description" class="title-sub">{{ 'description' | thingTranslate : item }}</p>
|
||||
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p *ngIf="item.description" class="title-sub">{{ 'description' | thingTranslate: item }}</p>
|
||||
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col width-20 text-right *ngIf="item.inPlace">
|
||||
<span *ngIf="item.inPlace">
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
{{ 'name' | thingTranslate : item.inPlace }}
|
||||
{{ 'name' | thingTranslate: item.inPlace }}
|
||||
</span>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
|
||||
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="!item.sameAs"
|
||||
[title]="'name' | propertyNameTranslate : item | sentencecase"
|
||||
[content]="'name' | thingTranslate : item"
|
||||
[title]="'name' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="'name' | thingTranslate: item"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.sourceOrganization"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
|
||||
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.sourceOrganization"
|
||||
></stapps-simple-card>
|
||||
|
||||
<ion-card *ngIf="item.authors && item.authors.length > 0">
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
|
||||
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -55,30 +55,30 @@
|
||||
<stapps-simple-card
|
||||
*ngIf="item.firstPublished && item.lastPublished"
|
||||
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
|
||||
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
<ion-card *ngIf="item.publications">
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p *ngFor="let publication of item.publications">
|
||||
{{ publication.locations | join : ', ' }} {{ publication.locations && publication.publisher ? ':' : ''
|
||||
}} {{ publication.publisher }}
|
||||
{{ publication.locations | join: ', ' }}
|
||||
{{ publication.locations && publication.publisher ? ':' : '' }} {{ publication.publisher }}
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card *ngIf="item.categories">
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
|
||||
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.ISSNs"
|
||||
[title]="'ISSNs' | propertyNameTranslate : item | sentencecase"
|
||||
[content]="item.ISSNs | join : ', '"
|
||||
[title]="'ISSNs' | propertyNameTranslate: item | sentencecase"
|
||||
[content]="item.ISSNs | join: ', '"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
|
||||
@@ -16,20 +16,20 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2 class="name">{{ 'name' | thingTranslate : item }}</h2>
|
||||
<h2 class="name">{{ 'name' | thingTranslate: item }}</h2>
|
||||
<p>
|
||||
<ng-container *ngFor="let author of item.authors">
|
||||
{{ 'name' | thingTranslate : author }}</ng-container
|
||||
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
|
||||
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">, </ng-container>
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange"
|
||||
>{{ item.firstPublished }}</ng-container
|
||||
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
|
||||
item.firstPublished
|
||||
}}</ng-container
|
||||
><ng-template #dateRange
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished"
|
||||
>{{ [item.firstPublished, item.lastPublished] | join : ' - ' }}</ng-container
|
||||
></ng-template
|
||||
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
|
||||
[item.firstPublished, item.lastPublished] | join: ' - '
|
||||
}}</ng-container></ng-template
|
||||
>
|
||||
</p>
|
||||
<ion-note> {{ 'categories' | thingTranslate : item }} </ion-note>
|
||||
<ion-note> {{ 'categories' | thingTranslate: item }} </ion-note>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -17,29 +17,29 @@
|
||||
<ion-card *ngFor="let contactPoint of contactPoints; let i = index">
|
||||
<ion-card-header>
|
||||
<ng-container *ngIf="contactPoints.length > 1">{{ i + 1 }}.</ng-container>
|
||||
{{ 'type' | thingTranslate : contactPoint | titlecase }}
|
||||
{{ 'type' | thingTranslate: contactPoint | titlecase }}
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<p *ngIf="contactPoint.telephone">
|
||||
{{ 'telephone' | propertyNameTranslate : contactPoint | titlecase }}:
|
||||
{{ 'telephone' | propertyNameTranslate: contactPoint | titlecase }}:
|
||||
<a [href]="'tel:' + contactPoint.telephone">{{ contactPoint.telephone }}</a>
|
||||
</p>
|
||||
<p *ngIf="contactPoint.email">
|
||||
{{ 'email' | propertyNameTranslate : contactPoint | titlecase }}:
|
||||
{{ 'email' | propertyNameTranslate: contactPoint | titlecase }}:
|
||||
<a [href]="'mailto:' + contactPoint.email">{{ contactPoint.email }}</a>
|
||||
</p>
|
||||
<p *ngIf="contactPoint.faxNumber">
|
||||
{{ 'faxNumber' | propertyNameTranslate : contactPoint | titlecase }}: {{ contactPoint.faxNumber }}
|
||||
{{ 'faxNumber' | propertyNameTranslate: contactPoint | titlecase }}: {{ contactPoint.faxNumber }}
|
||||
</p>
|
||||
<p *ngIf="contactPoint.officeHours">
|
||||
{{ 'officeHours' | propertyNameTranslate : contactPoint | titlecase }}: {{ contactPoint.officeHours }}
|
||||
{{ 'officeHours' | propertyNameTranslate: contactPoint | titlecase }}: {{ contactPoint.officeHours }}
|
||||
</p>
|
||||
<p *ngIf="contactPoint.url">
|
||||
{{ 'url' | propertyNameTranslate : contactPoint | titlecase }}:
|
||||
{{ 'url' | propertyNameTranslate: contactPoint | titlecase }}:
|
||||
<a [href]="contactPoint.url">{{ contactPoint.url }}</a>
|
||||
</p>
|
||||
<p *ngIf="contactPoint.areaServed">
|
||||
{{ 'areaServed' | propertyNameTranslate : contactPoint | titlecase }}:
|
||||
{{ 'areaServed' | propertyNameTranslate: contactPoint | titlecase }}:
|
||||
<a [routerLink]="['/data-detail', contactPoint.areaServed.uid]">{{ contactPoint.areaServed.name }}</a>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
@@ -47,6 +47,6 @@
|
||||
</ng-container>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.jobTitles?.length > 0"
|
||||
[title]="'jobTitles' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'jobTitles' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.jobTitles"
|
||||
></stapps-simple-card>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">
|
||||
{{ 'name' | thingTranslate : item }}
|
||||
{{ 'name' | thingTranslate: item }}
|
||||
<span *ngIf="item.honorificPrefix">, {{ item.honorificPrefix }}</span>
|
||||
</ion-label>
|
||||
<p *ngIf="item.telephone || item.email">
|
||||
|
||||
@@ -26,7 +26,10 @@ import {SettingsProvider} from '../../../../../settings/settings.provider';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PlaceMensaService {
|
||||
constructor(private dataProvider: DataProvider, readonly settingsProvider: SettingsProvider) {}
|
||||
constructor(
|
||||
private dataProvider: DataProvider,
|
||||
readonly settingsProvider: SettingsProvider,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Fetches all dishes for this building
|
||||
@@ -39,10 +42,13 @@ export class PlaceMensaService {
|
||||
Array.from({length: days})
|
||||
.map((_, i) => i)
|
||||
.map(i => moment().add(i, 'days').toISOString())
|
||||
.reduce((accumulator, item) => {
|
||||
accumulator[item] = item;
|
||||
return accumulator;
|
||||
}, {} as Record<SCISO8601Date, SCISO8601Date>),
|
||||
.reduce(
|
||||
(accumulator, item) => {
|
||||
accumulator[item] = item;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<SCISO8601Date, SCISO8601Date>,
|
||||
),
|
||||
date => ({
|
||||
filter: {
|
||||
arguments: {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
<ng-container *ngIf="(dishes | json) !== '{}'; else empty">
|
||||
<ion-segment [(ngModel)]="selectedDay" mode="md">
|
||||
<ion-segment-button *ngFor="let day of dishes | keyvalue" [value]="day.key">
|
||||
<ion-label class="ion-hide-sm-down"
|
||||
>{{ day.key | dateFormat : 'weekday:long,month:numeric,day:numeric' }}</ion-label
|
||||
>
|
||||
<ion-label class="ion-hide-sm-up"
|
||||
>{{ day.key | dateFormat : 'weekday:short,month:numeric,day:numeric' }}</ion-label
|
||||
>
|
||||
<ion-label class="ion-hide-sm-down">{{
|
||||
day.key | dateFormat: 'weekday:long,month:numeric,day:numeric'
|
||||
}}</ion-label>
|
||||
<ion-label class="ion-hide-sm-up">{{
|
||||
day.key | dateFormat: 'weekday:short,month:numeric,day:numeric'
|
||||
}}</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
<ng-container [ngSwitch]="selectedDay">
|
||||
@@ -33,8 +33,10 @@
|
||||
<ng-container *ngFor="let section of date.value | keyvalue">
|
||||
<ion-list-header *ngIf="section.value[0].menuSection" lines="inset">
|
||||
<ion-label class="title">
|
||||
{{ 'data.types.dish.detail.' + section.value[0].menuSection.name | translate | titlecase
|
||||
}} {{ section.value[0].menuSection.servingHours }}
|
||||
{{
|
||||
'data.types.dish.detail.' + section.value[0].menuSection.name | translate | titlecase
|
||||
}}
|
||||
{{ section.value[0].menuSection.servingHours }}
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ng-container *ngFor="let dish of section.value; index as j">
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
<stapps-simple-card
|
||||
*ngIf="item.eventsStartDate && item.eventsEndDate"
|
||||
[title]="
|
||||
('eventsStartDate' | propertyNameTranslate : item | titlecase) +
|
||||
('eventsStartDate' | propertyNameTranslate: item | titlecase) +
|
||||
' - ' +
|
||||
('eventsEndDate' | propertyNameTranslate : item | titlecase)
|
||||
"
|
||||
[content]="
|
||||
(item.eventsStartDate | amDateFormat : 'll') + ' - ' + (item.eventsEndDate | amDateFormat : 'll')
|
||||
('eventsEndDate' | propertyNameTranslate: item | titlecase)
|
||||
"
|
||||
[content]="(item.eventsStartDate | amDateFormat: 'll') + ' - ' + (item.eventsEndDate | amDateFormat: 'll')"
|
||||
></stapps-simple-card>
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p class="title-sub">
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
<span>{{ item.startDate | dateFormat }} - {{ item.endDate | dateFormat }}</span>
|
||||
</p>
|
||||
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
|
||||
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
|
||||
<stapps-simple-card
|
||||
*ngIf="item.actors"
|
||||
[title]="'actors' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'actors' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.actors"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.authors"
|
||||
[title]="'authors' | propertyNameTranslate : item | titlecase"
|
||||
[title]="'authors' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.authors"
|
||||
></stapps-simple-card>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.datePublished"
|
||||
[title]="'datePublished' | propertyNameTranslate : item | titlecase"
|
||||
[content]="item.datePublished | amDateFormat : 'll'"
|
||||
[title]="'datePublished' | propertyNameTranslate: item | titlecase"
|
||||
[content]="item.datePublished | amDateFormat: 'll'"
|
||||
>
|
||||
</stapps-simple-card>
|
||||
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p *ngIf="item.description" class="title-sub">
|
||||
<stapps-long-inline-text
|
||||
[text]="'description' | thingTranslate : item"
|
||||
[text]="'description' | thingTranslate: item"
|
||||
[size]="80"
|
||||
></stapps-long-inline-text>
|
||||
</p>
|
||||
<p *ngIf="item.duration">
|
||||
{{ 'duration' | propertyNameTranslate : item | titlecase }}: {{ item.duration | amDuration :
|
||||
'seconds' }}
|
||||
{{ 'duration' | propertyNameTranslate: item | titlecase }}:
|
||||
{{ item.duration | amDuration: 'seconds' }}
|
||||
</p>
|
||||
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
|
||||
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -44,12 +44,12 @@
|
||||
interface="popover"
|
||||
required="true"
|
||||
>
|
||||
<ion-select-option value="Comment"
|
||||
>{{ 'feedback.form.type.values.comment' | translate }}</ion-select-option
|
||||
>
|
||||
<ion-select-option value="Bug"
|
||||
>{{ 'feedback.form.type.values.bug' | translate }}</ion-select-option
|
||||
>
|
||||
<ion-select-option value="Comment">{{
|
||||
'feedback.form.type.values.comment' | translate
|
||||
}}</ion-select-option>
|
||||
<ion-select-option value="Bug">{{
|
||||
'feedback.form.type.values.bug' | translate
|
||||
}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
@@ -91,9 +91,9 @@
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-label
|
||||
><a style="display: contents" [routerLink]="['/about/privacy']"
|
||||
>{{ 'feedback.form.termsAgree.1' | translate }}</a
|
||||
></ion-label
|
||||
><a style="display: contents" [routerLink]="['/about/privacy']">{{
|
||||
'feedback.form.termsAgree.1' | translate
|
||||
}}</a></ion-label
|
||||
>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
@@ -110,9 +110,9 @@
|
||||
<ion-card>
|
||||
<ion-card-title>
|
||||
<ion-button expand="block" fill="clear" (click)="toggleShowMetaData()">
|
||||
<ng-container *ngIf="!showMetaData; else hide"
|
||||
>{{ 'feedback.form.protocolData.show' | translate }}</ng-container
|
||||
>
|
||||
<ng-container *ngIf="!showMetaData; else hide">{{
|
||||
'feedback.form.protocolData.show' | translate
|
||||
}}</ng-container>
|
||||
<ng-template #hide>{{ 'feedback.form.protocolData.hide' | translate }}</ng-template>
|
||||
</ion-button>
|
||||
</ion-card-title>
|
||||
|
||||
@@ -67,6 +67,6 @@
|
||||
</ion-row>
|
||||
<ion-row *ngIf="holding.dueDate">
|
||||
<ion-col size="3">{{ 'hebisSearch.daia.dueDate' | translate }}</ion-col>
|
||||
<ion-col size="9">{{ holding.dueDate | amDateFormat : 'll' }}</ion-col>
|
||||
<ion-col size="9">{{ holding.dueDate | amDateFormat: 'll' }}</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
</ion-item>
|
||||
<stapps-simple-card
|
||||
*ngIf="item.description"
|
||||
[title]="'description' | propertyNameTranslate : item | titlecase"
|
||||
[content]="'description' | thingTranslate : item"
|
||||
[title]="'description' | propertyNameTranslate: item | titlecase"
|
||||
[content]="'description' | thingTranslate: item"
|
||||
></stapps-simple-card>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
@@ -24,26 +24,26 @@
|
||||
|
||||
<ion-content>
|
||||
<p *ngIf="name; else loading">
|
||||
{{ 'library.account.greeting' | translate }} {{ name | firstLastName }}! {{
|
||||
'library.account.login.success' | translate }}
|
||||
{{ 'library.account.greeting' | translate }} {{ name | firstLastName }}!
|
||||
{{ 'library.account.login.success' | translate }}
|
||||
</p>
|
||||
<ng-template #loading>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
</ng-template>
|
||||
<ion-item [routerLink]="['profile']">
|
||||
<ion-icon name="account_circle" slot="start"></ion-icon>{{ 'library.account.pages.profile.title' |
|
||||
translate | titlecase }}
|
||||
<ion-icon name="account_circle" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.profile.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['holds']">
|
||||
<ion-icon name="collections_bookmark" slot="start"></ion-icon>{{ 'library.account.pages.holds.title' |
|
||||
translate | titlecase }}
|
||||
<ion-icon name="collections_bookmark" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.holds.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['checked-out']">
|
||||
<ion-icon name="book" slot="start"></ion-icon>{{ 'library.account.pages.checked_out.title' | translate |
|
||||
titlecase }}
|
||||
<ion-icon name="book" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.checked_out.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['fines']">
|
||||
<ion-icon name="request_quote" slot="start"></ion-icon>{{ 'library.account.pages.fines.title' | translate
|
||||
| titlecase }}
|
||||
<ion-icon name="request_quote" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.fines.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<p *ngIf="fee[property]">
|
||||
{{ 'library.account.pages.fines.labels' + '.' + property | translate }}:
|
||||
<ng-container *ngIf="!['date'].includes(property); else date"> {{ fee[property] }} </ng-container>
|
||||
<ng-template #date> {{ fee[property] | amDateFormat : 'll' }} </ng-template>
|
||||
<ng-template #date> {{ fee[property] | amDateFormat: 'll' }} </ng-template>
|
||||
</p></ng-container
|
||||
>
|
||||
</ion-label>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<ng-container *ngIf="!['endtime', 'duedate'].includes(property); else date">
|
||||
{{ item[property] }}
|
||||
</ng-container>
|
||||
<ng-template #date> {{ item[property] | amDateFormat : 'll' }} </ng-template>
|
||||
<ng-template #date> {{ item[property] | amDateFormat: 'll' }} </ng-template>
|
||||
</p>
|
||||
</ng-container>
|
||||
<span class="ion-float-right">
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
{{ 'library.account.pages.profile.values.unlimited' | translate }}
|
||||
</ng-container>
|
||||
<ng-template #exactDate>
|
||||
{{ 'library.account.pages.profile.values.expires' | translate }}: {{ patron[property] |
|
||||
amDateFormat : 'll' }}
|
||||
{{ 'library.account.pages.profile.values.expires' | translate }}: {{
|
||||
patron[property] | amDateFormat: 'll'
|
||||
}}
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</ion-col>
|
||||
|
||||
@@ -402,8 +402,8 @@ export class MapPageComponent implements OnInit {
|
||||
this.locationStatus?.location === 'denied'
|
||||
? location.NOT_ALLOWED
|
||||
: this.locationStatus?.location === 'granted'
|
||||
? unknownError
|
||||
: location.NOT_ENABLED
|
||||
? unknownError
|
||||
: location.NOT_ENABLED
|
||||
}`,
|
||||
buttons: ['OK'],
|
||||
})
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
[leafletOptions]="options"
|
||||
></div>
|
||||
@if (showExpandButton) {
|
||||
<div class="map-buttons">
|
||||
<ion-button color="primary" shape="round" size="small" [geoNavigation]="place">
|
||||
<ion-icon name="directions" slot="start"></ion-icon>
|
||||
{{'map.directions.TITLE' | translate}}
|
||||
</ion-button>
|
||||
<ion-button color="primary" shape="round" size="small" [routerLink]="['/map', place.uid]">
|
||||
<ion-icon name="zoom_out_map"></ion-icon>
|
||||
</ion-button>
|
||||
</div>
|
||||
<div class="map-buttons">
|
||||
<ion-button color="primary" shape="round" size="small" [geoNavigation]="place">
|
||||
<ion-icon name="directions" slot="start"></ion-icon>
|
||||
{{ 'map.directions.TITLE' | translate }}
|
||||
</ion-button>
|
||||
<ion-button color="primary" shape="round" size="small" [routerLink]="['/map', place.uid]">
|
||||
<ion-icon name="zoom_out_map"></ion-icon>
|
||||
</ion-button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
<div>
|
||||
<ion-list-header class="h3">
|
||||
<ion-label>
|
||||
<span *ngIf="facet.info.onlyOnType"><b>{{ facet.info.onlyOnType | titlecase }}</b> / </span>
|
||||
<span *ngIf="facet.info.onlyOnType"
|
||||
><b>{{ facet.info.onlyOnType | titlecase }}</b> /
|
||||
</span>
|
||||
{{ facet.info.field | titlecase }}
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
@@ -78,9 +80,12 @@
|
||||
}"
|
||||
class="filter-item-label"
|
||||
>
|
||||
({{ bucket.count }}) {{ facet.field === 'type' ? (getTranslatedPropertyValue($any(bucket.key),
|
||||
'type') | titlecase) : (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key)
|
||||
| titlecase) }}
|
||||
({{ bucket.count }})
|
||||
{{
|
||||
facet.field === 'type'
|
||||
? (getTranslatedPropertyValue($any(bucket.key), 'type') | titlecase)
|
||||
: (getTranslatedPropertyValue(facet.onlyOnType, facet.field, bucket.key) | titlecase)
|
||||
}}
|
||||
</ion-checkbox>
|
||||
</ion-item>
|
||||
<ion-button
|
||||
|
||||
@@ -25,28 +25,29 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
@if (menu) {
|
||||
<ion-content>
|
||||
@for (category of menu; track category; let isFirst = first) {
|
||||
<ion-list>
|
||||
@if (category.title !== '') {
|
||||
<ion-item
|
||||
[rootLink]="category.route"
|
||||
[redirectedFrom]="isFirst ? '/' : category.route"
|
||||
lines="none"
|
||||
class="menu-category"
|
||||
>
|
||||
<ion-icon slot="end" [name]="category.icon"></ion-icon>
|
||||
<ion-label> {{ category.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
} @for (item of category.items; track item) {
|
||||
<ion-item [rootLink]="item.route" [redirectedFrom]="item.route">
|
||||
<ion-icon slot="end" [name]="item.icon"></ion-icon>
|
||||
<ion-label> {{ item.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
<ion-content>
|
||||
@for (category of menu; track category; let isFirst = first) {
|
||||
<ion-list>
|
||||
@if (category.title !== '') {
|
||||
<ion-item
|
||||
[rootLink]="category.route"
|
||||
[redirectedFrom]="isFirst ? '/' : category.route"
|
||||
lines="none"
|
||||
class="menu-category"
|
||||
>
|
||||
<ion-icon slot="end" [name]="category.icon"></ion-icon>
|
||||
<ion-label> {{ category.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
}
|
||||
@for (item of category.items; track item) {
|
||||
<ion-item [rootLink]="item.route" [redirectedFrom]="item.route">
|
||||
<ion-icon slot="end" [name]="item.icon"></ion-icon>
|
||||
<ion-label> {{ item.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
}
|
||||
</ion-list>
|
||||
}
|
||||
</ion-list>
|
||||
}
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
}
|
||||
</ion-menu>
|
||||
<ion-router-outlet id="main"></ion-router-outlet>
|
||||
|
||||
@@ -22,7 +22,10 @@ import {NGXLogger} from 'ngx-logger';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NavigationService {
|
||||
constructor(private configProvider: ConfigProvider, private logger: NGXLogger) {}
|
||||
constructor(
|
||||
private configProvider: ConfigProvider,
|
||||
private logger: NGXLogger,
|
||||
) {}
|
||||
|
||||
async getMenu() {
|
||||
let menu: SCAppConfigurationMenuCategory[] = [];
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
</ion-tab-button>
|
||||
</ion-menu-toggle>
|
||||
@for (category of menu; track category) {
|
||||
<ion-tab-button [rootLink]="category.route" [redirectedFrom]="category.route" [tab]="category.title">
|
||||
<ion-icon [name]="category.icon"></ion-icon>
|
||||
<ion-label>{{ category.translations[language].title | titlecase }}</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button [rootLink]="category.route" [redirectedFrom]="category.route" [tab]="category.title">
|
||||
<ion-icon [name]="category.icon"></ion-icon>
|
||||
<ion-label>{{ category.translations[language].title | titlecase }}</ion-label>
|
||||
</ion-tab-button>
|
||||
}
|
||||
</ion-tab-bar>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@for (setting of settings; track setting) {
|
||||
<stapps-chip-filter
|
||||
[displayValue]="setting | settingValueTranslate | titlecase"
|
||||
[value]="setting"
|
||||
[active]="!!filtersMap.get($any(setting.name))"
|
||||
(toggle)="stateChanged($any($event))"
|
||||
>
|
||||
</stapps-chip-filter>
|
||||
<stapps-chip-filter
|
||||
[displayValue]="setting | settingValueTranslate | titlecase"
|
||||
[value]="setting"
|
||||
[active]="!!filtersMap.get($any(setting.name))"
|
||||
(toggle)="stateChanged($any($event))"
|
||||
>
|
||||
</stapps-chip-filter>
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user