From 5515fbe787db486a383ac32a3445b7e730ffe241 Mon Sep 17 00:00:00 2001 From: ToMaarton Date: Tue, 15 Oct 2024 17:07:00 +0200 Subject: [PATCH] added photo tag counter in album view --- app/components/cards/photo-album-card.hbs | 2 +- app/styles/routes/photos.scss | 1 + .../photo-albums/photo-album/photos/index.hbs | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/components/cards/photo-album-card.hbs b/app/components/cards/photo-album-card.hbs index ec5e0a436..92efc2d3a 100644 --- a/app/components/cards/photo-album-card.hbs +++ b/app/components/cards/photo-album-card.hbs @@ -14,7 +14,7 @@ {{#if album.amountOfTags}} - {{album.amountOfTags}}, {{album.amountOfTaggedPhotos}}/{{album.amountOfPhotos}} + {{album.amountOfTaggedPhotos}}/{{album.amountOfPhotos}} {{/if}} diff --git a/app/styles/routes/photos.scss b/app/styles/routes/photos.scss index 75776231e..6e1387823 100644 --- a/app/styles/routes/photos.scss +++ b/app/styles/routes/photos.scss @@ -8,6 +8,7 @@ bottom: 0; margin-bottom: 1rem; margin-left: 15px; + margin-right: 15px; padding-left: 5px; } diff --git a/app/templates/photo-albums/photo-album/photos/index.hbs b/app/templates/photo-albums/photo-album/photos/index.hbs index 77d05cdae..bbab2ce02 100644 --- a/app/templates/photo-albums/photo-album/photos/index.hbs +++ b/app/templates/photo-albums/photo-album/photos/index.hbs @@ -21,10 +21,16 @@ @route='photo-albums.photo-album.photos.photo' @model={{photo.id}} > - {{#if photo.amountOfComments}} + {{#if (or photo.amountOfComments photo.amountOfTags)}} - - {{photo.amountOfComments}} + {{#if photo.amountOfComments}} + + {{photo.amountOfComments}} + {{/if}} + {{#if photo.amountOfTags}} + + {{photo.amountOfTags}} + {{/if}} {{/if}}