-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put the image name in the
alt
attribute in the thumbnail on the met…
…adata page. (#8290) This commit adds the `<img>` in the `alt` attribute when there is a name, otherwise a default string is used. The image name used to be the caption underneath the thumbnail, but is now removed Extra: the `max-height` is increased in order to have the full width of the image.
- Loading branch information
1 parent
05b2e43
commit d560b2a
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
web-ui/src/main/resources/catalog/views/default/templates/recordView/thumbnails.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
<ul class="gn-thumbnails" data-ng-if="mdView.current.record.overview.length > 0"> | ||
<li data-ng-repeat="img in mdView.current.record.overview"> | ||
<img | ||
data-ng-if="img.name" | ||
data-gn-img-modal="img" | ||
class="img-thumbnail" | ||
alt="{{'overview' | translate}}" | ||
alt="{{img.name}}" | ||
title="{{img.name}}" | ||
data-ng-src="{{mdView.current.record.draft === 'y'? img.url + (img.url.indexOf('?') > 0 ? '&' : '?') + 'approved=false' : img.url}}" | ||
onerror="this.onerror=null; this.parentElement.style.display='none';" | ||
/> | ||
<p class="text-center" data-ng-if="img.name != ''">{{img.name}}</p> | ||
<img | ||
data-ng-if="!img.name" | ||
data-gn-img-modal="img" | ||
class="img-thumbnail" | ||
alt="{{'overview' | translate}}" | ||
title="{{'overview' | translate}}" | ||
data-ng-src="{{mdView.current.record.draft === 'y'? img.url + (img.url.indexOf('?') > 0 ? '&' : '?') + 'approved=false' : img.url}}" | ||
onerror="this.onerror=null; this.parentElement.style.display='none';" | ||
/> | ||
</li> | ||
</ul> |