Skip to content

Commit

Permalink
#251 update progress bar display
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Collins committed Oct 24, 2024
1 parent 1cc1d4f commit 6796273
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public.show.rt.des05=can be accessed through the {0}
public.show.rt.des06=Click to view all records for the
public.show.rt.des07=No database records for this collection can be accessed through the {0}
public.show.rt.des08=events
public.show.setprogress.01=There is no estimate of the total number of {0} in this collection.
public.show.setprogress.01=Specimen record count is not available to show the progress bar for records
public.show.setprogress.02=No records are available for viewing in the {0}
public.show.setprogress.accessions=accessions
public.show.setprogress.cultures=cultures
Expand Down
6 changes: 5 additions & 1 deletion grails-app/views/public/_progress.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ function setPercentAgeNumbers(totalBiocacheRecords, totalRecords) {
setProgress(percent);
} else {
// the progress bar doesn't make sense if there is no estimated speciemens count
$('#progress').hide();
$('#progressBarItem').hide();

// change the display text for the lack of metadata
$('#speedoCaption').hide();
$('#speedoCaptionMissingMetadata').show();
}
}

Expand Down
7 changes: 5 additions & 2 deletions grails-app/views/public/showCollection.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@
</div>
<div class="col-md-4">
<div id="progress" class="well">
<div class="progress">
<div class="progress" id="progressBarItem">
<div id="progressBar" class="progress-bar progress-bar-success" style="width: 0%;"></div>
</div>
<p class="caption"><span id="speedoCaption"><g:message code="public.show.setprogress.02" args="${[grailsApplication.config.skin.orgNameShort]}" />.</span></p>
<p class="caption">
<span id="speedoCaption"><g:message code="public.show.setprogress.02" args="${[grailsApplication.config.skin.orgNameShort]}" />.</span>
<span id="speedoCaptionMissingMetadata" style="display: none;"><g:message code="public.show.setprogress.01" args="${[grailsApplication.config.skin.orgNameShort]}" />.</span>
</p>
</div>
</div>

Expand Down

0 comments on commit 6796273

Please sign in to comment.