From c3bc227a3ca4a295b2b31bfe7fd34830b33c9f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jovan=20Kruni=C4=87?= Date: Mon, 15 Apr 2019 13:41:27 +0200 Subject: [PATCH] fix(data): fix template and other consistency issues --- src/app/modules/data/data.module.ts | 4 +- .../data/detail/data-detail-content.html | 40 ++++++++----------- .../data/elements/long-inline-text.html | 2 +- .../data/elements/simple-card.component.ts | 2 +- src/app/modules/data/list/data-list-item.html | 29 ++++++++------ .../data/types/article/article-list-item.html | 4 +- .../data/types/catalog/catalog-list-item.html | 4 +- .../types/event/event-detail-content.html | 14 +++++-- .../data/types/event/event-list-item.html | 12 ++++-- .../types/favorite/favorite-list-item.html | 2 +- .../organization/organization-list-item.html | 14 +++++++ .../types/place/place-detail-content.html | 18 ++++----- .../data/types/video/video-list-item.html | 2 +- 13 files changed, 83 insertions(+), 64 deletions(-) diff --git a/src/app/modules/data/data.module.ts b/src/app/modules/data/data.module.ts index 41cfb025..a35feb21 100644 --- a/src/app/modules/data/data.module.ts +++ b/src/app/modules/data/data.module.ts @@ -32,7 +32,7 @@ import {AddressDetailComponent} from './elements/address-detail.component'; import {LongInlineText} from './elements/long-inline-text.component'; import {OriginDetailComponent} from './elements/origin-detail.component'; import {OriginInListComponent} from './elements/origin-in-list.component'; -import {CardOfArrayComponent} from './elements/simple-card.component'; +import {SimpleCardComponent} from './elements/simple-card.component'; import {DataListItem} from './list/data-list-item.component'; import {DataListComponent} from './list/data-list.component'; import {StAppsWebHttpClient} from './stapps-web-http-client.provider'; @@ -68,7 +68,7 @@ import {VideoListItem} from './types/video/video-list-item.component'; AddressDetailComponent, ArticleDetailContentComponent, ArticleListItem, - CardOfArrayComponent, + SimpleCardComponent, CatalogDetailContentComponent, CatalogListItem, DataDetailComponent, diff --git a/src/app/modules/data/detail/data-detail-content.html b/src/app/modules/data/detail/data-detail-content.html index a5745a70..8d2815bb 100644 --- a/src/app/modules/data/detail/data-detail-content.html +++ b/src/app/modules/data/detail/data-detail-content.html @@ -1,27 +1,19 @@ -
- - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + +
diff --git a/src/app/modules/data/elements/long-inline-text.html b/src/app/modules/data/elements/long-inline-text.html index 2864a1d6..e51f40eb 100644 --- a/src/app/modules/data/elements/long-inline-text.html +++ b/src/app/modules/data/elements/long-inline-text.html @@ -1 +1 @@ -{{text | slice:0:size}}... +{{text | slice:0:size}}... diff --git a/src/app/modules/data/elements/simple-card.component.ts b/src/app/modules/data/elements/simple-card.component.ts index ea25da18..05125ac5 100644 --- a/src/app/modules/data/elements/simple-card.component.ts +++ b/src/app/modules/data/elements/simple-card.component.ts @@ -19,7 +19,7 @@ import {isThing, SCThing} from '@openstapps/core'; selector: 'stapps-simple-card', templateUrl: 'simple-card.html', }) -export class CardOfArrayComponent { +export class SimpleCardComponent { areThings: boolean = false; @Input() content: string | string[] | SCThing[]; @Input() isMarkdown: boolean = false; diff --git a/src/app/modules/data/list/data-list-item.html b/src/app/modules/data/list/data-list-item.html index a70f3a39..a2d597a1 100644 --- a/src/app/modules/data/list/data-list-item.html +++ b/src/app/modules/data/list/data-list-item.html @@ -2,27 +2,30 @@ {{item.name}} - +
- - - - - - - - - - + + + + + + + + + + + + + +

{{item.name}}

- +

{{item.type}}
diff --git a/src/app/modules/data/types/article/article-list-item.html b/src/app/modules/data/types/article/article-list-item.html index 4e39050b..3167cc24 100644 --- a/src/app/modules/data/types/article/article-list-item.html +++ b/src/app/modules/data/types/article/article-list-item.html @@ -3,13 +3,11 @@

{{item.name}}

- +

{{item.type}}
- -
diff --git a/src/app/modules/data/types/catalog/catalog-list-item.html b/src/app/modules/data/types/catalog/catalog-list-item.html index a90460ca..66afd02d 100644 --- a/src/app/modules/data/types/catalog/catalog-list-item.html +++ b/src/app/modules/data/types/catalog/catalog-list-item.html @@ -3,11 +3,9 @@

{{item.name}}

- +

{{item.academicTerm.name}}

- - diff --git a/src/app/modules/data/types/event/event-detail-content.html b/src/app/modules/data/types/event/event-detail-content.html index b679bafc..0b345893 100644 --- a/src/app/modules/data/types/event/event-detail-content.html +++ b/src/app/modules/data/types/event/event-detail-content.html @@ -1,6 +1,14 @@ - - + + + - + + + + + + + + diff --git a/src/app/modules/data/types/event/event-list-item.html b/src/app/modules/data/types/event/event-list-item.html index 0b0baaaa..42bbb1e1 100644 --- a/src/app/modules/data/types/event/event-list-item.html +++ b/src/app/modules/data/types/event/event-list-item.html @@ -1,12 +1,18 @@ - +

{{item.name}}

{{item.description}}

{{item.academicTerms[0].name}}

- {{item.categories.join(', ')}} + {{item.type}} ({{item.categories.join(', ')}})
- +
+ + +

{{item.name}}

+

{{item.description}}

+

{{item.academicTerms[0].name}}

+ {{item.type}}
diff --git a/src/app/modules/data/types/favorite/favorite-list-item.html b/src/app/modules/data/types/favorite/favorite-list-item.html index e35402d3..0fd05dec 100644 --- a/src/app/modules/data/types/favorite/favorite-list-item.html +++ b/src/app/modules/data/types/favorite/favorite-list-item.html @@ -3,7 +3,7 @@

{{item.name}}: {{item.data.name}}

- +

{{item.type}} ({{item.data.type}})
diff --git a/src/app/modules/data/types/organization/organization-list-item.html b/src/app/modules/data/types/organization/organization-list-item.html index e69de29b..aa352d47 100644 --- a/src/app/modules/data/types/organization/organization-list-item.html +++ b/src/app/modules/data/types/organization/organization-list-item.html @@ -0,0 +1,14 @@ + + + +

{{item.name}}

+

{{item.description}}

+ {{item.type}} +
+ + + {{item.inPlace.name}} + + +
+
diff --git a/src/app/modules/data/types/place/place-detail-content.html b/src/app/modules/data/types/place/place-detail-content.html index 502e8271..41aeec54 100644 --- a/src/app/modules/data/types/place/place-detail-content.html +++ b/src/app/modules/data/types/place/place-detail-content.html @@ -1,15 +1,15 @@ - - + + - - Building: - - - {{item.inPlace.name}} - - + + Building: + + + {{item.inPlace.name}} + + diff --git a/src/app/modules/data/types/video/video-list-item.html b/src/app/modules/data/types/video/video-list-item.html index a42c3b1c..8e35fe86 100644 --- a/src/app/modules/data/types/video/video-list-item.html +++ b/src/app/modules/data/types/video/video-list-item.html @@ -2,7 +2,7 @@

{{item.name}}

-

+

Duration: {{item.duration | amDuration:'seconds'}}

{{item.type}}